Skip to main content
Glama

select-tenant

Choose and set an Azure tenant and subscription using the MCP server to manage resources and configurations effectively. Simplify tenant-specific operations and streamline access.

Instructions

Select Azure tenant and subscription

Input Schema

NameRequiredDescriptionDefault
subscriptionIdYesAzure Subscription ID to select
tenantIdYesAzure Tenant ID to select

Input Schema (JSON Schema)

{ "properties": { "subscriptionId": { "description": "Azure Subscription ID to select", "type": "string" }, "tenantId": { "description": "Azure Tenant ID to select", "type": "string" } }, "required": [ "tenantId", "subscriptionId" ], "type": "object" }

Implementation Reference

  • Main handler function for the 'select-tenant' tool. It validates input 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." ); }
  • Zod schema definition for validating the input parameters (tenantId and subscriptionId) of the 'select-tenant' tool.
    const SelectTenantSchema = z.object({ tenantId: z.string().describe("Azure Tenant ID to select"), subscriptionId: z.string().describe("Azure Subscription ID to select"), });
  • Tool registration in the listTools response, defining the 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"], }, },
  • Dispatch case in handleCallTool switch statement that routes calls to the select-tenant handler.
    case "select-tenant": result = await this.handleSelectTenant(args); break;

Other Tools

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

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