Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-index

Retrieve detailed information about a specific Meilisearch index by providing its unique identifier, enabling efficient index management and oversight.

Instructions

Get information about a specific Meilisearch index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • The handler function that executes the 'get-index' tool logic: fetches index information from the Meilisearch API using apiClient and returns a JSON-formatted response or handles errors with createErrorResponse.
    async ({ indexUid }: GetIndexParams) => { try { const response = await apiClient.get(`/indexes/${indexUid}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
  • Zod input schema for the 'get-index' tool, defining the required 'indexUid' parameter.
    indexUid: z.string().describe('Unique identifier of the index'), },
  • Direct registration of the 'get-index' tool using server.tool(), including name, description, schema, and handler.
    'get-index', 'Get information about a specific Meilisearch index', { indexUid: z.string().describe('Unique identifier of the index'), }, async ({ indexUid }: GetIndexParams) => { try { const response = await apiClient.get(`/indexes/${indexUid}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
  • src/index.ts:64-64 (registration)
    Top-level call to registerIndexTools which includes the 'get-index' tool registration on the main MCP server instance.
    registerIndexTools(server);
  • TypeScript interface defining the input parameters for the 'get-index' handler.
    interface GetIndexParams { indexUid: string; }

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