Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

reset-displayed-attributes

Restore default displayed attributes for a Meilisearch index to control which fields appear in search results.

Instructions

Reset the displayed attributes setting to its default value

Input Schema

NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "indexUid": { "description": "Unique identifier of the index", "type": "string" } }, "required": [ "indexUid" ], "type": "object" }

Implementation Reference

  • The handler function for the reset-displayed-attributes tool (shared with other reset tools), which performs a DELETE request to `/indexes/${indexUid}/settings/${endpoint}` (endpoint='displayed-attributes') using the apiClient and returns the response or error.
    async ({ indexUid }) => { try { const response = await apiClient.delete(`/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 reset-displayed-attributes tool (shared): requires 'indexUid' parameter as a string describing the unique identifier of the index.
    { indexUid: z.string().describe("Unique identifier of the index"), },
  • Specific configuration object in the resetSettingsTools array defining the tool name 'reset-displayed-attributes', its endpoint 'displayed-attributes', and description.
    { name: "reset-displayed-attributes", endpoint: "displayed-attributes", description: "Reset the displayed attributes setting to its default value", },
  • forEach loop over resetSettingsTools configurations that registers each tool by calling server.tool(name, description, schema, handler), including the reset-displayed-attributes tool.
    resetSettingsTools.forEach(({ name, endpoint, description }) => { server.tool( name, description, { indexUid: z.string().describe("Unique identifier of the index"), }, async ({ indexUid }) => { try { const response = await apiClient.delete(`/indexes/${indexUid}/settings/${endpoint}`); return { content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }], }; } catch (error) { return createErrorResponse(error); } } ); });

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