Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-sortable-attributes

Retrieve the list of sortable attributes for a specific index in Meilisearch to manage and optimize search results effectively. Supports structured data handling via the MCP interface.

Instructions

Get the sortable attributes setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function that implements the core logic for the 'get-sortable-attributes' tool by calling the Meilisearch API to fetch the sortable-attributes setting for the given 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); } }
  • Input schema using Zod to validate the indexUid parameter.
    { indexUid: z.string().describe("Unique identifier of the index"), },
  • Configuration object defining the tool's name, endpoint, and description within the specificSettingsTools array.
    { name: "get-sortable-attributes", endpoint: "sortable-attributes", description: "Get the sortable attributes setting", },
  • src/index.ts:67-67 (registration)
    Top-level registration call that invokes the settings tools registration, including 'get-sortable-attributes'.
    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