Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-index

Retrieve configuration and metadata for a specific Meilisearch index to manage search functionality and document organization.

Instructions

Get information about a specific Meilisearch index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function for the 'get-index' tool. Fetches specific index information from Meilisearch API using the provided indexUid and returns formatted JSON response or 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); } }
  • TypeScript interface defining the input parameters for the get-index tool.
    interface GetIndexParams { indexUid: string; }
  • Zod schema for input validation of the get-index tool.
    indexUid: z.string().describe('Unique identifier of the index'), },
  • Direct registration of the 'get-index' tool within the registerIndexTools function using server.tool().
    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); } } );
  • 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