reset-ranking-rules
Reset the ranking rules of a Meilisearch index to their default configuration, ensuring consistent search behavior by specifying the index's unique identifier.
Instructions
Reset the ranking rules setting to its default value
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| indexUid | Yes | Unique identifier of the index |
Implementation Reference
- src/tools/settings-tools.ts:319-328 (handler)Handler function that performs a DELETE request to `/indexes/{indexUid}/settings/ranking-rules` using apiClient to reset the ranking rules for the specified Meilisearch 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); } }
- src/tools/settings-tools.ts:316-318 (schema)Input schema defining the required 'indexUid' parameter as a string.{ indexUid: z.string().describe("Unique identifier of the index"), },
- src/tools/settings-tools.ts:274-278 (registration)Configuration object in resetSettingsTools array that specifies the name, endpoint, and description for the 'reset-ranking-rules' tool, used in the dynamic registration loop.{ name: "reset-ranking-rules", endpoint: "ranking-rules", description: "Reset the ranking rules setting to its default value", },
- src/tools/settings-tools.ts:312-330 (registration)Dynamic registration loop in registerSettingsTools function that calls server.tool for each reset tool, including 'reset-ranking-rules', with inline 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); } } ); });
- src/index.ts:67-67 (registration)Top-level call to registerSettingsTools(server) in the main MCP server initialization, which registers all settings tools including 'reset-ranking-rules'.registerSettingsTools(server);