Skip to main content
Glama
microcmsio

microCMS MCP Server

by microcmsio

microcms_get_list

Retrieve content lists from microCMS with filtering, sorting, pagination, and search capabilities for managing blog posts, news articles, or other content types.

Instructions

Get a list of contents from microCMS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endpointYesContent type name (e.g., "blogs", "news")
draftKeyNoDraft key for preview
limitNoNumber of contents to retrieve (1-100)
offsetNoOffset for pagination
ordersNoSort order (e.g., "-publishedAt" for descending)
qNoFull-text search query
fieldsNoComma-separated list of fields to retrieve
idsNoComma-separated list of content IDs
filtersNoFilter conditions
depthNoDepth of reference expansion (1-3)

Implementation Reference

  • Handler function for the microcms_get_list tool. Parses input parameters into MicroCMS queries and calls the underlying getList client function.
    export async function handleGetList(params: ToolParameters) {
      const { endpoint, ...options } = params;
      
      const queries: MicroCMSListOptions = {};
      
      if (options.draftKey) queries.draftKey = options.draftKey;
      if (options.limit) queries.limit = options.limit;
      if (options.offset) queries.offset = options.offset;
      if (options.orders) queries.orders = options.orders;
      if (options.q) queries.q = options.q;
      if (options.fields) queries.fields = options.fields;
      if (options.ids) queries.ids = options.ids;
      if (options.filters) queries.filters = options.filters;
      if (options.depth) queries.depth = options.depth;
    
      return await getList(endpoint, queries);
    }
  • Tool schema definition including name, description, and detailed inputSchema for parameters like endpoint, limit, filters, etc.
    export const getListTool: Tool = {
      name: 'microcms_get_list',
      description: 'Get a list of contents from microCMS',
      inputSchema: {
        type: 'object',
        properties: {
          endpoint: {
            type: 'string',
            description: 'Content type name (e.g., "blogs", "news")',
          },
          draftKey: {
            type: 'string',
            description: 'Draft key for preview',
          },
          limit: {
            type: 'number',
            description: 'Number of contents to retrieve (1-100)',
            minimum: 1,
            maximum: 100,
          },
          offset: {
            type: 'number',
            description: 'Offset for pagination',
            minimum: 0,
          },
          orders: {
            type: 'string',
            description: 'Sort order (e.g., "-publishedAt" for descending)',
          },
          q: {
            type: 'string',
            description: 'Full-text search query',
          },
          fields: {
            type: 'string',
            description: 'Comma-separated list of fields to retrieve',
          },
          ids: {
            type: 'string',
            description: 'Comma-separated list of content IDs',
          },
          filters: {
            type: 'string',
            description: 'Filter conditions',
          },
          depth: {
            type: 'number',
            description: 'Depth of reference expansion (1-3)',
            minimum: 1,
            maximum: 3,
          },
        },
        required: ['endpoint'],
      },
    };
  • src/server.ts:82-84 (registration)
    Registration of the tool handler in the main switch statement for CallToolRequestSchema.
    case 'microcms_get_list':
      result = await handleGetList(params);
      break;
  • src/server.ts:47-72 (registration)
    Registration of the tool in the ListToolsRequestSchema handler, exposing the schema to clients.
    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,
        ],
      };
    });
  • Core helper function that performs the actual API call to microCMS getList endpoint using the microCMSClient.
    export async function getList<T = MicroCMSContent>(
      endpoint: string,
      queries?: MicroCMSQueries
    ): Promise<MicroCMSListResponse<T>> {
      return await microCMSClient.getList<T>({
        endpoint,
        queries,
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but discloses minimal behavioral traits. It mentions 'list' but doesn't describe pagination behavior, rate limits, authentication needs, error conditions, or what happens with draft content. For a read operation with 10 parameters, this leaves significant behavioral gaps.

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 wasted words. It's appropriately sized for a basic tool description and front-loads the core purpose immediately.

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?

For a 10-parameter tool with no annotations and no output schema, the description is inadequate. It doesn't explain what the tool returns (content structure, pagination metadata), when to use various parameters, or behavioral constraints. The description fails to compensate for the lack of structured metadata.

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 10 parameters. The description adds no parameter-specific information beyond the generic 'list' concept. Baseline 3 is appropriate when schema does all the parameter documentation work.

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 basic action ('Get a list of contents') and resource ('from microCMS'), but it's vague about scope and doesn't distinguish from siblings like 'microcms_get_content' (single item) or 'microcms_get_list_meta' (metadata only). It lacks specificity about what kind of list operation this performs.

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 on when to use this tool versus alternatives. It doesn't mention when to choose this over 'microcms_get_content' for single items, 'microcms_get_list_meta' for metadata, or when filtering/pagination is needed. The description provides no usage context or exclusions.

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