lte_bands_list
List LTE bands filtered by region (Americas, Europe, APAC, Global) or US carrier (AT&T, Verizon, T-Mobile).
Instructions
List all LTE bands, optionally filtered by region or carrier.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | Filter by region (Americas, Europe, APAC, Global) | |
| carrier | No | Filter by US carrier (att, verizon, tmobile) |
Implementation Reference
- Handler for lte_bands_list tool: filters by region or carrier, returns formatted list of LTE bands (up to 30).
@staticmethod def _lte_bands_list(arguments: dict[str, Any]) -> list[TextContent]: region = arguments.get("region", "").lower() carrier = arguments.get("carrier", "").lower() if carrier: carrier_bands = LTE_BANDS.get("us_carrier_bands", {}).get(carrier, {}) if carrier_bands: result = f"LTE Bands for {carrier.upper()}\n{'=' * 40}\n\n" result += f"Primary bands: {', '.join(str(b) for b in carrier_bands.get('primary', []))}\n" result += f"LTE-M bands: {', '.join(str(b) for b in carrier_bands.get('lte_m', []))}\n" else: result = f"Carrier '{carrier}' not found. Available: att, verizon, tmobile" else: bands = LTE_BANDS.get("bands", []) if region: bands = [b for b in bands if region in [r.lower() for r in b.get("regions", [])]] result = f"LTE Bands{' (' + region.title() + ')' if region else ''}\n{'=' * 50}\n\n" for band in bands[:30]: ul = band.get("uplink_mhz", [0, 0]) dl = band.get("downlink_mhz", [0, 0]) result += f"Band {band['band']:>2}: {dl[0]:>4}-{dl[1]:<4} MHz ({band['duplex']}) {band.get('name', '')}\n" return [TextContent(type="text", text=result)] - Tool schema definition listing input parameters: region (optional string) and carrier (optional string).
Tool( name="lte_bands_list", description="List all LTE bands, optionally filtered by region or carrier.", inputSchema={ "type": "object", "properties": { "region": {"type": "string", "description": "Filter by region (Americas, Europe, APAC, Global)"}, "carrier": {"type": "string", "description": "Filter by US carrier (att, verizon, tmobile)"}, }, }, - src/mcp_emc_regulations/tools/cellular.py:99-100 (registration)Routes the 'lte_bands_list' tool name to the _lte_bands_list handler method.
elif name == "lte_bands_list": return self._lte_bands_list(arguments) - src/mcp_emc_regulations/registry.py:17-52 (registration)ToolRegistry auto-discovers CellularTools via _discover() which iterates over all modules in the tools package and instantiates ToolModule subclasses.
def __init__(self) -> None: self._modules: list[ToolModule] = [] self._discover() # ------------------------------------------------------------------ # Public API used by server.py # ------------------------------------------------------------------ def list_tools(self) -> list[Tool]: result: list[Tool] = [] for mod in self._modules: result.extend(mod.list_tools()) return result async def call_tool(self, name: str, arguments: dict[str, Any]) -> list[TextContent]: for mod in self._modules: if mod.handles(name): return await mod.call_tool(name, arguments) return [TextContent(type="text", text=f"Unknown tool: {name}")] # ------------------------------------------------------------------ # Auto-discovery # ------------------------------------------------------------------ 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()) - Utility that loads the lte_bands.json data file used by _lte_bands_list to retrieve band information.
def load_json(filename: str) -> dict: """Load a JSON data file from the package data directory.""" filepath = DATA_DIR / filename if filepath.exists(): return json.loads(filepath.read_text()) return {}