Skip to main content
Glama
microcmsio

microCMS MCP Server

by microcmsio

microcms_patch_content_created_by

Update the creator field of microCMS content items to assign proper authorship by specifying a member ID, ensuring accurate content attribution in the CMS.

Instructions

Change content creator in microCMS (Management API). Updates the createdBy field of a content item to a specified member ID. Member ID can be found in the member detail screen in the management console.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name (e.g., "blogs", "news")
contentIdYesContent ID to change creator
createdByYesMember ID to set as the creator. Member ID can be found in the member detail screen in the management console.

Implementation Reference

  • Handler function that validates parameters and calls the client patchContentCreatedBy to update the createdBy field.
    export async function handlePatchContentCreatedBy(
      params: ToolParameters & { createdBy: string }
    ) {
      const { endpoint, contentId, createdBy } = params;
    
      if (!endpoint) {
        throw new Error('endpoint is required');
      }
    
      if (!contentId) {
        throw new Error('contentId is required');
      }
    
      if (!createdBy) {
        throw new Error('createdBy is required');
      }
    
      const result = await patchContentCreatedBy(endpoint, contentId, createdBy);
      return { message: `Content ${contentId} creator changed to ${createdBy}`, id: result.id };
    }
  • Tool definition including input schema for parameters: endpoint, contentId, createdBy.
    export const patchContentCreatedByTool: Tool = {
      name: 'microcms_patch_content_created_by',
      description: 'Change content creator in microCMS (Management API). Updates the createdBy field of a content item to a specified member ID. Member ID can be found in the member detail screen in the management console.',
      inputSchema: {
        type: 'object',
        properties: {
          endpoint: {
            type: 'string',
            description: 'Content type name (e.g., "blogs", "news")',
          },
          contentId: {
            type: 'string',
            description: 'Content ID to change creator',
          },
          createdBy: {
            type: 'string',
            description: 'Member ID to set as the creator. Member ID can be found in the member detail screen in the management console.',
          },
        },
        required: ['endpoint', 'contentId', 'createdBy'],
      },
    };
  • src/server.ts:117-120 (registration)
    Switch case in server request handler that dispatches to the tool's handlePatchContentCreatedBy function.
      break;
    case 'microcms_patch_content_created_by':
      result = await handlePatchContentCreatedBy(params as ToolParameters & { createdBy: string });
      break;
  • src/server.ts:61-62 (registration)
    Tool is included in the list of tools returned by ListToolsRequestHandler.
    patchContentStatusTool,
    patchContentCreatedByTool,
  • Core helper function that makes the PATCH request to microCMS Management API to update the createdBy field of a content item.
    export async function patchContentCreatedBy(
      endpoint: string,
      contentId: string,
      memberId: string
    ): Promise<{ id: string }> {
      const url = `https://${config.serviceDomain}.microcms-management.io/api/v1/contents/${endpoint}/${contentId}/createdBy`;
    
      const response = await fetch(url, {
        method: 'PATCH',
        headers: {
          'X-MICROCMS-API-KEY': config.apiKey,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({ createdBy: memberId }),
      });
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`Failed to patch content createdBy: ${response.status} ${response.statusText} - ${errorText}`);
      }
    
      return await response.json();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is a mutation ('Updates'), but doesn't mention permissions required, whether changes are reversible, rate limits, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized (two sentences) and front-loaded with the core purpose. The second sentence adds necessary context about Member ID sourcing. There's no wasted text, though it could be slightly more structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, side effects, or response format. The schema handles parameters well, but the overall context for safe and effective use is lacking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds minimal value beyond the schema: it repeats the Member ID guidance for 'createdBy' but doesn't explain parameter interactions or provide additional context. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Change content creator in microCMS' with specific verb ('Updates') and resource ('createdBy field of a content item'). It distinguishes from siblings like microcms_patch_content (general patch) and microcms_patch_content_status (status-specific patch) by focusing on creator updates. However, it doesn't explicitly contrast with all siblings, so it's not a perfect 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing management API access), exclusions (e.g., not for bulk updates), or compare to siblings like microcms_update_content_draft which might also affect creators. Usage is implied but not explicitly defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microcmsio/microcms-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server