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
| Name | Required | Description | Default |
|---|---|---|---|
| subscriptionId | Yes | Azure Subscription ID to select | |
| tenantId | Yes | Azure 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
- src/AzureServer.ts:572-578 (handler)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." ); }
- src/AzureServer.ts:1107-1110 (schema)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"), });
- src/AzureServer.ts:334-351 (registration)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"], }, },
- src/AzureServer.ts:441-443 (registration)Dispatch case in handleCallTool switch statement that routes calls to the select-tenant handler.case "select-tenant": result = await this.handleSelectTenant(args); break;