New Your team’s decisions, in one playbook every coding agent works from. Never answer your agent twice

run_aggregation_query

Run an aggregation query against a Firestore database. Executes an aggregation query (such as COUNT, SUM, or AVG) over a structured query and returns the aggregated results. Required Parameters: - parent: The parent resource name in projects/{project_id}/databases/{database_id}/documents format (...

SERVERMcp SOURCEhttps://firestore.googleapis.com/mcp
High RISK CLASS
Category Execute
Parameters 71 required
Recommended Rate-limitedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/com-googleapis-firestore-mcp/run-aggregation-query.md

What run_aggregation_query does on Mcp

AI agents invoke run_aggregation_query to trigger actions in Mcp. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
parent string Yes Required. The parent resource name. In the format: `projects/{project_id}/databases/{database_id}/documents` or `projects/{project_id}/databases/{database_id}/d
readTime string Executes the query at the given timestamp. This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can
transaction string Run the aggregation within an already active transaction. The value here is the opaque transaction ID to execute the query in.
explainOptions object Optional. Explain options for the query. If set, additional query statistics will be returned. If not, only query results will be returned.
newTransaction object Starts a new transaction as part of the query, defaulting to read-only. The new transaction ID will be returned as the first response in the stream.
requestOptions object Optional. The request options for the request.
structuredAggregationQuery object An aggregation query.

Parameters from the server's own tool schema.

Why run_aggregation_query is rated High

run_aggregation_query triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.

Questions about run_aggregation_query

What does the run_aggregation_query tool do? +

Run an aggregation query against a Firestore database. Executes an aggregation query (such as COUNT, SUM, or AVG) over a structured query and returns the aggregated results. Required Parameters: - parent: The parent resource name in projects/{project_id}/databases/{database_id}/documents format (e.g., projects/my-project/databases/(default)/documents). - structured_aggregation_query: A StructuredAggregationQuery object defining the aggregation query to execute. Example usage (COUNT and AVG): json { "parent": "projects/my-project/databases/(default)/documents", "structured_aggregation_query": { "structured_query": { "from": [{"collection_id": "orders"}], "where": { "field_filter": { "field": {"field_path": "status"}, "op": "EQUAL", "value": {"string_value": "COMPLETED"} } } }, "aggregations": [ { "alias": "total_orders", "count": {} }, { "alias": "average_amount", "avg": { "field": {"field_path": "amount"} } } ] } }. It is categorised as a Execute tool in the Mcp MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does run_aggregation_query accept? +

run_aggregation_query accepts 7 parameters: parent, readTime, transaction, explainOptions, newTransaction, requestOptions, structuredAggregationQuery. Required: parent. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on run_aggregation_query? +

Register the MCP server in PolicyLayer and add a rule for run_aggregation_query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp. Nothing to install.

What risk level is run_aggregation_query? +

run_aggregation_query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit run_aggregation_query? +

Yes. Add a rate_limit block to the run_aggregation_query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block run_aggregation_query completely? +

Set action: deny in the PolicyLayer policy for run_aggregation_query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides run_aggregation_query? +

run_aggregation_query is provided by the MCP server (https://firestore.googleapis.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on , and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of 's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.