Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

list-indexes

Retrieve all indexes from a Meilisearch instance to manage searchable data collections. Use limit and offset parameters to control result pagination.

Instructions

List all indexes in the Meilisearch instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of indexes to return
offsetNoNumber of indexes to skip

Implementation Reference

  • The handler function that executes the list-indexes tool: calls Meilisearch API to get indexes with optional limit/offset, returns formatted JSON or error response.
      async ({ limit, offset }: ListIndexesParams) => {
        try {
          const response = await apiClient.get('/indexes', {
            params: {
              limit,
              offset,
            },
          });
          return {
            content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }],
          };
        } catch (error) {
          return createErrorResponse(error);
        }
      }
    );
  • Zod input schema defining optional limit (1-100) and offset (>=0) parameters for the list-indexes tool.
    {
      limit: z.number().min(1).max(100).optional().describe('Maximum number of indexes to return'),
      offset: z.number().min(0).optional().describe('Number of indexes to skip'),
    },
  • Direct registration of the list-indexes tool on the MCP server, including schema and inline handler.
    server.tool(
      'list-indexes',
      'List all indexes in the Meilisearch instance',
      {
        limit: z.number().min(1).max(100).optional().describe('Maximum number of indexes to return'),
        offset: z.number().min(0).optional().describe('Number of indexes to skip'),
      },
      async ({ limit, offset }: ListIndexesParams) => {
        try {
          const response = await apiClient.get('/indexes', {
            params: {
              limit,
              offset,
            },
          });
          return {
            content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }],
          };
        } catch (error) {
          return createErrorResponse(error);
        }
      }
    );
  • src/index.ts:64-64 (registration)
    Top-level registration call that invokes registerIndexTools to add index management tools (including list-indexes) to the main MCP server.
    registerIndexTools(server);
  • TypeScript interface defining parameters for the list-indexes tool handler.
    interface ListIndexesParams {
      limit?: number;
      offset?: number;
    }
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 offers minimal behavioral insight. It states it lists indexes but doesn't cover critical aspects like whether it's a read-only operation (implied but not stated), pagination behavior (hinted by parameters but not explained), error conditions, or authentication requirements. This leaves significant gaps for a tool with potential operational implications.

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, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration, perfectly balancing brevity with clarity.

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 tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the output looks like (e.g., list format, index metadata included), error handling, or dependencies like required permissions. Given the complexity of interacting with a search engine instance, more context is needed for reliable agent use.

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 parameters 'limit' and 'offset' are fully documented in the schema. The description adds no additional parameter semantics beyond implying a listing operation, which aligns with the schema. This meets the baseline for high schema coverage without enhancing understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all indexes in the Meilisearch instance'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get-index' (which retrieves a specific index) or 'stats' (which might include index statistics), leaving room for slight ambiguity in sibling context.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like checking index existence before operations, comparing with 'get-index' for single-index details, or using 'stats' for broader instance metrics, leaving the agent to infer usage from context alone.

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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

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