Skip to main content
Glama

suggest_mongo_index

Generates MongoDB createIndex command for a field, including compound and text variants, plus an explain query to verify index usage. Use when a collection scan is detected or when filtering on an unindexed field.

Instructions

Generates the exact db.collection.createIndex() command for a MongoDB field, plus compound and text index variants and an explain query to verify. Call this when a collection scan is flagged by the analyzer or when writing a query that filters on an unindexed field. Does not check whether the index already exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionYesMongoDB collection name
fieldYesField name to index
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses that tool does not check if index already exists, and that it generates rather than executes commands. This provides useful behavioral context.

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?

Two sentences, front-loaded with main output and potential variants, then usage guideline, then limitation. No wasted words.

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

Completeness5/5

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

Given only 2 required string parameters and no output schema, the description provides all necessary context: output format, usage triggers, and a known limitation. Fully complete for its complexity.

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 coverage is 100% with descriptions for both parameters (collection and field). Description adds little beyond schema, but baseline of 3 is appropriate as schema carries the load.

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

Purpose5/5

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

Clearly states it generates the exact db.collection.createIndex() command for MongoDB fields, including compound, text variants, and explain query. Distinct from database-specific siblings (mysql_index_suggestions, postgres_index_suggestions, suggest_gsi).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear when-to-use scenarios: when collection scan is flagged or when filtering on unindexed field. Does not explicitly mention alternatives but context is sufficient given sibling differentiation.

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/Sidd27/infrawise'

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