Skip to main content
Glama

list-tenants

Retrieve configured Azure tenants with management group details and default subscription information 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 configured tenants from AZURE_CONFIG, formats their details (name, ID, management group ID, default subscription ID), and returns as formatted text.
    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 list_tools() function, including name, description, and empty input schema (no parameters required).
    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: empty object schema with no properties or required fields.
    inputSchema={ "type": "object", "properties": {}, "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