Skip to main content
Glama
OrionPotter

Meilisearch MCP Server

by OrionPotter

create-index

Create a new Meilisearch index with a unique identifier and optional primary key to organize searchable data.

Instructions

Create a new Meilisearch index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexUidYesUnique identifier for the new index
primaryKeyNoPrimary key for the index

Implementation Reference

  • Primary registration of the 'create-index' tool with MCP server, including Zod input schema validation and the inline asynchronous handler function that executes the tool logic by making a POST request to the Meilisearch '/indexes' API endpoint.
    server.tool(
      'create-index',
      'Create a new Meilisearch index',
      {
        indexUid: z.string().describe('Unique identifier for the new index'),
        primaryKey: z.string().optional().describe('Primary key for the index'),
      },
      async ({ indexUid, primaryKey }: CreateIndexParams) => {
        try {
          const response = await apiClient.post('/indexes', {
            uid: indexUid,
            primaryKey,
          });
          return {
            content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }],
          };
        } catch (error) {
          return createErrorResponse(error);
        }
      }
    );
  • TypeScript type definition for the parameters accepted by the 'create-index' tool handler.
    interface CreateIndexParams {
      indexUid: string;
      primaryKey?: string;
    }
  • src/index.ts:64-64 (registration)
    Top-level registration call that invokes the index tools module registration, thereby making the 'create-index' tool available on the MCP server.
    registerIndexTools(server);
Behavior2/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. It states the tool creates an index but doesn't mention whether this is a mutating operation, what permissions are required, whether it's idempotent, what happens on conflicts, or what the response looks like. For a creation 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 a single, clear sentence with zero wasted words. It's front-loaded with the essential information (create + resource) and contains no unnecessary elaboration. This is an excellent example of concise tool documentation.

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 creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after creation (e.g., does it return the index object?), what errors might occur, or behavioral constraints. Given the complexity of creating a database/index resource, more context about the operation's effects and requirements 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%, so both parameters (indexUid, primaryKey) are documented in the schema. The description adds no additional parameter information beyond what the schema already provides. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ('Create') and resource ('new Meilisearch index'), making the purpose immediately understandable. It doesn't explicitly distinguish from sibling tools like 'update-index' or 'swap-indexes', but the verb 'Create' implies initial creation rather than modification or exchange.

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 like 'update-index' or 'swap-indexes'. There's no mention of prerequisites (e.g., whether an index must not already exist), typical use cases, or constraints. 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/OrionPotter/iflow-mcp_meilisearch-ts-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server