reset-stop-words
Restores default stop words for a Meilisearch index to improve search relevance by removing common words from filtering.
Instructions
Reset the stop words 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 implements the reset-stop-words tool logic by sending a DELETE request to the Meilisearch API endpoint for stop-words settings.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 using Zod.{ indexUid: z.string().describe("Unique identifier of the index"), },
- src/tools/settings-tools.ts:279-283 (registration)Configuration object in the resetSettingsTools array that specifies the name 'reset-stop-words', its endpoint, and description for registration.{ name: "reset-stop-words", endpoint: "stop-words", description: "Reset the stop words setting to its default value", },
- src/tools/settings-tools.ts:312-330 (registration)Registration loop that dynamically registers the 'reset-stop-words' tool (and others) on the MCP server using the configuration from the array, including 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); } } ); });