Skip to main content
Glama
SH-G401
by SH-G401

Query Azure Resource Graph

azure_resource_graph_query
Read-onlyIdempotent

Run KQL queries against Azure Resource Graph to search resources, track changes, and assess health across subscriptions.

Instructions

Runs a KQL query against Azure Resource Graph: a fast, read-only index of every resource across your subscriptions. Useful tables: resources, resourcecontainers (subscriptions and resource groups), resourcechanges (recent property changes), healthresources (availability), advisorresources, policyresources. Examples: "resources | where type =~ 'microsoft.web/sites' | summarize count() by location"; "resourcechanges | where properties.changeAttributes.timestamp > ago(1d) | project properties.targetResourceId, properties.changeType, properties.changes | take 20". Use azure_find_resources for simple lookups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoMaximum rows (default 100).
queryYesKQL query.
skipTokenNoContinuation token from a previous call, to fetch the next page.
subscriptionIdsNoSubscription IDs to search. Omit to search every subscription you have access to.
managementGroupIdsNoManagement group IDs to query instead of subscriptions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, and the description reinforces this by calling the index 'read-only.' It adds useful behavioral context: the data source spans all accessible subscriptions, key tables are enumerated, and example queries show the kind of KQL usage expected. It does not mention pagination or API limits, but annotations cover the core safety profile.

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?

The description is well-structured and front-loaded: definition, useful tables, concrete examples, and routing to an alternative. Each sentence contributes meaningful guidance without unnecessary fluff.

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

Completeness4/5

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

For a complex KQL query tool with no output schema, the description provides table guidance, example queries, and scope context, which is strong. It does not explain return shape or pagination flow, but the schema covers parameters and arbitrary KQL output is hard to fully specify; overall an agent has enough to call this tool correctly.

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 description coverage is 100%, so the schema already documents every parameter. The description's examples indirectly show how the query parameter is used, but it adds no explicit detail about top, skipToken, subscriptionIds, or managementGroupIds beyond what the schema provides. Baseline 3 is appropriate.

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?

Description states a specific verb ('Runs a KQL query') and a specific resource ('Azure Resource Graph'), and clarifies scope ('every resource across your subscriptions'). It also explicitly distinguishes itself from azure_find_resources, so an agent can tell them apart.

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

Usage Guidelines5/5

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

The description gives concrete guidance on when to use this tool and when not to: 'Use azure_find_resources for simple lookups.' It also provides useful table names and example queries, making the intended use case clear and separating it from sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.