Skip to main content
Glama
microcmsio

microCMS MCP Server

by microcmsio

microcms_get_content

Retrieve specific content from microCMS by providing content type and ID, enabling access to individual CMS entries for display or processing.

Instructions

Get a specific content from microCMS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name (e.g., "blogs", "news")
contentIdYesContent ID to retrieve
draftKeyNoDraft key for preview
fieldsNoComma-separated list of fields to retrieve
depthNoDepth of reference expansion (1-3)

Implementation Reference

  • The main handler function for the 'microcms_get_content' tool. It extracts parameters, validates contentId, builds query options, and calls the client function getListDetail to fetch the specific content.
    export async function handleGetContent(params: ToolParameters) {
      const { endpoint, contentId, ...options } = params;
      
      if (!contentId) {
        throw new Error('contentId is required');
      }
    
      const queries: MicroCMSGetOptions = {};
      
      if (options.draftKey) queries.draftKey = options.draftKey;
      if (options.fields) queries.fields = options.fields;
      if (options.depth) queries.depth = options.depth;
    
      return await getListDetail(endpoint, contentId, queries);
    }
  • The Tool object defining the schema for 'microcms_get_content', including name, description, and inputSchema with required endpoint and contentId, optional draftKey, fields, depth.
    export const getContentTool: Tool = {
      name: 'microcms_get_content',
      description: 'Get a specific content from microCMS',
      inputSchema: {
        type: 'object',
        properties: {
          endpoint: {
            type: 'string',
            description: 'Content type name (e.g., "blogs", "news")',
          },
          contentId: {
            type: 'string',
            description: 'Content ID to retrieve',
          },
          draftKey: {
            type: 'string',
            description: 'Draft key for preview',
          },
          fields: {
            type: 'string',
            description: 'Comma-separated list of fields to retrieve',
          },
          depth: {
            type: 'number',
            description: 'Depth of reference expansion (1-3)',
            minimum: 1,
            maximum: 3,
          },
        },
        required: ['endpoint', 'contentId'],
      },
    };
  • src/server.ts:47-72 (registration)
    Registration of the tool in the ListToolsRequestSchema handler by including getContentTool in the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          getListTool,
          getListMetaTool,
          getContentTool,
          getContentMetaTool,
          createContentPublishedTool,
          createContentDraftTool,
          createContentsBulkPublishedTool,
          createContentsBulkDraftTool,
          updateContentPublishedTool,
          updateContentDraftTool,
          patchContentTool,
          patchContentStatusTool,
          patchContentCreatedByTool,
          deleteContentTool,
          getMediaTool,
          uploadMediaTool,
          deleteMediaTool,
          getApiInfoTool,
          getApiListTool,
          getMemberTool,
        ],
      };
    });
  • src/server.ts:88-90 (registration)
    In the CallToolRequestSchema switch statement, the case that calls handleGetContent when the tool name is 'microcms_get_content'.
    case 'microcms_get_content':
      result = await handleGetContent(params);
      break;
  • src/server.ts:10-10 (registration)
    Import of the getContentTool and handleGetContent from the tool file.
    import { getContentTool, handleGetContent } from './tools/get-content.js';
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 'Get a specific content', implying a read-only operation, but doesn't clarify authentication needs, rate limits, error handling, or response format. For a tool with 5 parameters and no output schema, this leaves significant behavioral gaps, making it inadequate for safe and effective use.

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 a single, efficient sentence with zero waste: 'Get a specific content from microCMS'. It's front-loaded with the core action and resource, making it easy to parse. No extraneous details or redundancy are present, which is ideal for conciseness in this context.

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 the tool's complexity (5 parameters, no annotations, no output schema, and many siblings), the description is incomplete. It lacks behavioral details (e.g., read-only nature, error handling), usage context compared to siblings, and output information. While the schema covers parameters, the description fails to provide the holistic guidance needed for an agent to use this tool effectively in isolation.

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 fully documents all 5 parameters (endpoint, contentId, draftKey, fields, depth). The description adds no parameter-specific information beyond the generic 'specific content', providing no additional meaning or usage examples. This meets the baseline of 3, as the schema handles the heavy lifting, but the description doesn't compensate or enhance understanding.

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

Purpose3/5

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

The description states the tool's purpose as 'Get a specific content from microCMS', which is clear but vague. It specifies the verb 'Get' and resource 'content', but lacks specificity about what 'content' entails (e.g., a single item by ID) and doesn't distinguish it from siblings like 'microcms_get_list' (which retrieves multiple items). The purpose is understandable but not precise enough for optimal differentiation.

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, such as needing an endpoint and contentId, or contrast it with siblings like 'microcms_get_list' for lists or 'microcms_get_content_meta' for metadata. Without such context, an agent might struggle to choose the correct tool in this crowded sibling set.

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