Skip to main content
Glama
officialpraise

MongoDB MCP Server

create-index

Create indexes for MongoDB collections to improve query performance and enable efficient data retrieval.

Instructions

Create an index for a collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name
nameNoThe name of the index
definitionYesThe index definition. Use 'classic' for standard indexes.
Behavior3/5

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

Annotations indicate this is a non-readOnly, non-destructive operation (readOnlyHint=false, destructiveHint=false), which the description doesn't contradict. The description adds minimal behavioral context beyond annotations—it doesn't specify performance impact, permissions needed, or what happens if the index already exists. With annotations covering safety, this meets baseline expectations.

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's front-loaded and wastes no space, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, 100% schema coverage, and annotations covering safety, the description is minimally adequate. However, it lacks output information (no output schema) and doesn't address key behavioral aspects like error conditions or indexing best practices, leaving gaps in completeness.

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 all parameters are documented in the schema. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't explain index types or usage scenarios). This meets the baseline score for high schema coverage.

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 ('index for a collection'), making the purpose immediately understandable. It distinguishes from siblings like 'drop-index' (deletion) and 'collection-indexes' (listing), but doesn't explicitly differentiate from other creation tools like 'create-collection' beyond the resource type.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., existing database/collection), when indexing is beneficial, or when to choose this over other indexing-related tools like 'drop-index' or 'collection-indexes'.

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/officialpraise/mcp'

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