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);
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 doesn't elaborate on critical aspects like authentication requirements, rate limits, error conditions, or what the output might contain (e.g., JSON structure). For a tool with zero annotation coverage, this is insufficient to inform safe and effective use.

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 faceting setting'), which is front-loaded and wastes no words. For a simple retrieval tool, this brevity is appropriate and efficient, making it easy for an agent to parse quickly without 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 (a read operation with one parameter) and the absence of both annotations and an output schema, the description is incomplete. It fails to compensate for missing structured data by not explaining behavioral traits (e.g., safety, output format) or usage context. While the schema covers the parameter, the overall tool understanding remains shallow, which could hinder effective agent invocation.

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 (the 'indexUid' parameter is fully documented in the schema), so the baseline score is 3. The description adds no additional meaning about parameters beyond what the schema provides—it doesn't explain the significance of 'indexUid' in the context of faceting or provide examples. This meets the minimum viable standard given the comprehensive schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get the faceting setting' clearly states the action (get) and resource (faceting setting), making the purpose understandable. However, it's somewhat vague about what 'faceting setting' specifically entails compared to siblings like 'update-faceting' or 'reset-faceting', and it doesn't distinguish itself from related tools like 'facet-search' or 'get-filterable-attributes' which might involve faceting concepts.

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. It doesn't mention prerequisites (e.g., needing an existing index), contrast with siblings like 'update-faceting' for modification or 'reset-faceting' for defaults, or specify use cases (e.g., checking current configuration before changes). This leaves the agent with minimal context for tool selection.

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