Skip to main content
Glama
microcmsio

microCMS MCP Server

by microcmsio

microcms_get_list_meta

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

Instructions

Get a list of contents 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_list instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name (e.g., "blogs", "news")
limitNoNumber of contents to retrieve (default: 10, max: 100)
offsetNoOffset for pagination (default: 0)

Implementation Reference

  • Handler function that parses tool parameters, validates endpoint, constructs options, and calls the client getListMeta function to fetch list metadata.
    export async function handleGetListMeta(params: ToolParameters) {
        const { endpoint, limit, offset } = params;
    
        if (!endpoint) {
            throw new Error('endpoint is required');
        }
    
        const options: { limit?: number; offset?: number } = {};
        if (limit !== undefined) options.limit = limit;
        if (offset !== undefined) options.offset = offset;
    
        return await getListMeta(endpoint, options);
    }
  • Tool definition including name, description, and inputSchema for parameter validation (endpoint required, optional limit/offset).
    export const getListMetaTool: Tool = {
        name: 'microcms_get_list_meta',
        description: 'Get a list of contents 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_list instead.',
        inputSchema: {
            type: 'object',
            properties: {
                endpoint: {
                    type: 'string',
                    description: 'Content type name (e.g., "blogs", "news")',
                },
                limit: {
                    type: 'number',
                    description: 'Number of contents to retrieve (default: 10, max: 100)',
                    minimum: 1,
                    maximum: 100,
                },
                offset: {
                    type: 'number',
                    description: 'Offset for pagination (default: 0)',
                    minimum: 0,
                },
            },
            required: ['endpoint'],
        },
    };
  • src/server.ts:85-87 (registration)
    Switch case in the CallToolRequest handler that routes calls to this tool to its handleGetListMeta function.
    case 'microcms_get_list_meta':
      result = await handleGetListMeta(params);
      break;
  • src/server.ts:51-51 (registration)
    The tool object is included in the array returned by the ListToolsRequest handler, making it discoverable.
    getListMetaTool,
  • Core client function that fetches the list of contents with metadata from microCMS Management API using fetch, handling limit and offset.
    export async function getListMeta(
      endpoint: string,
      options?: { limit?: number; offset?: number }
    ): Promise<any> {
      const queryParams = new URLSearchParams();
      if (options?.limit) queryParams.append('limit', options.limit.toString());
      if (options?.offset) queryParams.append('offset', options.offset.toString());
    
      const url = `https://${config.serviceDomain}.microcms-management.io/api/v1/contents/${endpoint}${queryParams.toString() ? `?${queryParams.toString()}` : ''}`;
    
      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 contents list: ${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 discloses that this is a read operation ('Get'), specifies the API source ('microCMS Management API'), and lists the types of metadata returned (status, createdBy, updatedBy, reservationTime, closedAt, customStatus). However, it doesn't mention rate limits, authentication requirements, or pagination behavior beyond what's in the schema.

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 in three sentences: first states the purpose, second provides critical usage rule, third explains metadata details and sibling distinction. Every sentence adds value with zero waste.

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 operation with no annotations and no output schema, the description provides good context: purpose, specific usage trigger, metadata details, and sibling differentiation. However, it doesn't describe the return format or structure, which would be helpful given the lack of output schema.

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 (endpoint, limit, offset) with their descriptions and constraints. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline of 3.

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 a list of contents with metadata') and resource ('from microCMS Management API'), distinguishing it from sibling microcms_get_list by specifying it returns metadata information not available in the regular content API. This provides specific differentiation.

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 guidance: 'Use this tool ONLY when the user message contains "メタ" (meta) or "メタ情報" (metadata)' and 'For regular content retrieval, use microcms_get_list instead.' This clearly defines when to use this tool versus alternatives.

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