Skip to main content
Glama
ohankay

mongo-mcp-simple

by ohankay

create_index

Builds MongoDB indexes on chosen fields to speed queries and enforce uniqueness; supports TTL and partial filters for targeted index management.

Instructions

Create an index. keys: {"customerId": 1, "createdAt": -1} or {"title": "text"} / {"loc": "2dsphere"}. expire_after_seconds makes a TTL index; partial_filter is a filter expression.

Input Schema

NameRequiredDescriptionDefault
keysYes
nameNo
sparseNo
uniqueNo
databaseNo
collectionYes
connectionNo
partial_filterNo
expire_after_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare this is not read-only and not destructive; the description adds that TTL indexes and partial filters are expressible, which is real behavioral context. However, it says nothing about what happens if an identical index already exists, whether creation blocks on large collections, or permission requirements — meaningful gaps for a mutating, 9-parameter operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences, front-loaded with the action then the key syntax, every clause doing work. The nested-quote formatting is slightly awkward but nothing is redundant.

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?

It documents the two hardest concepts (keys syntax, TTL/partial filter) but leaves six of nine parameters — name, sparse, unique, database, collection, connection — entirely undescribed, and there's no output schema or annotation detail to fall back on. For a 9-param mutation tool, that leaves the definition only partially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the keys parameter lacks even a type in the schema, so the description's concrete spec examples ({"customerId": 1, "createdAt": -1}, {"title": "text"}, {"loc": "2dsphere"}) plus the explanation of expire_after_seconds and partial_filter carry the full burden and do so with real specificity.

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?

Specific verb+resource ("Create an index") with concrete key-spec examples that clarify what an index spec looks like in this tool's idiom. It doesn't explicitly distinguish itself from siblings like drop_index or list_indexes, but the action 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?

No statement of when to create an index versus alternatives, no prerequisites (permissions, connection/database selection), and no guidance on how it interacts with drop_index or list_indexes. Usage is only implied by the verb.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.