Skip to main content
Glama
SpringMT

microCMS MCP Server

by SpringMT

SearchMicroCMS

Search and retrieve content from microCMS APIs using queries, filters, and sorting options to find specific information within your content management system.

Instructions

Search content in MicroCMS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query
limitNoMaximum number of results to return
offsetNoNumber of items to skip
fieldsNoComma-separated list of fields to return
ordersNoSort order (e.g., '-publishedAt')
filtersNoFilters in the format 'field[operator]=value'

Implementation Reference

  • The handler function for the SearchMicroCMS tool that takes input parameters, builds search queries, calls the MicroCMS getList API, and returns the JSON results or an error message.
    async ({ q, limit, offset, fields, orders, filters }) => {
        try {
            // 検索オプションの設定
            const queries: Record<string, any> = { q };
            
            if (limit) queries.limit = limit;
            if (offset) queries.offset = offset;
            if (fields) queries.fields = fields;
            if (orders) queries.orders = orders;
            if (filters) queries.filters = filters;
            
            const response = await client.getList({
                endpoint: MICROCMS_ENDPOINT,
                queries,
            });
    
            // 結果をJSON文字列に変換
            const resultJson = JSON.stringify(response, null, 2);
            
            return {
                content: [
                    { 
                        type: "text", 
                        text: resultJson
                    }
                ]
            };
        } catch (error: unknown) {
            console.error("Error searching MicroCMS:", error);
            const errorMessage = error instanceof Error ? error.message : String(error);
            return {
                content: [
                    { 
                        type: "text", 
                        text: `Failed to search MicroCMS: ${errorMessage}`
                    }
                ]
            };
        }
    }
  • Zod input schema defining parameters for the SearchMicroCMS tool: query (q), optional limit, offset, fields, orders, and filters.
    {
        q: z.string().describe("Search query"),
        limit: z.number().optional().describe("Maximum number of results to return"),
        offset: z.number().optional().describe("Number of items to skip"),
        fields: z.string().optional().describe("Comma-separated list of fields to return"),
        orders: z.string().optional().describe("Sort order (e.g., '-publishedAt')"),
        filters: z.string().optional().describe("Filters in the format 'field[operator]=value'"),
    },
  • src/index.ts:39-42 (registration)
    Registration of the SearchMicroCMS tool on the MCP server, including name, description, input schema, and handler function.
    server.tool(
        "SearchMicroCMS",
        "Search content in MicroCMS",
        {
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. It mentions 'Search' but doesn't disclose behavioral traits such as read-only nature (implied but not stated), potential rate limits, authentication needs, or what happens on errors. For a search tool with no annotation coverage, this is a significant gap in transparency.

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. It's appropriately sized and front-loaded, making it easy to parse quickly. Every word earns its place by conveying the core action.

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 complexity (6 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain return values, error handling, or behavioral context. For a search tool with multiple parameters and a sibling, more detail is needed to guide the agent effectively.

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 6 parameters (e.g., 'q' for search query, 'limit' for maximum results). The description adds no additional meaning beyond the schema, such as examples or usage tips. Baseline is 3 when schema does the heavy lifting.

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 'Search content in MicroCMS' states the verb ('Search') and resource ('content in MicroCMS'), providing a basic purpose. However, it lacks specificity about what type of content or scope, and doesn't differentiate from the sibling tool 'GetMicroCMSContent', which might retrieve specific content versus searching. It's vague but functional.

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?

No guidance is provided on when to use this tool versus the sibling 'GetMicroCMSContent'. The description implies a search operation but doesn't specify contexts, prerequisites, or alternatives. This leaves the agent without clear direction on tool selection.

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/SpringMT/microcms-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server