Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

list-indexes

Retrieve all indexes from a Meilisearch instance to manage and organize 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

  • Registers the 'list-indexes' MCP tool with server, including description, input schema, and inline handler function.
    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);
        }
      }
    );
  • Handler function for list-indexes tool: fetches indexes from Meilisearch /indexes endpoint with pagination params and returns formatted JSON response or error.
    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 listing indexes.
    {
      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'),
    },
  • src/index.ts:64-64 (registration)
    Top-level registration call that invokes registerIndexTools to add the list-indexes tool (among others) to the MCP server instance.
    registerIndexTools(server);
  • TypeScript interface defining parameters for the list-indexes handler.
    interface ListIndexesParams {
      limit?: number;
      offset?: number;
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'lists all indexes' but doesn't disclose behavioral traits like whether this is a paginated operation (implied by limit/offset parameters but not stated), what format the response takes, whether it requires authentication, or any rate limits. The description is minimal beyond the basic operation.

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 that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple list operation and front-loaded with the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list operation with 2 documented parameters and no output schema, the description is minimally adequate. However, without annotations and with no output schema, it should ideally provide more context about response format or behavioral constraints. The description covers the basic 'what' but leaves gaps in 'how' and 'what to expect'.

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%, with both parameters ('limit' and 'offset') well-documented in the schema. The description doesn't add any parameter semantics beyond what's already in the schema. According to guidelines, with high schema coverage (>80%), the baseline is 3 even with no param info in description.

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 action ('List all indexes') and resource ('in the Meilisearch instance'), providing specific verb+resource. However, it doesn't explicitly differentiate from sibling tools like 'get-index' or 'stats', which might also provide index information in different contexts.

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. With siblings like 'get-index' (for single index details), 'stats' (for instance statistics including indexes), and 'swap-indexes' (for index operations), there's no indication of when this list operation is preferred over other index-related tools.

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/devlimelabs/meilisearch-ts-mcp'

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