A Cosmos DB connection gives an assistant read access to the documents in a container, through the SQL API. What a question costs to answer is not set by the question. It is set by the partition key, chosen once, probably years ago.
I am Benoit Pecqueur. I connect business systems to AI assistants for owners in Phoenix and Scottsdale. Cosmos DB shows up where a business runs on Azure and the data team needed a document store that scales. The scaling comes from the partition key, and the partition key is a business decision most owners never knew they made.
In Cosmos DB, the partition key is the model
Every container is split by one key. The choice of that key decides how queries route, and therefore what they cost.
If orders are partitioned by customer id, one customer's full history is one cheap read and the total revenue across all customers is an expensive scan. If they are partitioned by order date, last month's revenue is cheap and one customer's lifetime is expensive.
That is not a technical detail. It is the company's answer to the question: which question did the company expect to ask most? The partition key is the business model, written in a form nobody reads until the invoice arrives.
What a Cosmos DB connection reads
The connection I set up is read-only and runs against one configured database and container. It sees:
- Connection status
- A list of the containers in the configured database
- Sample-based insights about the container, meaning field shapes and sample values
- Distinct-value counts grouped by a field
- SELECT queries against the container
It never inserts, updates or deletes documents. The assistant reads. It does not reshape the database. Partition keys and request units are not in that list, so I read them in the Azure portal.
The cross question with a price tag
What a cross partition question costs to answer.
A single partition query is the fastest and cheapest thing Cosmos DB does. A cross partition query fans out across every partition, spends request units on each one, and gets slower and more expensive as the data grows. The same words can cost far more depending on whether the filter includes the partition key.
Before connecting I check what the recurring questions will actually filter on. If those questions do not include the partition key, the connection will produce answers the business cannot afford to ask twice. The second system in that case is the bill, and the third is whoever owns the Azure subscription.
The partition key breaks first
Picture a container that holds orders partitioned by customer id, because the app fetches a customer's history. The owner asks which products sold last month. That answer crosses every partition, and the assistant can produce it, slowly and at a cost that grows with the whole container.
Close behind is the definition of a field, because Cosmos DB containers are schemaless. 2 documents in the same container can disagree on what a field means, exactly as they can in MongoDB, with the same quiet consequences.
Where a Cosmos DB connection does not fit
3 cases.
A workload that needs full scans every time. If the questions the business asks never include the partition key, Cosmos DB is the wrong place to answer them. The connection would make the wrong place convenient.
A container with no documentation of the key. If nobody can say why the key was chosen, the first deliverable is not a query. It is a decision about what the key should be, and that is a migration conversation, not a connector conversation.
A team that wants live answers to cross partition questions in a chat. The latency and the request units make every answer feel like a bill. I would run those questions on a copy or on a schedule, not live.
How I would run the first test
One question inside one partition, then the same question across partitions, timed.
- Read the container's partition key and throughput in the Azure portal. Write down what the key implies about which questions are cheap.
- Pick one question that fits inside a partition. For orders partitioned by customer: what did one customer order and pay last month.
- Run it and record the time, and the request units from the Azure portal. That is the baseline.
- Run the same shape of question across all partitions: what did all customers order last month. Record the cost. Show the owner the difference.
- Publish both numbers side by side, with the cost of each. Then decide together which questions the assistant is allowed to ask live.
The deliverable is not the answer. It is the owner knowing, in request units and seconds, what each kind of question costs. That changes which questions get asked, which is the only thing that changes a bill.
The read-only boundary and the setup rules are in connect business tools to AI. If your document data lives in MongoDB instead, MongoDB MCP covers the same schemaless questions without the partition pricing.
Questions owners ask
No. The connection I set up is read-only. It queries the configured container within the access the key or Data Reader role grants. No writes, no throughput changes.
Because of the partition key. A question that filters on the key stays inside one partition and is cheap. The same question without that filter crosses every partition and spends request units on each one.
Not without rebuilding the container and changing how data is written. That is a migration project, not a setting. Which is why I read the key before I connect anything.
In the ways that matter for questions, yes. Documents, no enforced schema, field names that drift. The difference is the partition key and the request-unit pricing it drives.
Only the ones that filter on the partition key. Everything else runs on a schedule or against a copy, so the answer is not produced at cross partition prices every time someone asks.

