Skip to main content
Glama
devlimelabs

Meilisearch MCP Server

by devlimelabs

get-index

Retrieve detailed information about a specific Meilisearch index, including its configuration and statistics, to manage search functionality effectively.

Instructions

Get information about a specific Meilisearch index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier of the index

Implementation Reference

  • The handler function for the 'get-index' tool. It fetches detailed information about the specified Meilisearch index using the API client and returns a formatted JSON response or an error response.
    async ({ indexUid }: GetIndexParams) => {
      try {
        const response = await apiClient.get(`/indexes/${indexUid}`);
        return {
          content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }],
        };
      } catch (error) {
        return createErrorResponse(error);
      }
    }
  • Zod input schema for the 'get-index' tool, defining the required 'indexUid' parameter.
    {
      indexUid: z.string().describe('Unique identifier of the index'),
    },
  • TypeScript interface defining the parameters for the 'get-index' tool handler.
    interface GetIndexParams {
      indexUid: string;
    }
  • Direct registration of the 'get-index' tool on the MCP server, including name, description, schema, and handler function.
      'get-index',
      'Get information about a specific Meilisearch index',
      {
        indexUid: z.string().describe('Unique identifier of the index'),
      },
      async ({ indexUid }: GetIndexParams) => {
        try {
          const response = await apiClient.get(`/indexes/${indexUid}`);
          return {
            content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }],
          };
        } catch (error) {
          return createErrorResponse(error);
        }
      }
    );
  • src/index.ts:64-64 (registration)
    Invocation of registerIndexTools on the main MCP server instance, which registers the 'get-index' tool among others.
    registerIndexTools(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 states the tool retrieves information (implying a read-only operation), but doesn't clarify aspects like error handling (e.g., what happens if the index doesn't exist), response format, or any rate limits or authentication requirements. This leaves significant gaps for a tool that interacts with a database index.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly. There is no wasted verbiage or redundant information.

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 that retrieves information about a database index, the description is incomplete. With no annotations and no output schema, it fails to disclose critical behavioral aspects (e.g., error conditions, response structure) or differentiate from many sibling tools (e.g., 'get-settings', 'stats'). This lack of context makes it inadequate for informed tool selection by an AI agent.

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 the single parameter 'indexUid' clearly documented as the 'Unique identifier of the index'. The description adds no additional meaning beyond this, such as format examples or constraints (e.g., case sensitivity). Given the high schema coverage, a baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the action ('Get information') and the resource ('a specific Meilisearch index'), which distinguishes it from general index operations like 'list-indexes' or 'create-index'. However, it doesn't specify what type of information is retrieved (e.g., configuration, statistics, status), leaving some ambiguity compared to more detailed sibling tools like 'get-settings' or 'stats'.

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., the index must exist), differentiate from similar tools like 'list-indexes' (for multiple indices) or 'get-settings' (for specific configuration), or indicate typical use cases (e.g., checking index health or metadata).

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