Skip to main content
Glama

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(); }

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