Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-faceting

Retrieve faceting configuration for a Meilisearch index to understand how search results are categorized and filtered.

Instructions

Get the faceting setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Handler function that fetches the faceting settings from the Meilisearch API for the specified index UID using the /faceting endpoint.
    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-faceting tool, requiring an indexUid string.
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Configuration object defining the get-faceting tool name, endpoint, and description within the specificSettingsTools array.
    {
      name: "get-faceting",
      endpoint: "faceting",
      description: "Get the faceting setting",
    },
  • The forEach loop that registers all specific get-settings tools, including get-faceting, by calling server.tool with the handler and schema.
    // 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 registration call that invokes registerSettingsTools on the MCP server instance, thereby registering the get-faceting tool.
    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. '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.

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