Skip to main content
Glama
Vijayakumar-DevOps

MongoDB MCP Server

create-index

Create an index on a MongoDB collection to improve query performance, supporting standard, vector, and Atlas Search indexes.

Instructions

Create an index for a collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoThe name of the index
databaseYesDatabase name
collectionYesCollection name
definitionYesThe index definition. Use 'classic' for standard indexes, 'vectorSearch' for vector search indexes, and 'search' for Atlas Search (lexical) indexes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYes
indexNameYes
indexTypeYes
collectionYes
Behavior2/5

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

The annotations (readOnlyHint=false, destructiveHint=false) indicate a write operation that is not destructive, and the description's 'create' is consistent with this. However, the description adds no additional behavioral context such as performance implications, permission requirements, or side effects like index building time. With annotations present, the description contributes no extra transparency.

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 concise sentence, 'Create an index for a collection', which is easily scannable and contains no redundant information. It is front-loaded with the action and every word earns its place.

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

Completeness4/5

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

Given the complex schema with multiple index types and an output schema, the brief description is supplemented by detailed structured data. However, the description alone does not convey the breadth of supported index types or usage nuances like search indexes requiring explicit user requests, though those are documented in the schema. Overall, the description is adequate but not rich.

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 schema provides 100% description coverage for all parameters, including detailed explanations for database, collection, name, and the complex definition array with its nested variants. The tool description itself mentions no parameters, but the schema already offers comprehensive semantics, so the baseline of 3 applies.

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 uses the specific verb 'create' with the resource 'index' and scopes it to 'a collection', clearly conveying the tool's primary action. It distinguishes from drop-index by stating the action, though it does not explicitly mention the different index types (classic, vectorSearch, search) which the schema details. Overall, the purpose is unambiguous.

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 collection-indexes or drop-index. It simply states the action without context about prerequisites, typical use cases, or situations where a different index-related tool should be used. This is a functional statement but lacks usage guidance.

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/Vijayakumar-DevOps/mongo-mcp-1.14.0'

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