Skip to main content
Glama

microcms_get_api_info

Retrieve API schema information from microCMS Management API to understand content structure and field relationships, including referenced endpoints in relation fields.

Instructions

Get API schema information from microCMS Management API. In relation and relationList field, you can get its schema using referencedApiEndpoint and microcms_get_api_info tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name to get schema info (e.g., "blogs", "news")

Implementation Reference

  • Core implementation of fetching API schema information from microCMS Management API using the management endpoint.
    export async function getApiInfo(endpoint: string): Promise<any> { const url = `https://${config.serviceDomain}.microcms-management.io/api/v1/apis/${endpoint}`; 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 API info: ${response.status} ${response.statusText} - ${errorText}`); } return await response.json(); }
  • Tool definition including input schema for the microcms_get_api_info tool.
    export const getApiInfoTool: Tool = { name: 'microcms_get_api_info', description: 'Get API schema information from microCMS Management API. In relation and relationList field, you can get its schema using referencedApiEndpoint and microcms_get_api_info tool.', inputSchema: { type: 'object', properties: { endpoint: { type: 'string', description: 'Content type name to get schema info (e.g., "blogs", "news")', }, }, required: ['endpoint'], }, };
  • Tool-specific handler that extracts the endpoint parameter and delegates to the core getApiInfo function.
    export async function handleGetApiInfo(params: ToolParameters) { const { endpoint } = params; return await getApiInfo(endpoint); }
  • src/server.ts:133-135 (registration)
    Dispatch case in the server tool caller that invokes the tool handler.
    case 'microcms_get_api_info': result = await handleGetApiInfo(params); break;
  • src/server.ts:67-67 (registration)
    Registration of the tool in the listTools response.
    getApiInfoTool,

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