Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

update-embedders

Configure embedders for vector search in Meilisearch indexes to enable semantic search capabilities.

Instructions

Configure embedders for vector search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index
embeddersYesJSON object containing embedder configurations

Implementation Reference

  • The handler function for the 'update-embedders' tool. It parses the embedders JSON string, validates it's an object, and sends a PATCH request to update the embedders configuration for the specified index using apiClient.
    async ({ indexUid, embedders }) => { try { // Parse the embedders string to ensure it's valid JSON const parsedEmbedders = JSON.parse(embedders); // Ensure embedders is an object if (typeof parsedEmbedders !== 'object' || parsedEmbedders === null || Array.isArray(parsedEmbedders)) { return { isError: true, content: [{ type: "text", text: "Embedders must be a JSON object" }], }; } const response = await apiClient.patch(`/indexes/${indexUid}/settings/embedders`, parsedEmbedders); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
  • Zod schema defining the input parameters for the 'update-embedders' tool: indexUid (string) and embedders (string representing JSON object).
    { indexUid: z.string().describe("Unique identifier of the index"), embedders: z.string().describe("JSON object containing embedder configurations"), },
  • Direct registration of the 'update-embedders' tool using server.tool(), including name, description, schema, and handler.
    server.tool( "update-embedders", "Configure embedders for vector search", { indexUid: z.string().describe("Unique identifier of the index"), embedders: z.string().describe("JSON object containing embedder configurations"), }, async ({ indexUid, embedders }) => { try { // Parse the embedders string to ensure it's valid JSON const parsedEmbedders = JSON.parse(embedders); // Ensure embedders is an object if (typeof parsedEmbedders !== 'object' || parsedEmbedders === null || Array.isArray(parsedEmbedders)) { return { isError: true, content: [{ type: "text", text: "Embedders must be a JSON object" }], }; } const response = await apiClient.patch(`/indexes/${indexUid}/settings/embedders`, parsedEmbedders); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
  • src/index.ts:68-68 (registration)
    Calls registerVectorTools(server) which registers the 'update-embedders' tool among other vector tools.
    registerVectorTools(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