Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

list-indexes

Retrieve a paginated list of all indexes in a Meilisearch instance, enabling efficient management and oversight of search data structures.

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

  • Handler function that lists all indexes in the Meilisearch instance by calling the API endpoint '/indexes' with optional limit and offset parameters, returning the JSON response or an 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 schema defining the input parameters for the 'list-indexes' tool: optional limit (1-100) and offset (>=0).
    { 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'), },
  • MCP server.tool registration for 'list-indexes', including name, description, input schema, and inline handler function.
    '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)
    Invocation of registerIndexTools on the MCP server instance, which registers the 'list-indexes' tool among others.
    registerIndexTools(server);
  • TypeScript type definition for the parameters used in the 'list-indexes' 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/devlimelabs/meilisearch-ts-mcp'

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