list_icon_providers_tool
Discover available icon providers and their categories to understand the icon catalog structure for Ilograph diagrams.
Instructions
Lists all available icon providers and their categories.
This tool provides an overview of the icon catalog structure,
showing available providers and their service categories.
Returns:
dict: Provider information with categories and icon counts
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The async handler function `list_icon_providers_tool` that fetches and returns icon provider information using the fetcher instance, with proper error handling and context logging.async def list_icon_providers_tool(ctx: Optional[Context] = None) -> Dict[str, Any]: """ Lists all available icon providers and their categories. This tool provides an overview of the icon catalog structure, showing available providers and their service categories. Returns: dict: Provider information with categories and icon counts """ try: if ctx: await ctx.info("Fetching icon provider information") # Get fetcher instance fetcher = get_fetcher() # Get provider information provider_info = await fetcher.get_icon_providers() if provider_info is None: error_msg = "Failed to fetch icon provider information. The service may be temporarily unavailable." if ctx: await ctx.error(error_msg) return {"error": error_msg} if ctx: await ctx.info( f"Retrieved information for {len(provider_info.get('providers', {}))} icon providers" ) return provider_info except Exception as e: error_msg = f"Error fetching icon provider information: {str(e)}" if ctx: await ctx.error(error_msg) return {"error": error_msg}
- src/ilograph_mcp/tools/register_fetch_icons_tool.py:127-133 (registration)The `@mcp.tool()` decorator registering `list_icon_providers_tool` with annotations for title, readOnlyHint, and description.@mcp.tool( annotations={ "title": "List Available Icon Providers", "readOnlyHint": True, "description": "Lists all available icon providers and categories from the icon catalog", } )
- src/ilograph_mcp/server.py:73-73 (registration)Invocation of `register_fetch_icons_tool(mcp)` in the main server setup, which triggers the registration of the tool.register_fetch_icons_tool(mcp)