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; }

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