Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-synonyms

Retrieve synonyms configuration for a Meilisearch index to enhance search relevance by understanding alternative terms users might use.

Instructions

Get the synonyms setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • Core handler function for the 'get-synonyms' tool (shared with other specific settings getters). Retrieves synonyms settings from Meilisearch API at `/indexes/${indexUid}/settings/synonyms` using apiClient, formats response as JSON text, or returns formatted error.
    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 using Zod for the 'get-synonyms' tool: requires 'indexUid' as a string.
    {
      indexUid: z.string().describe("Unique identifier of the index"),
    },
  • Configuration entry in specificSettingsTools array defining name, endpoint ('synonyms'), and description for dynamic registration of 'get-synonyms' tool.
    {
      name: "get-synonyms",
      endpoint: "synonyms",
      description: "Get the synonyms setting",
    },
  • Dynamic registration loop that calls server.tool() for each tool in specificSettingsTools, including 'get-synonyms', providing schema, handler, etc.
    // 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 to registerSettingsTools(server), which dynamically registers the 'get-synonyms' tool and other settings tools.
    registerSettingsTools(server);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get the synonyms setting' implies a read operation, but it doesn't specify whether this requires authentication, has rate limits, returns structured data, or involves side effects. For a tool with zero annotation coverage, this leaves critical behavioral traits undocumented.

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, straightforward sentence with zero wasted words. It's front-loaded and efficiently communicates the core action, though it lacks depth. This meets the criteria for conciseness perfectly.

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 no annotations, no output schema, and a simple single-parameter input, the description is incomplete. It doesn't explain what 'synonyms setting' entails (e.g., a configuration object or list), potential error conditions, or return format. For a tool in a context with many sibling operations, more context is needed to guide effective use.

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' documented as 'Unique identifier of the index'. The description adds no additional meaning about this parameter (e.g., format examples or where to find it). With high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't detract.

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 synonyms setting' is essentially a tautology that restates the tool name 'get-synonyms' with minimal elaboration. It specifies the verb 'Get' and resource 'synonyms setting' but lacks specificity about what this entails (e.g., retrieving configuration, list of synonym pairs, or status). Compared to siblings like 'update-synonyms' or 'reset-synonyms', it doesn't clearly differentiate its read-only nature beyond the verb 'Get'.

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-synonyms' or 'reset-synonyms', or indicate scenarios for usage (e.g., checking current configuration before making changes). The agent must infer usage from the tool name alone.

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