Skip to main content
Glama

list-tenants

Retrieve configured Azure tenants with management groups and default subscriptions from azure-config.json.

Instructions

List configured tenants from azure-config.json, including optional management group and default subscription info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for the 'list-tenants' tool within the call_tool function. Retrieves tenants from config and formats them for output.
    if name == "list-tenants":
        tenants = AZURE_CONFIG.get_tenants()
        if not tenants:
            return [types.TextContent(type="text", text="No tenants configured.")]
        lines = [
            "Configured tenants:",
        ]
        for t in tenants:
            name = t.get("name") or t.get("id") or "(unnamed)"
            tid = t.get("id") or "(no id)"
            mg = t.get("management_group_id") or t.get("managementGroupId") or "(none)"
            default_sub = t.get("default_subscription_id") or "(none)"
            lines.append(f"- {name} ({tid}) | management_group_id={mg} | default_subscription_id={default_sub}")
        return [types.TextContent(type="text", text="\n".join(lines))]
  • Registration of the 'list-tenants' tool in the @server.list_tools() function, including name, description, and schema.
    types.Tool(
        name="list-tenants",
        description="List configured tenants from azure-config.json, including optional management group and default subscription info.",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": [],
        },
    ),
  • Input schema for 'list-tenants' tool: no required properties.
    inputSchema={
        "type": "object",
        "properties": {},
        "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 mentions that the tool lists tenants 'including optional management group and default subscription info,' which adds some context about the output. However, it does not cover critical behaviors like read-only nature, potential errors, data sources, or response format, leaving significant gaps for a tool with no annotation support.

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 front-loads the core action ('List configured tenants') and adds necessary detail about the data source and included info. There is no wasted language, and it is appropriately sized for a simple tool with no parameters.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but has gaps. It explains the purpose and output context but lacks behavioral details like error handling or data freshness. Without annotations or output schema, more completeness would require additional disclosure about the tool's operation and results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose and output context. This aligns with the baseline for zero parameters, as the description adds value by explaining what information is included in the output.

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 verb ('List') and resource ('configured tenants from azure-config.json'), specifying what the tool does. It distinguishes itself from siblings like 'list-subscriptions' and 'vm-count-by-tenant' by focusing on tenants, but does not explicitly contrast with them. The purpose is specific and actionable, though not maximally differentiated.

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 provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, context, or exclusions, such as when to choose 'list-tenants' over 'list-subscriptions' or other sibling tools. Usage is implied by the purpose but lacks explicit instructions or alternatives.

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