Skip to main content
Glama
microcmsio

microCMS MCP Server

by microcmsio

microcms_get_content_meta

Retrieve content with metadata from microCMS, including status, authorship, timestamps, and custom fields not available in standard content APIs.

Instructions

Get a specific content with metadata from microCMS Management API. IMPORTANT: Use this tool ONLY when the user message contains "メタ" (meta) or "メタ情報" (metadata). This API returns metadata information such as status, createdBy, updatedBy, reservationTime, closedAt, and customStatus that are not available in the regular content API. For regular content retrieval, use microcms_get_content instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name (e.g., "blogs", "news")
contentIdYesContent ID to retrieve

Implementation Reference

  • The handler function for the 'microcms_get_content_meta' tool. It validates the required parameters (endpoint and contentId) and calls the getContentManagement helper from the client module.
    export async function handleGetContentMeta(params: ToolParameters) {
      const { endpoint, contentId } = params;
    
      if (!endpoint) {
        throw new Error('endpoint is required');
      }
    
      if (!contentId) {
        throw new Error('contentId is required');
      }
    
      return await getContentManagement(endpoint, contentId);
    }
  • The schema definition for the tool, including name, description, and input schema specifying required 'endpoint' and 'contentId' parameters.
    export const getContentMetaTool: Tool = {
      name: 'microcms_get_content_meta',
      description: 'Get a specific content with metadata from microCMS Management API. IMPORTANT: Use this tool ONLY when the user message contains "メタ" (meta) or "メタ情報" (metadata). This API returns metadata information such as status, createdBy, updatedBy, reservationTime, closedAt, and customStatus that are not available in the regular content API. For regular content retrieval, use microcms_get_content instead.',
      inputSchema: {
        type: 'object',
        properties: {
          endpoint: {
            type: 'string',
            description: 'Content type name (e.g., "blogs", "news")',
          },
          contentId: {
            type: 'string',
            description: 'Content ID to retrieve',
          },
        },
        required: ['endpoint', 'contentId'],
      },
    };
  • src/server.ts:91-93 (registration)
    Registration of the tool handler in the server's CallToolRequest switch statement.
    case 'microcms_get_content_meta':
      result = await handleGetContentMeta(params);
      break;
  • src/server.ts:11-11 (registration)
    Import of the tool definition and handler function into the server module.
    import { getContentMetaTool, handleGetContentMeta } from './tools/get-content-meta.js';
  • Core helper function that makes the HTTP GET request to the microCMS Management API to fetch the content metadata for the specified endpoint and contentId.
    export async function getContentManagement(
      endpoint: string,
      contentId: string
    ): Promise<any> {
      const url = `https://${config.serviceDomain}.microcms-management.io/api/v1/contents/${endpoint}/${contentId}`;
    
      const response = await fetch(url, {
        method: 'GET',
        headers: {
          'X-MICROCMS-API-KEY': config.apiKey,
        },
      });
    
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`Failed to get content: ${response.status} ${response.statusText} - ${errorText}`);
      }
    
      return await response.json();
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden. It effectively communicates this is a read operation ('Get'), specifies the API source ('microCMS Management API'), and describes what metadata is returned. However, it doesn't mention potential rate limits, authentication requirements, or error conditions that would be helpful for an agent.

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

Conciseness5/5

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

The description is efficiently structured with three sentences: first states the purpose, second provides critical usage rules, third explains the value and alternative. Every sentence adds essential information with zero wasted words, and the most important guidance is front-loaded.

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

Completeness4/5

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

For a read-only tool with 2 parameters and 100% schema coverage, the description provides excellent context about when to use it and what it returns. The main gap is the lack of output schema, so the agent doesn't know the exact structure of returned metadata, but the description gives good examples of what fields to expect.

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 both parameters well. The description doesn't add any parameter-specific information beyond what's in the schema, but it does provide context about what the tool returns (metadata vs regular content), which helps understand the purpose of the parameters.

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

Purpose5/5

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

The description clearly states the verb ('Get') and resource ('a specific content with metadata'), distinguishes it from sibling tools by specifying it's for metadata retrieval, and explicitly contrasts it with 'microcms_get_content' for regular content. It provides specific examples of metadata fields like status and createdBy.

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

Usage Guidelines5/5

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

The description provides explicit usage rules: 'Use this tool ONLY when the user message contains "メタ" (meta) or "メタ情報" (metadata).' It also clearly states the alternative tool ('microcms_get_content') for regular content retrieval, making it unambiguous when to use this versus other options.

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