reset-pagination
Reset pagination settings to default values for a Meilisearch index to restore standard search result display.
Instructions
Reset the pagination 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)Shared handler function for all reset-* tools, including reset-pagination. It deletes the specific settings endpoint (/indexes/{indexUid}/settings/pagination) via apiClient to reset to default values.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 for reset-pagination tool: requires indexUid as string.{ indexUid: z.string().describe("Unique identifier of the index"), },
- src/tools/settings-tools.ts:304-308 (registration)Configuration entry in resetSettingsTools array defining the name, endpoint, and description for the reset-pagination tool.{ name: "reset-pagination", endpoint: "pagination", description: "Reset the pagination setting to its default value", },
- src/tools/settings-tools.ts:312-330 (registration)Loop that dynamically registers the reset-pagination tool (and others) on the MCP server using server.tool() with the configuration from the array.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) which registers all settings tools including reset-pagination.registerSettingsTools(server);