Skip to main content
Glama

arg-examples

Provides sample KQL queries for common Azure Resource Graph scenarios to help users explore Azure environments and analyze resource data.

Instructions

Sample KQL snippets for common scenarios across ARG tables.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoOptional topic filter, e.g., 'subscriptions', 'policy', 'advisor', 'health', 'changes', 'resourcegroups'

Implementation Reference

  • Registration of the "arg-examples" tool including its name, description, and input schema.
    types.Tool( name="arg-examples", description="Sample KQL snippets for common scenarios across ARG tables.", inputSchema={ "type": "object", "properties": { "topic": {"type": "string", "description": "Optional topic filter, e.g., 'subscriptions', 'policy', 'advisor', 'health', 'changes', 'resourcegroups'"} }, "required": [], }, ),
  • The main handler logic for the "arg-examples" tool, which conditionally includes various KQL example functions based on the topic parameter and formats them for output.
    if name == "arg-examples": topic = (arguments or {}).get("topic", "").strip().lower() examples: List[str] = [] def add(title: str, kql: str) -> None: examples.extend([title, "KQL:", kql, ""]) # blank line after each if not topic or topic in ("subscriptions", "subs"): add("List subscriptions", list_subscriptions_kql()) if not topic or topic in ("resourcegroups", "resource groups", "rg", "tags"): add("Resource groups without tags", untagged_resource_groups_kql()) add("List resource groups", list_resource_groups_kql(limit=50)) if not topic or topic in ("changes", "resourcechanges"): add("Recent resource changes (7d)", resource_changes_recent_kql(days=7)) add("Manual changes (last 30d) — filterable by RG", manual_changes_kql(days=30)) if not topic or topic in ("containerchanges", "resourcecontainerchanges"): add("Recent subscription/resource group changes (30d)", resource_container_changes_recent_kql(days=30)) if not topic or topic in ("advisor", "recommendations"): add("Advisor recommendations (all)", advisor_recommendations_kql()) if not topic or topic in ("health", "incidents"): add("Service/Resource health advisories (recent)", health_advisories_kql()) if not topic or topic in ("policy", "compliance"): add("Non-compliant policy resources", policy_noncompliant_kql()) if not examples: examples = ["No examples matched the topic filter."] header = ["ARG Examples", "", f"Topic filter: {topic or '(none)'}", ""] return [types.TextContent(type="text", text="\n".join(header + examples))]
  • Input schema definition for the "arg-examples" tool, specifying an optional 'topic' string parameter.
    inputSchema={ "type": "object", "properties": { "topic": {"type": "string", "description": "Optional topic filter, e.g., 'subscriptions', 'policy', 'advisor', 'health', 'changes', 'resourcegroups'"} }, "required": [], },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrewstephenson-v1/Azure-Assistant-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server