Skip to main content
Glama

select-tenant

Switch between Azure tenants and subscriptions to manage resources across different organizational accounts. Specify tenant and subscription IDs to change your working context.

Instructions

Select Azure tenant and subscription

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tenantIdYesAzure Tenant ID to select
subscriptionIdYesAzure Subscription ID to select

Implementation Reference

  • The handler function that executes the select-tenant tool. Parses arguments using SelectTenantSchema, initializes Azure clients for the given tenant and subscription, and returns a success message.
    private async handleSelectTenant(args: any) { const { tenantId, subscriptionId } = SelectTenantSchema.parse(args); await this.initializeClients(tenantId, subscriptionId); return this.createTextResponse( "Tenant and subscription selected! Clients initialized." ); }
  • Tool registration in handleListTools method, defining name, description, and input schema for select-tenant.
    { name: "select-tenant", description: "Select Azure tenant and subscription", inputSchema: { type: "object", properties: { tenantId: { type: "string", description: "Azure Tenant ID to select", }, subscriptionId: { type: "string", description: "Azure Subscription ID to select", }, }, required: ["tenantId", "subscriptionId"], }, },
  • Standalone Zod schema for validating select-tenant tool inputs, used in the handler.
    const SelectTenantSchema = z.object({ tenantId: z.string().describe("Azure Tenant ID to select"), subscriptionId: z.string().describe("Azure Subscription ID to select"), });
  • Switch case in handleCallTool that routes select-tenant calls to the handler function.
    case "select-tenant": result = await this.handleSelectTenant(args); break;

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/kalivaraprasad-gonapa/azure-mcp'

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