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);
      }
    }
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 only states the action ('Get') without explaining what 'distinct attribute' entails, whether this is a read-only operation (implied but not explicit), potential side effects, error conditions, or output format. For a tool with zero annotation coverage, this leaves critical behavioral traits undocumented.

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 extremely concise with a single sentence, 'Get the distinct attribute setting', which is front-loaded and wastes no words. While it lacks detail, it efficiently communicates the core action without redundancy or unnecessary elaboration.

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 search index settings (implied by sibling tools) and the absence of annotations and output schema, the description is incomplete. It fails to explain what a 'distinct attribute' is, how it relates to search functionality, or what the return value includes, leaving significant gaps for an agent to understand the tool's role in the broader context.

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 parameter semantics beyond this, but since the schema fully covers the single parameter, a baseline score of 3 is appropriate as the description doesn't need to compensate for gaps.

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' is essentially a tautology that restates the tool name 'get-distinct-attribute' without adding meaningful specificity. It doesn't clarify what a 'distinct attribute' is in this context (e.g., a search index configuration) or what 'setting' refers to, leaving the purpose vague compared to more descriptive sibling tools like 'get-searchable-attributes'.

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?

There is no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing index), differentiate from similar tools like 'get-filterable-attributes' or 'reset-distinct-attribute', or specify use cases (e.g., configuring search behavior). This absence of context makes it hard for an agent to apply the tool correctly.

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