Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-pagination

Retrieve pagination configuration for a Meilisearch index to control 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 fetches the pagination settings from the Meilisearch API endpoint `/indexes/${indexUid}/settings/pagination` using the shared endpoint variable set to 'pagination' for this tool.
    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, requiring an 'indexUid' string parameter.
    {
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Configuration object in the specificSettingsTools array that defines the 'get-pagination' tool's name, endpoint ('pagination'), and description for dynamic registration via the forEach loop.
    {
      name: "get-pagination",
      endpoint: "pagination",
      description: "Get the pagination setting",
    },
  • Dynamic registration loop that registers the 'get-pagination' tool (and others) by calling server.tool with the configuration from the specificSettingsTools array.
    // 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);
          }
        }
      );
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Get the pagination setting', implying a read-only operation, but doesn't disclose behavioral traits such as required permissions, rate limits, error handling, or what the output looks like (e.g., JSON structure). For a tool with zero annotation coverage, this is a significant gap in transparency.

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: 'Get the pagination setting'. It's front-loaded with the core action and resource, with zero wasted words. This is appropriately sized for a simple tool, making it easy to parse quickly.

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 'pagination setting' includes (e.g., page size, max results), how it's returned, or potential side effects. Without structured data to compensate, the description fails to provide sufficient context for effective use.

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 input schema has 100% description coverage, with 'indexUid' documented as 'Unique identifier of the index'. The description adds no additional meaning beyond this, as it doesn't explain parameter usage or constraints. Given high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles parameter semantics without description enhancement.

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

Purpose3/5

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

The description 'Get the pagination setting' states the action (get) and resource (pagination setting), providing a basic purpose. However, it's vague about what 'pagination setting' entails (e.g., current configuration, limits, defaults) and doesn't distinguish from siblings like 'update-pagination' or 'reset-pagination', which handle modifications. This leaves room for ambiguity in understanding the exact function.

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

Usage Guidelines2/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 prerequisites (e.g., needing an existing index), exclusions, or compare to siblings like 'get-settings' (which might include pagination) or 'update-pagination' for changes. The agent must infer usage from context, lacking explicit direction.

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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

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