Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-pagination

Retrieve pagination configuration for a Meilisearch index to manage how search results are divided into pages.

Instructions

Get the pagination setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function that executes the get-pagination tool by fetching pagination settings from the Meilisearch API endpoint `/indexes/{indexUid}/settings/pagination`. Uses shared logic from the specificSettingsTools registration loop.
    async ({ indexUid }) => {
      try {
        const response = await apiClient.get(`/indexes/${indexUid}/settings/${endpoint}`);
        return {
          content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }],
        };
      } catch (error) {
        return createErrorResponse(error);
      }
  • Input schema for the get-pagination tool, validated using Zod. Requires `indexUid` parameter.
    {
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Configuration object in specificSettingsTools array that defines the tool name, endpoint, and description for dynamic registration of the get-pagination tool.
    {
      name: "get-pagination",
      endpoint: "pagination",
      description: "Get the pagination setting",
    },
  • Dynamic registration loop using server.tool() for all specific get-settings tools, including get-pagination.
    // Create a tool for each specific setting
    specificSettingsTools.forEach(({ name, endpoint, description }) => {
      server.tool(
        name,
        description,
        {
          indexUid: z.string().describe("Unique identifier of the index"),
        },
        async ({ indexUid }) => {
          try {
            const response = await apiClient.get(`/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 get-pagination.
    registerSettingsTools(server);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get' implies a read operation, but doesn't clarify if it's safe, requires permissions, returns structured data, or has side effects. For a tool with zero annotation coverage, this is inadequate as it misses key behavioral details like response format or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, making it appropriately sized and front-loaded. It directly states the tool's action without unnecessary elaboration, earning full marks for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a configuration retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what the pagination setting includes (e.g., page size, limits) or the return format, leaving gaps in understanding how to interpret results or handle errors.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no meaning beyond the input schema, which has 100% coverage for the single parameter 'indexUid'. Since schema coverage is high, the baseline score is 3, as the schema already documents the parameter adequately without needing extra details from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get the pagination setting' restates the tool name 'get-pagination' almost verbatim, making it tautological. It specifies the verb 'Get' and resource 'pagination setting' but lacks specificity about what 'pagination setting' entails (e.g., configuration, limits, or behavior) and doesn't distinguish it from sibling tools like 'reset-pagination' or 'update-pagination'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention related tools like 'reset-pagination' or 'update-pagination', nor does it specify prerequisites or contexts for usage, such as checking settings before modification or after a reset.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/devlimelabs/meilisearch-ts-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server