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": [],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool provides 'Sample KQL snippets,' implying a read-only, informational function, but doesn't clarify if it's a query, a lookup, or a static list, nor does it mention any constraints like rate limits, authentication needs, or output format. For a tool with no annotations, this is a significant gap in behavioral context.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core function and appropriately sized for its informational role, making it highly concise and well-structured.

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

Completeness3/5

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

Given the tool's low complexity (1 optional parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage, behavioral traits, and how it fits with siblings. Without an output schema, it doesn't explain return values, but for a simple tool, it meets a bare minimum threshold without being fully complete.

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?

The input schema has 1 parameter with 100% description coverage, detailing 'topic' as an optional filter with examples. The description adds no additional parameter semantics beyond the schema, such as how the topic influences the snippets or default behavior. With high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't detract either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: providing 'Sample KQL snippets for common scenarios across ARG tables.' It specifies the verb ('Sample') and resource ('KQL snippets'), and mentions the scope ('across ARG tables'). However, it doesn't explicitly differentiate from siblings like 'run-arg-kql' or 'run-kql-template,' which might also involve KQL queries, so it lacks full sibling distinction.

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

Usage Guidelines2/5

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

The description offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, and with siblings like 'run-arg-kql' and 'run-kql-template' that handle KQL execution, there's no indication of when to prefer this tool for examples over those for running queries. This leaves usage unclear.

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

Install Server

Other Tools

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