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.
        """
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the action 'reports' but does not clarify whether this is a read-only operation, if it requires specific permissions, what the response looks like, or any side effects like notifications or logging. For a tool with no annotation coverage, this leaves significant behavioral gaps, though it at least hints at a reporting function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, starting with the tool's purpose and typical usage, followed by a structured 'Args:' section. Each sentence adds value, with no redundant information. It could be slightly more concise by integrating the usage context more seamlessly, but overall it's efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (6 parameters, no annotations, no output schema), the description is partially complete. It covers parameter semantics well but lacks details on behavioral aspects like response format, error handling, or authentication needs. Without an output schema, it should ideally explain what the tool returns, but it doesn't. It's adequate for basic use but has notable gaps for a mutation-like reporting tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining each parameter's purpose with examples (e.g., subscriptionid as 'The Azure subscription ID where the resource is present') and provides allowed values for impactcategory ('Resource.Connectivity, Resource.Performance, Resource.Availability or Resource.Unknown'). This effectively documents all 6 parameters, though it could be more detailed on resourceprovider and resourcetype.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Reports the impact to Azure' with the context 'when customers facing issue with azure infrastructure and they want to let azure know about it.' This specifies the verb ('reports'), resource ('Azure'), and typical usage scenario. However, without sibling tools, it cannot demonstrate differentiation from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidelines by stating 'Typically called when customers facing issue with azure infrastructure and they want to let azure know about it.' This gives context for when to use the tool but lacks explicit guidance on when not to use it or alternatives, as there are no sibling tools mentioned. It's adequate but has clear gaps in specificity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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