Skip to main content
Glama
RFingAdam

EMC Regulations MCP Server

by RFingAdam

immunity_test_plan

Get a customized immunity test plan for your product's environment, including applicable IEC 61000-4-x tests and levels.

Instructions

Get a suggested immunity test plan for a product type. Returns applicable IEC 61000-4-x tests and recommended levels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYesTarget environment

Implementation Reference

  • The 'immunity_test_plan' tool is registered as part of the ImmunityTools class via the Tool(name='immunity_test_plan', ...) definition returned by list_tools(). This is how it gets discovered by the ToolRegistry.
        Tool(
            name="iec61000_overview",
            description="Get an overview of all IEC 61000-4-x immunity tests with typical levels for residential and industrial environments.",
            inputSchema={"type": "object", "properties": {}},
        ),
        Tool(
            name="immunity_test_plan",
            description=(
                "Get a suggested immunity test plan for a product type. "
                "Returns applicable IEC 61000-4-x tests and recommended levels."
            ),
            inputSchema={
                "type": "object",
                "properties": {
                    "environment": {
                        "type": "string",
                        "enum": ["residential", "industrial", "automotive", "medical"],
                        "description": "Target environment",
                    },
                },
                "required": ["environment"],
            },
        ),
    ]
  • The _test_plan method is the actual handler for 'immunity_test_plan'. It takes an 'environment' argument (residential/industrial/automotive/medical) and returns a formatted test plan with standard, test, level, and performance criterion columns.
    @staticmethod
    def _test_plan(arguments: dict[str, Any]) -> list[TextContent]:
        environment = arguments["environment"]
    
        result = f"Immunity Test Plan: {environment.title()} Environment\n{'=' * 55}\n\n"
    
        plans = {
            "residential": [
                ("IEC 61000-4-2", "ESD", "Contact +/-4 kV, Air +/-8 kV", "B"),
                ("IEC 61000-4-3", "Radiated immunity", "3 V/m, 80-1000 MHz", "A"),
                ("IEC 61000-4-4", "EFT/Burst", "+/-1 kV AC power, +/-0.5 kV signal", "B"),
                ("IEC 61000-4-5", "Surge", "+/-1 kV L-L, +/-2 kV L-E", "B"),
                ("IEC 61000-4-6", "Conducted RF", "3 V, 0.15-80 MHz", "A"),
                ("IEC 61000-4-8", "Magnetic field", "3 A/m", "A"),
                ("IEC 61000-4-11", "Voltage dips", "Standard dip profile", "B/C"),
            ],
            "industrial": [
                ("IEC 61000-4-2", "ESD", "Contact +/-4 kV, Air +/-8 kV", "B"),
                ("IEC 61000-4-3", "Radiated immunity", "10 V/m, 80-2700 MHz", "A"),
                ("IEC 61000-4-4", "EFT/Burst", "+/-2 kV AC power, +/-1 kV signal", "B"),
                ("IEC 61000-4-5", "Surge", "+/-2 kV L-L, +/-4 kV L-E", "B"),
                ("IEC 61000-4-6", "Conducted RF", "10 V, 0.15-80 MHz", "A"),
                ("IEC 61000-4-8", "Magnetic field", "30 A/m", "A"),
                ("IEC 61000-4-11", "Voltage dips", "Standard dip profile", "B/C"),
            ],
            "automotive": [
                ("ISO 11452-2", "Radiated immunity (ALSE)", "30-200 V/m, 200-2000 MHz", "A (per OEM)"),
                ("ISO 11452-4", "BCI", "30-300 mA, 1-400 MHz", "A (per OEM)"),
                ("ISO 7637-2", "Conducted transients", "Pulses 1, 2a, 3a, 3b", "A/B (per OEM)"),
                ("IEC 61000-4-2", "ESD", "Contact +/-4-8 kV", "B"),
                ("ISO 16750-2", "Electrical loads", "OEM-specific voltage ranges", "A"),
            ],
            "medical": [
                ("IEC 61000-4-2", "ESD", "Contact +/-8 kV, Air +/-15 kV", "B"),
                ("IEC 61000-4-3", "Radiated immunity", "3-10 V/m (per 60601-1-2), extended to 2.7 GHz", "A"),
                ("IEC 61000-4-4", "EFT/Burst", "+/-2 kV AC power", "B"),
                ("IEC 61000-4-5", "Surge", "+/-1 kV L-L, +/-2 kV L-E", "B"),
                ("IEC 61000-4-6", "Conducted RF", "3-6 V, 0.15-80 MHz", "A"),
                ("IEC 61000-4-8", "Magnetic field", "3-30 A/m", "A"),
                ("IEC 61000-4-11", "Voltage dips", "Standard + extended profiles", "B/C"),
            ],
        }
    
        plan = plans.get(environment, plans["residential"])
    
        result += f"{'Standard':<20} {'Test':<25} {'Level':<35} {'Criterion':<10}\n"
        result += "-" * 90 + "\n"
    
        for std, test, level, criterion in plan:
            result += f"{std:<20} {test:<25} {level:<35} {criterion:<10}\n"
    
        result += f"\nNote: Levels are typical for {environment} environment. "
        result += "Actual levels may be specified by product standard or customer requirements.\n"
    
        return [TextContent(type="text", text=result)]
  • The input schema for 'immunity_test_plan' defines a single required 'environment' parameter (enum: residential, industrial, automotive, medical). No output schema since it returns TextContent.
    Tool(
        name="immunity_test_plan",
        description=(
            "Get a suggested immunity test plan for a product type. "
            "Returns applicable IEC 61000-4-x tests and recommended levels."
        ),
        inputSchema={
            "type": "object",
            "properties": {
                "environment": {
                    "type": "string",
                    "enum": ["residential", "industrial", "automotive", "medical"],
                    "description": "Target environment",
                },
            },
            "required": ["environment"],
        },
    ),
  • The call_tool method routes the tool name 'immunity_test_plan' to _test_plan() handler. This is invoked by the ToolRegistry after discovery.
    async def call_tool(self, name: str, arguments: dict[str, Any]) -> list[TextContent]:
        if name == "iec61000_test_levels":
            return self._test_levels(arguments)
        elif name == "iec61000_overview":
            return self._overview()
        elif name == "immunity_test_plan":
            return self._test_plan(arguments)
        return [TextContent(type="text", text=f"Unknown immunity tool: {name}")]
  • The helper function load_json loads the iec61000_immunity.json data file which provides the data backing for all immunity tools. However, _test_plan uses hardcoded plan data, not the JSON.
    from ..utils import load_json
    from .base import ToolModule
    
    IMMUNITY = load_json("iec61000_immunity.json")
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It indicates a read operation ('Get') but does not clarify if the plan is generated dynamically or retrieved statically, nor does it mention any side effects or permissions needed.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the key action and output. Every word earns its place without redundancy.

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?

With one parameter and no output schema, the description explains what the tool returns (applicable tests and levels) but does not detail the output structure or how the plan is intended to be used. It is adequate but leaves some gaps.

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

Parameters2/5

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

Although the schema covers 100% of parameters, the description introduces a mismatch by saying 'product type' while the only parameter is 'environment'. This could confuse an AI agent. The parameter description in the schema is basic ('Target environment'), and the tool description adds no extra clarity.

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

Purpose5/5

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

Description clearly states the tool provides a suggested immunity test plan for a product type, using IEC 61000-4-x standards. It differentiates from siblings like 'iec61000_test_levels' or 'test_plan_generator' by focusing on immunity and providing recommendations.

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 implies usage for immunity test planning but does not explicitly state when to use this tool versus alternatives such as 'iec61000_overview' or 'test_plan_generator'. No exclusions or prerequisites are mentioned, leaving the agent with limited guidance.

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/RFingAdam/mcp-emc-regulations'

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