Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-distinct-attribute

Retrieve the distinct attribute setting for a Meilisearch index to control how duplicate results are handled in search queries.

Instructions

Get the distinct attribute setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Configuration object defining the 'get-distinct-attribute' tool, including its name, endpoint, and description, used in the registration loop.
    {
      name: "get-distinct-attribute",
      endpoint: "distinct-attribute",
      description: "Get the distinct attribute setting",
    },
  • Input schema for the 'get-distinct-attribute' tool: requires indexUid as string.
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Handler function that executes the tool logic: fetches the distinct-attribute setting from the Meilisearch API endpoint and returns the JSON response, or error.
    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);
      }
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the action ('Get'), implying a read-only operation, but fails to detail aspects like authentication needs, rate limits, error conditions, or the format of the returned setting. This leaves significant gaps in understanding how the tool behaves.

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

Conciseness3/5

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

The description is a single, concise sentence, but it is under-specified rather than efficiently informative. It lacks front-loaded critical details, such as clarifying what 'distinct attribute' means in this context, reducing its effectiveness despite brevity.

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 managing index settings and the absence of both annotations and an output schema, the description is incomplete. It does not explain what a 'distinct attribute setting' is, how it's used, or what the return value looks like, making it inadequate for an agent to use the tool effectively without external knowledge.

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' clearly documented as 'Unique identifier of the index'. The description adds no additional meaning beyond this, as it does not mention parameters at all. According to guidelines, a baseline score of 3 is appropriate when schema coverage is high (>80%).

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 distinct attribute setting' restates the tool name with minimal elaboration, making it a tautology. It specifies a verb ('Get') and resource ('distinct attribute setting'), but lacks specificity about what this setting entails or how it differs from related tools like 'reset-distinct-attribute' or 'update-distinct-attribute'.

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. The description does not mention prerequisites, context, or comparisons to sibling tools such as 'get-settings' (which might include this attribute) or 'reset-distinct-attribute', leaving the agent without usage direction.

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