Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-sortable-attributes

Retrieve sortable attributes from a Meilisearch index to configure search result ordering options.

Instructions

Get the sortable attributes setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • The handler function that executes the get-sortable-attributes tool. It retrieves the sortable attributes setting from the Meilisearch API for the specified index using the 'sortable-attributes' endpoint and returns the result as formatted JSON.
    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);
      }
    }
  • The input schema for the get-sortable-attributes tool, defining the required 'indexUid' parameter.
    {
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • The configuration object used to dynamically register the get-sortable-attributes tool in the specificSettingsTools array, which is processed by a forEach loop to call server.tool for each tool.
    {
      name: "get-sortable-attributes",
      endpoint: "sortable-attributes",
      description: "Get the sortable attributes setting",
    },
  • src/index.ts:67-67 (registration)
    Top-level call to registerSettingsTools, which in turn registers the get-sortable-attributes tool (among others) with the MCP server.
    registerSettingsTools(server);
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states the action without any information on permissions, rate limits, side effects, or response format. For a read operation, it fails to clarify if it's safe, what data it returns, or any constraints, leaving the agent with insufficient behavioral understanding.

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 that directly states the tool's function without unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured for quick comprehension.

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 lack of annotations and output schema, the description is incomplete for a tool that likely returns configuration data. It does not explain what sortable attributes are, the format of the response, or how this tool fits into broader settings management. For a read operation with no structured support, more context is needed to guide the agent effectively.

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 the single parameter 'indexUid' clearly documented as 'Unique identifier of the index'. The description adds no additional meaning beyond this, so it meets the baseline score of 3, as the schema adequately covers parameter semantics without needing extra explanation 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 sortable attributes setting' restates the tool name with minimal elaboration, making it tautological. It specifies the verb 'Get' and resource 'sortable attributes setting' but lacks detail on what sortable attributes are or how they differ from other attribute types like filterable or searchable attributes, which are available as sibling tools. This provides basic purpose but fails to distinguish meaningfully from related tools.

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?

The description offers no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'get-filterable-attributes' or 'get-searchable-attributes', nor does it explain the context for retrieving sortable attributes specifically. Without any usage context or exclusions, the agent has no basis for selecting this tool appropriately among similar options.

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