Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

update-stop-words

Modify stop words for a Meilisearch index to control which common words are ignored during searches, improving search relevance by excluding non-essential terms.

Instructions

Update the stop words setting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index
valueYesJSON value for the setting

Implementation Reference

  • Handler function that parses the input value as JSON and sends a PUT request to the Meilisearch API endpoint for updating stop-words (and other specific settings).
    async ({ indexUid, value }) => {
      try {
        // Parse the value string to ensure it's valid JSON
        const parsedValue = JSON.parse(value);
        
        const response = await apiClient.put(`/indexes/${indexUid}/settings/${endpoint}`, parsedValue);
        return {
          content: [{ type: "text", text: JSON.stringify(response.data, null, 2) }],
        };
      } catch (error) {
        return createErrorResponse(error);
      }
    }
  • Zod input schema defining parameters: indexUid (string) and value (JSON string for the stop-words list).
    {
      indexUid: z.string().describe("Unique identifier of the index"),
      value: z.string().describe("JSON value for the setting"),
    },
  • Configuration entry in the updateSettingsTools array that specifies the tool name 'update-stop-words', its API endpoint 'stop-words', and description; used by the registration loop.
    {
      name: "update-stop-words",
      endpoint: "stop-words",
      description: "Update the stop words setting",
    },
  • forEach loop that registers all specific update tools, including 'update-stop-words', by calling server.tool with dynamic name, shared schema, and shared handler.
    // Create an update tool for each specific setting
    updateSettingsTools.forEach(({ name, endpoint, description }) => {
      server.tool(
        name,
        description,
        {
          indexUid: z.string().describe("Unique identifier of the index"),
          value: z.string().describe("JSON value for the setting"),
        },
        async ({ indexUid, value }) => {
          try {
            // Parse the value string to ensure it's valid JSON
            const parsedValue = JSON.parse(value);
            
            const response = await apiClient.put(`/indexes/${indexUid}/settings/${endpoint}`, parsedValue);
            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 which includes the registration of 'update-stop-words' among other settings tools.
    registerSettingsTools(server);
Behavior1/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers none. It doesn't indicate whether this is a read-only or destructive operation, what permissions are required, how it affects search behavior, whether changes are immediate or asynchronous, or what happens on failure. For a mutation tool, this lack of transparency is critical.

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—a single sentence with no wasted words. It's front-loaded with the core action and resource. While under-specified, it's not verbose or poorly structured, earning full marks for conciseness.

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 updating a search configuration setting, the lack of annotations, and no output schema, the description is incomplete. It doesn't explain what stop words are, how they impact search, what the expected JSON format is, or what the tool returns. For a mutation tool with no behavioral context, this is inadequate.

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, with clear documentation for both parameters ('indexUid' and 'value'). The description adds no additional meaning beyond the schema—it doesn't explain what 'stop words' are, what format the JSON value should take, or provide examples. Given the high schema coverage, the baseline score of 3 is appropriate.

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 'Update the stop words setting' is a tautology that essentially restates the tool name 'update-stop-words' with minimal elaboration. It identifies the action ('update') and resource ('stop words setting'), but lacks specificity about what stop words are, what this setting controls, or how it differs from sibling tools like 'get-stop-words' or 'reset-stop-words'. The purpose is vague beyond the obvious.

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 (e.g., needing an existing index), contrast with sibling tools (e.g., 'reset-stop-words' for clearing vs. 'update-stop-words' for setting), or specify appropriate contexts (e.g., during search configuration). This leaves the agent with no usage direction.

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