Skip to main content
Glama
microcmsio

microCMS MCP Server

by microcmsio

microcms_update_content_published

Update existing content in microCMS and publish it immediately. This tool modifies content data for a specified content ID and endpoint, ensuring changes go live instantly.

Instructions

Create new content in microCMS and publish it immediately.

Important

Ensure that the "content" you submit strictly adheres to the following specifications. In particular, take extra care when handling custom fields and iframe fields, as mistakes are common in their structure. Read the instructions thoroughly and construct the data precisely as described. In particular, for extended fields (iframe fields), you need to take care to call microcms_get_list tool beforehand, and set its structure to the "data" field (Detail is described below).

Field type specifications

  • Image fields require URL string uploaded to microCMS media library (e.g., "https://images.microcms-assets.io/assets/xxx/yyy/sample.png").

  • Multiple image fields use array format.

  • Rich editor fields expect HTML strings.

  • Date fields use ISO 8601 format.

  • Select fields use arrays.

  • Content reference fields use contentId strings or arrays for multiple references, and you can get contentIds from microcms_get_list tool.

  • Custom field exepect below struct:

<field Id in apiFields> {
  "fieldId": "<target custom field id in customFields>"
  "key1": "<value1>",
  "key2": "<value2>",
}
  • iframe field (Extension field) expects the following structure for CREATE/UPDATE:

  {
    "id": "some-id",
    "title": "some-title",
    "description": "some-description",
    "imageUrl": "https://images.microcms-assets.io/assets/xxxx/yyyy/{fileName}.png",
    "updatedAt": "2024-01-01T00:00:00Z",
    "data": { "key1": "value1", "key2": "value2" }
  }
  • IMPORTANT: When retrieving content via API, only the "data" object content is returned (without the wrapper).

  • IMPORTANT: When creating/updating content, you MUST provide the full structure including id, title, description, imageUrl, updatedAt, and data.

  • To understand the "data" structure, ALWAYS use microcms_get_list to retrieve existing content first and examine the field structure.

  • "id", "title", "description", "imageUrl" are metadata displayed in the admin screen and are not included in the API GET response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name (e.g., "blogs", "news")
contentIdYesContent ID to update
contentYesContent data to update (JSON object). Create new content in microCMS and publish it immediately. ## Important Ensure that the "content" you submit strictly adheres to the following specifications. In particular, take extra care when handling custom fields and iframe fields, as mistakes are common in their structure. Read the instructions thoroughly and construct the data precisely as described. In particular, for extended fields (iframe fields), you need to take care to call microcms_get_list tool beforehand, and set its structure to the "data" field (Detail is described below). ## Field type specifications * Image fields require URL string uploaded to microCMS media library (e.g., "https://images.microcms-assets.io/assets/xxx/yyy/sample.png"). * Multiple image fields use array format. * Rich editor fields expect HTML strings. * Date fields use ISO 8601 format. * Select fields use arrays. * Content reference fields use contentId strings or arrays for multiple references, and you can get contentIds from microcms_get_list tool. * Custom field exepect below struct: ```json <field Id in apiFields> { "fieldId": "<target custom field id in customFields>" "key1": "<value1>", "key2": "<value2>", } ``` * iframe field (Extension field) expects the following structure for CREATE/UPDATE: ```json { "id": "some-id", "title": "some-title", "description": "some-description", "imageUrl": "https://images.microcms-assets.io/assets/xxxx/yyyy/{fileName}.png", "updatedAt": "2024-01-01T00:00:00Z", "data": { "key1": "value1", "key2": "value2" } } ``` * **IMPORTANT**: When retrieving content via API, only the "data" object content is returned (without the wrapper). * **IMPORTANT**: When creating/updating content, you MUST provide the full structure including id, title, description, imageUrl, updatedAt, and data. * To understand the "data" structure, ALWAYS use microcms_get_list to retrieve existing content first and examine the field structure. * "id", "title", "description", "imageUrl" are metadata displayed in the admin screen and are not included in the API GET response.

Implementation Reference

  • The handler function that destructures parameters, validates required fields, sets publish options (isDraft: false), and calls the update function from client.js.
    export async function handleUpdateContentPublished(params: ToolParameters) {
      const { endpoint, contentId, content } = params;
    
      if (!contentId) {
        throw new Error('contentId is required');
      }
    
      if (!content) {
        throw new Error('content is required');
      }
    
      const updateOptions: MicroCMSUpdateOptions = {
        isDraft: false, // Always publish
      };
    
      return await update(endpoint, contentId, content, updateOptions);
    }
  • Tool definition including name, description, and input schema for validating endpoint, contentId, and content parameters.
    export const updateContentPublishedTool: Tool = {
      name: 'microcms_update_content_published',
      description: FIELD_FORMATS_DESCRIPTION,
      inputSchema: {
        type: 'object',
        properties: {
          endpoint: {
            type: 'string',
            description: 'Content type name (e.g., "blogs", "news")',
          },
          contentId: {
            type: 'string',
            description: 'Content ID to update',
          },
          content: {
            type: 'object',
            description: `Content data to update (JSON object). ` + FIELD_FORMATS_DESCRIPTION,
          },
        },
        required: ['endpoint', 'contentId', 'content'],
      },
    };
  • src/server.ts:106-108 (registration)
    Switch case in CallToolRequest handler that dispatches to the tool's handler function.
    case 'microcms_update_content_published':
      result = await handleUpdateContentPublished(params);
      break;
  • src/server.ts:58-58 (registration)
    Registration of the tool object in the ListTools response.
    updateContentPublishedTool,
  • src/server.ts:14-14 (registration)
    Import of the tool definition and handler function.
    import { updateContentPublishedTool, handleUpdateContentPublished } from './tools/update-content-published.js';
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a write operation ('Create new content') that publishes immediately, implying mutation and side effects. It adds useful context about field handling complexities, prerequisites (calling microcms_get_list), and API response discrepancies. However, it doesn't cover permissions, rate limits, error conditions, or what happens on success beyond publication.

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

Conciseness2/5

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

The description is excessively long and poorly structured, with the entire content duplicated in the 'content' parameter's schema description. It includes detailed field specifications that belong in documentation rather than a concise tool description. While it uses headings, the information is not front-loaded effectively, burying the core purpose. Many sentences (e.g., field-type details) don't earn their place in a tool description meant for agent selection.

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

Completeness3/5

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

Given the complexity (3 parameters, nested objects, no output schema, no annotations), the description is moderately complete. It covers the core action and critical field-handling nuances, which is essential for a mutation tool. However, it lacks output information, error handling, and sibling differentiation. The duplication with the schema reduces its value, but it provides necessary context for the 'content' parameter's structure.

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%, with the 'content' parameter's description duplicating the tool's entire description text. The description adds no additional parameter semantics beyond what's already in the schema. For the 'endpoint' and 'contentId' parameters, the description provides no extra context. With high schema coverage, the baseline is 3, as the description doesn't compensate with unique insights.

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: 'Create new content in microCMS and publish it immediately.' This specifies the verb ('Create') and resource ('content in microCMS') with the immediate publication outcome. However, it doesn't explicitly differentiate from siblings like 'microcms_create_content_published' (which likely has the same purpose) or 'microcms_update_content_draft' (which differs in publication status).

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 explicit guidance on when to use this tool versus alternatives. It mentions calling 'microcms_get_list' beforehand for understanding field structures, but this is a technical prerequisite rather than usage context. There's no comparison to siblings like 'microcms_create_content_draft' or 'microcms_update_content_draft', leaving the agent to infer based on tool names alone.

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