search_methods
Search Meraki API methods by entering a keyword like 'admin', 'firewall', or 'ssid' to find relevant endpoints.
Instructions
Search for Meraki API methods by keyword
Args: keyword: Search term (e.g., 'admin', 'firewall', 'ssid', 'event')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- meraki-mcp-dynamic.py:563-583 (handler)The main handler for search_methods tool. Searches _METHOD_INDEX (grouped by SDK section) for methods matching the keyword (case-insensitive). Returns a JSON string with matching results grouped by section and total match count.
@mcp.tool() async def search_methods(keyword: str) -> str: """ Search for Meraki API methods by keyword Args: keyword: Search term (e.g., 'admin', 'firewall', 'ssid', 'event') """ keyword_lower = keyword.lower() results = { section: [m for m in methods if keyword_lower in m.lower()] for section, methods in _METHOD_INDEX.items() } results = {k: v for k, v in results.items() if v} return json.dumps({ "keyword": keyword, "results": results, "total_matches": sum(len(v) for v in results.values()), "usage": "Use call_meraki_api(section='...', method='...', parameters='{...}')" }, indent=2) - meraki-mcp-dynamic.py:563-570 (schema)Input schema: keyword (str) is the only parameter. No return type schema beyond str.
@mcp.tool() async def search_methods(keyword: str) -> str: """ Search for Meraki API methods by keyword Args: keyword: Search term (e.g., 'admin', 'firewall', 'ssid', 'event') """ - meraki-mcp-dynamic.py:563-563 (registration)Registered as an MCP tool via @mcp.tool() decorator on the FastMCP server instance named 'mcp'.
@mcp.tool() - meraki-mcp-dynamic.py:518-533 (helper)Helper function _build_method_index() builds the _METHOD_INDEX dict (grouped by SDK section) that search_methods queries against. It introspects the meraki dashboard object to discover all callable methods per section.
def _build_method_index() -> Dict: """Build a complete index of all callable SDK methods, grouped by section.""" index = {} for section_name in SDK_SECTIONS: if not hasattr(dashboard, section_name): continue section_obj = getattr(dashboard, section_name) methods = sorted( m for m in dir(section_obj) if not m.startswith('_') and callable(getattr(section_obj, m)) ) if methods: index[section_name] = methods return index _METHOD_INDEX = _build_method_index()