Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-filterable-attributes

Retrieve filterable attributes for a specific index in Meilisearch, enabling structured data filtering for AI assistants via the Model Context Protocol.

Instructions

Get the filterable attributes setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Shared handler function that executes the get-filterable-attributes tool logic by fetching from the Meilisearch /filterable-attributes endpoint.
    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 definition for the get-filterable-attributes tool using Zod.
    { indexUid: z.string().describe("Unique identifier of the index"), },
  • Dynamic registration of the get-filterable-attributes tool via server.tool call in the loop over specificSettingsTools.
    // 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); } } ); });
  • Configuration object in specificSettingsTools array that defines the get-filterable-attributes tool for registration.
    { name: "get-filterable-attributes", endpoint: "filterable-attributes", description: "Get the filterable attributes setting", },
  • src/index.ts:67-67 (registration)
    Invocation of registerSettingsTools which registers the get-filterable-attributes tool among others.
    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