Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-filterable-attributes

Retrieve the filterable attributes configuration for a Meilisearch index to understand which fields can be used for filtering search results.

Instructions

Get the filterable attributes setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • The handler function that implements the logic for the "get-filterable-attributes" tool. It makes an API call to retrieve the filterable attributes setting from Meilisearch for the given indexUid, using the endpoint "filterable-attributes".
    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-filterable-attributes" tool, defining the required indexUid parameter.
    {
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Configuration object in the specificSettingsTools array used to register the "get-filterable-attributes" tool.
    {
      name: "get-filterable-attributes",
      endpoint: "filterable-attributes",
      description: "Get the filterable attributes setting",
    },
  • The forEach loop that dynamically registers the "get-filterable-attributes" tool (and other specific settings getters) on the MCP server using server.tool.
    // 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);
          }
        }
      );
    });

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2/5.0
Behavior1/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Get' which implies a read operation, but doesn't clarify whether this requires authentication, has rate limits, returns structured data, or has any side effects. For a tool with no annotation coverage, this minimal description is inadequate.

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

Conciseness4/5

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

The description is extremely concise with just one sentence. While this could be seen as efficient, it's arguably under-specified rather than appropriately concise. However, it doesn't waste words or have structural issues, so it earns a decent score for 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 the tool ecosystem (many sibling tools), no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what 'filterable attributes' are, what format they return in, or how this tool fits into the broader Meilisearch API context. The agent would struggle to use this 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?

Schema description coverage is 100%, with the single parameter 'indexUid' clearly documented as 'Unique identifier of the index'. The description doesn't add any meaningful parameter information beyond what the schema already provides, so the baseline score of 3 is appropriate when the schema does the heavy lifting.

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 filterable attributes setting' is a tautology that essentially restates the tool name 'get-filterable-attributes' without adding meaningful specificity. It doesn't clarify what 'filterable attributes' are, what resource they belong to, or how this differs from sibling tools like 'get-searchable-attributes' or 'get-sortable-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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or when to choose this over related tools like 'get-settings' or 'update-filterable-attributes'. With many sibling tools available, this lack of differentiation is problematic.

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