Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

reset-ranking-rules

Restore default ranking rules for a Meilisearch index to reset search result ordering.

Instructions

Reset the ranking rules setting to its default value

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function that executes the reset-ranking-rules tool. It sends a DELETE request to the Meilisearch API at `/indexes/{indexUid}/settings/ranking-rules` (where endpoint='ranking-rules') to reset the ranking rules to default.
    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 validation using Zod for the reset-ranking-rules tool, specifying the required indexUid parameter.
    indexUid: z.string().describe("Unique identifier of the index"), }, async ({ indexUid }) => {
  • Specific configuration object within the resetSettingsTools array that defines the name, endpoint, and description for registering the reset-ranking-rules tool.
    { name: "reset-ranking-rules", endpoint: "ranking-rules", description: "Reset the ranking rules setting to its default value", },
  • Registration code block: the forEach loop over resetSettingsTools that calls server.tool() to register each reset tool, including reset-ranking-rules, with its specific name, description, shared schema, and handler.
    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