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

run_query

Use this when the user wants to analyze cloud costs, generate a cost breakdown, view spending trends, or run a custom analytics query across their cloud providers. Runs the config through the DoiT Cloud Analytics API query endpoint (https://developer.doit.com/reference/query) and returns the resu...

SERVERDoit SOURCE@doitintl/doit-mcp-server
High RISK CLASS
Category Execute
Parameters 11 required
Recommended Rate-limitedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/doit/run-query.md

What run_query does on Doit

AI agents invoke run_query to trigger actions in Doit. 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
config object Yes Configuration for the query. Valid dimension IDs come from list_dimensions or get_dimension.

Parameters from the server's own tool schema.

Why run_query is rated High

run_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.

Risk signalsHigh parameter count (73 properties)

Questions about run_query

What does the run_query tool do? +

Use this when the user wants to analyze cloud costs, generate a cost breakdown, view spending trends, or run a custom analytics query across their cloud providers. Runs the config through the DoiT Cloud Analytics API query endpoint (https://developer.doit.com/reference/query) and returns the result rows. Accepts a structured config with data source, metrics, dimensions, time range, and filters. Do NOT use this for listing saved reports (use list_reports), checking anomalies (use get_anomalies), or viewing budgets (use list_budgets). Unpopulated fields take API defaults: basic cost, last 7 days including today, daily time rows (year/month/day), and billing (or billing-datahub for customers with DataHub metrics). Each config.group[].limit.value selects top/bottom N dimension values per parent group, ranked across the range; it does not cap result rows and has no tool-enforced maximum of 25. Time columns can produce multiple rows per group. timeRange covers relative periods; explicit dates require timeRange: {mode: "custom"} and sibling config.customTimeRange: {from, to}, with no unit. For mode "last", "includeCurrent": true includes the current partial period within amount; false selects fully completed periods. One month with true is current month-to-date. "metrics" (array) supersedes the deprecated "metric" (object). A "group" with id "service_description" and type "fixed" returns a per-service cost breakdown, the most common shape for cost questions. Common grouping dimension IDs (all type "fixed"): "service_description" — cloud service "project_id" — GCP project / AWS account / Azure subscription "cloud_provider" — cloud provider (AWS / GCP / Azure) In default mode "is", filter values must exactly match stored dimension values (case-sensitive): cloud_provider uses provider IDs, while service_description uses service names. Common cloud-provider aliases such as aws/gcp/azure are normalized by run_query. get_dimension({type, id}) returns the valid values for a dimension for this customer. Known cloud provider IDs (cloud_provider, type "fixed"): "amazon-web-services" = AWS, "google-cloud" = GCP, "microsoft-azure" = Azure Example — top AWS services last month: { "config": { "dataSource": "billing", "metrics": [{"type": "basic", "value": "cost"}], "timeRange": {"mode": "last", "amount": 1, "unit": "month", "includeCurrent": false}, "filters": [{"id": "cloud_provider", "type": "fixed", "values": ["amazon-web-services"]}], "group": [{"id": "service_description", "type": "fixed", "limit": {"metric": {"type": "basic", "value": "cost"}, "sort": "desc", "value": 10}}] } }. It is categorised as a Execute tool in the Doit MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does run_query accept? +

run_query accepts 1 parameter: config. Required: config. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on run_query? +

Register the Doit MCP server in PolicyLayer and add a rule for run_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 Doit. Nothing to install.

What risk level is run_query? +

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

Can I rate-limit run_query? +

Yes. Add a rate_limit block to the run_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_query completely? +

Set action: deny in the PolicyLayer policy for run_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_query? +

run_query is provided by the Doit MCP server (@doitintl/doit-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on Doit, 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 Doit'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.