Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

get-faceting

Retrieve faceting settings for a Meilisearch index to configure search result categorization and filtering options.

Instructions

Get the faceting setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function that executes the get-faceting tool logic: fetches faceting settings from Meilisearch API endpoint `/indexes/${indexUid}/settings/faceting` (where endpoint="faceting" from config).
    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 definition for get-faceting tool using Zod: requires indexUid as string.
    {
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Configuration object defining the get-faceting tool's name, endpoint ('faceting'), and description; used in forEach loop to register the tool.
    {
      name: "get-faceting",
      endpoint: "faceting",
      description: "Get the faceting setting",
    },
  • Registration loop that dynamically creates and registers the get-faceting tool (and others) using server.tool() with shared schema and handler templated on endpoint.
    // 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);
          }
        }
      );
    });
  • src/index.ts:67-67 (registration)
    Top-level call to registerSettingsTools(server) in main server setup, which includes registration of get-faceting.
    registerSettingsTools(server);

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.4/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. 'Get' implies a read operation, but the description doesn't specify whether this requires authentication, what permissions are needed, whether it returns current or default settings, or what format the response takes. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 at just three words with zero wasted language. It's front-loaded with the core action and resource. While it's under-specified in terms of content, it's perfectly efficient in form - every word serves a purpose.

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?

For a tool with no annotations, no output schema, and minimal description, this is incomplete. The agent knows it retrieves 'faceting setting' for an index but doesn't know what faceting settings are, what format they come in, whether this is a read-only operation, or what the typical use cases are. Given the complexity implied by having both 'get-faceting' and 'update-faceting' tools, more context would be helpful.

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% (the single parameter 'indexUid' is fully documented as 'Unique identifier of the index'), so the baseline score is 3. The description adds no additional parameter information beyond what the schema already provides - it doesn't explain why an indexUid is needed or how faceting settings relate to specific indexes.

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 faceting setting' is a tautology that essentially restates the tool name 'get-faceting'. It provides a verb ('Get') and resource ('faceting setting'), but doesn't specify what a 'faceting setting' actually is or what this operation retrieves. Compared to siblings like 'get-document' or 'get-settings', it doesn't clearly distinguish its specific purpose beyond the name.

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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when faceting settings would be needed, what prerequisites might exist, or how this differs from related tools like 'update-faceting' or 'reset-faceting'. The agent must infer usage from the name alone with no contextual help.

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