Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-index

Retrieve detailed information about a specific Meilisearch index, including its configuration, statistics, and status, to manage and monitor search functionality.

Instructions

Get information about a specific Meilisearch index

Input Schema

NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "indexUid": { "description": "Unique identifier of the index", "type": "string" } }, "required": [ "indexUid" ], "type": "object" }

Implementation Reference

  • The asynchronous handler function for the 'get-index' tool. It fetches information about a specific Meilisearch index using the apiClient and returns the JSON response or an error.
    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); } }
  • Input schema for the 'get-index' tool, defining the required 'indexUid' parameter using Zod.
    { indexUid: z.string().describe('Unique identifier of the index'), },
  • Registers the 'get-index' tool with the MCP server using server.tool(), specifying name, description, schema, and handler.
    server.tool( '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); } } );
  • TypeScript interface used to type the parameters in the handler function.
    interface GetIndexParams { indexUid: string; }
  • src/index.ts:64-64 (registration)
    Top-level registration call that invokes registerIndexTools to add index tools (including 'get-index') to the main MCP server instance.
    registerIndexTools(server);

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