Skip to main content
Glama
chand45

Azure Impact Reporting MCP Server

by chand45

report_impact_to_azure

Report customer-facing Azure infrastructure issues to Microsoft by submitting impact reports with subscription, resource, and category details through the Azure Management API.

Instructions

Reports the impact to Azure. Typically called when customers facing issue with azure infrastructure and they want to let azure know about it.

Args: subscriptionid (str): The Azure subscription ID where the resource is present. Eg: 68fa15fd-eef2-4ca3-a053-bcf268bd7371 resourcegroup (str): The Azure resource group name where the resource is present. Eg: test-rg resourceprovider (str): The Azure resource provider name for the resource. Eg: Microsoft.Compute resourcetype (str): The Azure resource type. Eg: virtualMachines resourcename (str): The Azure resource name. Eg: test-vm impactcategory (str): The impact category denoting the underlying issue. Can be one of: Resource.Connectivity, Resource.Performance, Resource.Availability or Resource.Unknown if the issue is not known.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriptionidYes
resourcegroupYes
resourceproviderYes
resourcetypeYes
resourcenameYes
impactcategoryYes

Implementation Reference

  • The main handler function for the 'report_impact_to_azure' tool. It is registered via the @mcp.tool() decorator and delegates the core logic to the 'call_impactrp' helper function. The function signature provides the input schema with parameter annotations and detailed docstring.
    @mcp.tool() async def report_impact_to_azure(subscriptionid: str, resourcegroup: str, resourceprovider: str, resourcetype: str, resourcename: str, impactcategory: str) -> str: """Reports the impact to Azure. Typically called when customers facing issue with azure infrastructure and they want to let azure know about it. Args: subscriptionid (str): The Azure subscription ID where the resource is present. Eg: 68fa15fd-eef2-4ca3-a053-bcf268bd7371 resourcegroup (str): The Azure resource group name where the resource is present. Eg: test-rg resourceprovider (str): The Azure resource provider name for the resource. Eg: Microsoft.Compute resourcetype (str): The Azure resource type. Eg: virtualMachines resourcename (str): The Azure resource name. Eg: test-vm impactcategory (str): The impact category denoting the underlying issue. Can be one of: Resource.Connectivity, Resource.Performance, Resource.Availability or Resource.Unknown if the issue is not known. """ # Call the function to report impact to Azure response = await call_impactrp(subscriptionid, resourcegroup, resourceprovider, resourcetype, resourcename, impactcategory) return response
  • Supporting helper function that implements the core logic: constructs the Azure Impact Reporter API URL, payload, authenticates with DefaultAzureCredential, and makes an async PUT request to report the impact.
    async def call_impactrp(subscriptionid: str, resourcegroup: str, resourceprovider: str, resourcetype: str, resourcename: str, impactcategory: str) -> str: """Reports the impact to Azure. Typically called when customers facing issue with azure infrastructure and they want to let azure know about it.""" workload_impact_name = str(uuid.uuid4()) # Construct the URL for the impact report url = f"{IMPACT_REPORTER_BASE_URL}/subscriptions/{subscriptionid}/providers/Microsoft.Impact/workloadImpacts/{workload_impact_name}?api-version=2023-12-01-preview" impacted_resource_id = f"/subscriptions/{subscriptionid}/resourceGroups/{resourcegroup}/providers/{resourceprovider}/{resourcetype}/{resourcename}" # Create a JSON payload for the impact report payload = { "properties": { "impactCategory": f"{impactcategory}", "impactedResourceId": f"/subscriptions/{subscriptionid}/resourceGroups/{resourcegroup}/providers/{resourceprovider}/{resourcetype}/{resourcename}", "startDateTime": datetime.datetime.now(datetime.timezone.utc).isoformat() } } # Get the bearer token credential = DefaultAzureCredential() accessToken = credential.get_token("https://management.azure.com/.default") token = accessToken.token # Set up headers with the bearer token headers = { "Authorization": f"Bearer {token}", "Content-Type": "application/json" } async with httpx.AsyncClient(verify=False) as client: try: response = await client.put(url, headers=headers, json=payload, timeout=30.0) return json.dumps(response.json(), indent=2) except Exception as e: return f"Error reporting impact: {e}"
  • The @mcp.tool() decorator registers the 'report_impact_to_azure' function as an MCP tool.
    @mcp.tool()
  • Input schema derived from function parameters with type annotations and detailed Arg descriptions in docstring. FastMCP likely generates JSON Schema from this.
    async def report_impact_to_azure(subscriptionid: str, resourcegroup: str, resourceprovider: str, resourcetype: str, resourcename: str, impactcategory: str) -> str: """Reports the impact to Azure. Typically called when customers facing issue with azure infrastructure and they want to let azure know about it. Args: subscriptionid (str): The Azure subscription ID where the resource is present. Eg: 68fa15fd-eef2-4ca3-a053-bcf268bd7371 resourcegroup (str): The Azure resource group name where the resource is present. Eg: test-rg resourceprovider (str): The Azure resource provider name for the resource. Eg: Microsoft.Compute resourcetype (str): The Azure resource type. Eg: virtualMachines resourcename (str): The Azure resource name. Eg: test-vm impactcategory (str): The impact category denoting the underlying issue. Can be one of: Resource.Connectivity, Resource.Performance, Resource.Availability or Resource.Unknown if the issue is not known. """
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/chand45/MCP-Server-Azure-Impact-Reporting'

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