get-index
Retrieve detailed information about a specific Meilisearch index, including its configuration and statistics, to manage search functionality effectively.
Instructions
Get information about a specific Meilisearch index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indexUid | Yes | Unique identifier of the index |
Implementation Reference
- src/tools/index-tools.ts:79-88 (handler)The handler function for the 'get-index' tool. It fetches detailed information about the specified Meilisearch index using the API client and returns a formatted JSON response or an error response.
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/tools/index-tools.ts:76-78 (schema)Zod input schema for the 'get-index' tool, defining the required 'indexUid' parameter.
{ indexUid: z.string().describe('Unique identifier of the index'), }, - src/tools/index-tools.ts:19-21 (schema)TypeScript interface defining the parameters for the 'get-index' tool handler.
interface GetIndexParams { indexUid: string; } - src/tools/index-tools.ts:74-89 (registration)Direct registration of the 'get-index' tool on the MCP server, including name, description, schema, and handler function.
'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)Invocation of registerIndexTools on the main MCP server instance, which registers the 'get-index' tool among others.
registerIndexTools(server);