Skip to main content
Glama
RFingAdam

EMC Regulations MCP Server

by RFingAdam

emc_compare_limits

Compare FCC and CISPR emission limits at a specified frequency and device class to identify the more restrictive standard.

Instructions

Compare emission limits between FCC and CISPR standards at a given frequency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frequency_mhzYesFrequency in MHz
device_classNoDevice class

Implementation Reference

  • The _compare_limits static method is the core handler for the emc_compare_limits tool. It looks up FCC Part 15.109 limits and CISPR 32 limits for the given frequency and device class, formats a comparison, and includes a distance-correction note (10.5 dB to convert 10m→3m).
    @staticmethod
    def _compare_limits(arguments: dict[str, Any]) -> list[TextContent]:
        freq_mhz = arguments["frequency_mhz"]
        device_class = arguments.get("device_class", "B").upper()
    
        result = f"EMC Limit Comparison at {freq_mhz} MHz (Class {device_class})\n{'=' * 55}\n\n"
    
        fcc_data = PART15_LIMITS.get("section_15_109", {}).get(f"class_{device_class.lower()}", {})
        fcc_limit = find_limit_for_frequency(fcc_data.get("limits", []), freq_mhz)
    
        if fcc_limit:
            result += f"FCC Part 15.109 Class {device_class}:\n"
            result += f"  {fcc_limit['limit_dbuv_m']} dBuV/m @ {fcc_limit['distance_m']}m (QP)\n\n"
    
        cispr_data = CISPR_LIMITS.get("cispr_32", {}).get(f"class_{device_class.lower()}", {})
        cispr_rad = cispr_data.get("radiated_emissions", {})
        cispr_limit = find_limit_for_frequency(cispr_rad.get("limits", []), freq_mhz)
    
        if cispr_limit:
            result += f"CISPR 32 Class {device_class}:\n"
            result += f"  {cispr_limit['limit_dbuv_m']} dBuV/m @ {cispr_rad.get('measurement_distance_m', 10)}m (QP)\n\n"
    
        if fcc_limit and cispr_limit:
            result += "Note: FCC uses 3m, CISPR uses 10m measurement distance.\n"
            result += "Distance correction: +10.5 dB to convert 10m\u21923m limits.\n"
            cispr_at_3m = cispr_limit["limit_dbuv_m"] + 10.5
            result += f"CISPR 32 at 3m (calculated): {cispr_at_3m:.1f} dBuV/m\n"
    
        return [TextContent(type="text", text=result)]
  • The Tool definition for emc_compare_limits defines the input schema: required 'frequency_mhz' (number) and optional 'device_class' with enum ['A', 'B'] defaulting to 'B'.
    Tool(
        name="emc_compare_limits",
        description="Compare emission limits between FCC and CISPR standards at a given frequency.",
        inputSchema={
            "type": "object",
            "properties": {
                "frequency_mhz": {"type": "number", "description": "Frequency in MHz"},
                "device_class": {"type": "string", "enum": ["A", "B"], "description": "Device class"},
            },
            "required": ["frequency_mhz"],
        },
    ),
  • The call_tool dispatcher in ComparisonTools routes the name 'emc_compare_limits' to the _compare_limits handler. This is the MCP tool dispatch point.
    async def call_tool(self, name: str, arguments: dict[str, Any]) -> list[TextContent]:
        if name == "emc_compare_limits":
            return self._compare_limits(arguments)
        elif name == "emc_standards_list":
            return self._standards_list()
        return [TextContent(type="text", text=f"Unknown comparison tool: {name}")]
  • ToolRegistry._discover() auto-discovers ToolModule subclasses (like ComparisonTools) from the tools package, so the tool is automatically registered without manual wiring.
    def _discover(self) -> None:
        """Import every module in the ``tools`` package and instantiate ToolModules."""
        for info in pkgutil.iter_modules(_tools_pkg.__path__, _tools_pkg.__name__ + "."):
            module = importlib.import_module(info.name)
            for attr_name in dir(module):
                attr = getattr(module, attr_name)
                if (
                    isinstance(attr, type)
                    and issubclass(attr, ToolModule)
                    and attr is not ToolModule
                ):
                    self._modules.append(attr())
  • find_limit_for_frequency is a utility used by _compare_limits to look up the applicable limit entry from a list of frequency ranges for a given frequency.
    def find_limit_for_frequency(limits: list, freq_mhz: float) -> dict | None:
        """Find the applicable limit entry for a given frequency.
    
        Tries half-open intervals [min, max) first, then falls back to
        closed intervals [min, max] so upper-bound edge cases are not missed.
        """
        for limit in limits:
            if limit["freq_min_mhz"] <= freq_mhz < limit["freq_max_mhz"]:
                return limit
        for limit in limits:
            if limit["freq_min_mhz"] <= freq_mhz <= limit["freq_max_mhz"]:
                return limit
        return None
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose output format, side effects, or any behavioral traits beyond the comparison action.

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 a single, front-loaded sentence with no wasted words, but could include more detail about output without becoming verbose.

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

Completeness2/5

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

No output schema is provided, and the description omits key details such as output format, valid frequency range, or explanation of device_class enum values.

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

Parameters3/5

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

Schema coverage is 100% with descriptions for both parameters. The description adds no additional meaning beyond what the schema already provides.

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?

The description clearly states the tool compares FCC and CISPR emission limits at a given frequency. It is specific and distinguishes from sibling tools that return individual standard limits.

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 when comparing FCC and CISPR limits but does not explicitly state when to use this tool versus alternatives like cispr_limit or fcc_part15_limit.

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