Skip to content

Instantly share code, notes, and snippets.

View MilanLund's full-sized avatar

Milan Lund MilanLund

View GitHub Profile

MCP Management API Issue: Content Type Creation Serialization Error

Core Issue

The create_content_types function in the xperience-management-api MCP server fails with a serialization error when attempting to create content types. The error indicates the tool receives a string instead of an object, despite passing a properly structured data object.

Error Message

Error calling tool: Parameter 'data' must be one of types [object, object], got string
@MilanLund
MilanLund / RebuildIndexPostStartModule.cs
Last active September 13, 2024 10:57
Rebuild search index on application start in Xperience by Kentico
using CMS;
using CMS.Base;
using CMS.Core;
using CMS.DataEngine;
using Kentico.Xperience.Lucene.Core.Indexing;
[assembly: RegisterModule(typeof(RebuildIndexPostStartModule))]
public class RebuildIndexPostStartModule : Module
{
@MilanLund
MilanLund / MigrationHelper.cs
Last active June 17, 2024 10:46
Migrate Content from Kentico CMS Portal Engine to Xperience by Kentico
using CMS.ContentEngine;
using CMS.MediaLibrary;
using CMS.Membership;
using CMS.Websites;
using CMS.Websites.Routing;
using Kentico.Content.Web.Mvc;
using CMS.DataEngine;
using Kentico.Content.Web.Mvc.Routing;
namespace Project.Helpers;
@MilanLund
MilanLund / ContentRepositoryBase.cs
Last active October 10, 2024 07:14
Repository pattern with a Generic type for a Xperience by Kentico project
using CMS.ContentEngine;
using CMS.Helpers;
using CMS.Websites;
using CMS.Websites.Routing;
namespace YourProject.Models;
public abstract class ContentRepositoryBase
{
protected IWebsiteChannelContext WebsiteChannelContext { get; init; }