Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

update-displayed-attributes

Modify the displayed attributes setting in Meilisearch by specifying the index identifier and JSON value, enabling precise control over visible fields in search results.

Instructions

Update the displayed attributes setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index
valueYesJSON value for the setting

Implementation Reference

  • Shared handler function for updating specific settings, including 'update-displayed-attributes'. Parses the JSON value and sends a PUT request to the Meilisearch API endpoint /indexes/{indexUid}/settings/displayed-attributes.
    async ({ indexUid, value }) => { try { // Parse the value string to ensure it's valid JSON const parsedValue = JSON.parse(value); const response = await apiClient.put(`/indexes/${indexUid}/settings/${endpoint}`, parsedValue); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } }
  • Input schema using Zod: indexUid (string) and value (string containing JSON for the new setting value).
    { indexUid: z.string().describe("Unique identifier of the index"), value: z.string().describe("JSON value for the setting"), },
  • Configuration object in updateSettingsTools array that defines the tool name, endpoint, and description, used in the forEach loop to register the tool via server.tool().
    { name: "update-displayed-attributes", endpoint: "displayed-attributes", description: "Update the displayed attributes setting", },

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