Natural Language Querying:
Users ask questions or request data in plain language. The agent translates these into Cosmos DB SQL queries.
Schema Discovery:
Before querying, the agent verifies the schema (e.g., SELECT TOP 1 * FROM c) to ensure accurate field selection and case normalization.
Query Execution:
The agent executes queries directly against the specified Cosmos DB database and container using the MCP server.
ReAct is recommended for straightforward queries and quick responses.
Reflection provides critique on the responses
DeepAgent provides more advanced planning and reasoning, suitable for complex tasks, but may result in longer response times.
1.
Use natural language: Describe what data you want in plain terms
2.
Be specific about filters: Mention conditions like "where status is active" or "created after 2024"
3.
Request aggregations clearly: "Count by category" or "Sum total by region"
4.
Provide context: Mention the type of documents stored (e.g., "user profiles", "order records")
Azure Subscription: Active subscription with Cosmos DB resources
Cosmos DB Account: e.g., cosmosdb-ejento-mcp-eastus-001
Database & Container: At least one database (e.g., SampleDB) and container (e.g., SampleContainer)
MCP Server Integration: MCP enabled for Cosmos DB
Permissions: Sufficient rights to list, query, and manage Cosmos DB resources