Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-typo-tolerance

Retrieve the typo tolerance setting for a specific index in Meilisearch to manage search accuracy and user experience. Supports efficient search configuration via the MCP Server.

Instructions

Get the typo tolerance setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function that executes the get-typo-tolerance tool: makes a GET request to the Meilisearch API for the index's typo-tolerance settings using the dynamic endpoint and returns the JSON-formatted response or error.
    async ({ indexUid }) => { try { const response = await apiClient.get(`/indexes/${indexUid}/settings/${endpoint}`); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
  • Input schema validation for the get-typo-tolerance tool using Zod: requires indexUid as a string.
    { indexUid: z.string().describe("Unique identifier of the index"), },
  • Configuration entry in specificSettingsTools array that defines the tool name, endpoint (/typo-tolerance), and description for dynamic registration of the get-typo-tolerance tool.
    { name: "get-typo-tolerance", endpoint: "typo-tolerance", description: "Get the typo tolerance setting", },
  • Dynamic registration loop for specific settings tools, including get-typo-tolerance, calling server.tool with shared schema and handler.
    // Create a tool for each specific setting specificSettingsTools.forEach(({ name, endpoint, description }) => { server.tool( name, description, { indexUid: z.string().describe("Unique identifier of the index"), }, async ({ indexUid }) => { try { const response = await apiClient.get(`/indexes/${indexUid}/settings/${endpoint}`); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } ); });
  • src/index.ts:67-67 (registration)
    Top-level call to registerSettingsTools on the MCP server instance, which includes registration of get-typo-tolerance.
    registerSettingsTools(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/devlimelabs/meilisearch-ts-mcp'

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