get-embedders
Retrieve the embedders configuration for a specific index in Meilisearch, enabling precise management of embedding settings for AI-driven search functionality.
Instructions
Get the embedders configuration for an index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indexUid | Yes | Unique identifier of the index |
Implementation Reference
- src/tools/vector-tools.ts:88-104 (registration)Registers the 'get-embedders' MCP tool. Includes schema for input (indexUid), and handler that calls Meilisearch API to retrieve embedders configuration for the specified index.server.tool( "get-embedders", "Get the embedders configuration for an index", { indexUid: z.string().describe("Unique identifier of the index"), }, async ({ indexUid }) => { try { const response = await apiClient.get(`/indexes/${indexUid}/settings/embedders`); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
- src/tools/vector-tools.ts:94-104 (handler)The handler function for 'get-embedders' tool that performs an API GET request to fetch embedders settings and returns the JSON response.async ({ indexUid }) => { try { const response = await apiClient.get(`/indexes/${indexUid}/settings/embedders`); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } );
- src/index.ts:68-68 (registration)Calls registerVectorTools which includes the registration of 'get-embedders' among other vector tools.registerVectorTools(server);