list_documentation_sections
View available Ilograph documentation sections to understand what content can be fetched for reference and learning.
Instructions
Lists all available Ilograph documentation sections with descriptions.
This tool provides an overview of all available documentation sections
that can be fetched using the fetch_documentation_tool.
Returns:
str: Formatted list of available documentation sections with descriptions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The core handler function implementing the logic to list all available Ilograph documentation sections. It retrieves supported sections from the fetcher, formats them into markdown with URLs and usage instructions, and handles errors.async def list_documentation_sections(ctx: Context) -> str: """ Lists all available Ilograph documentation sections with descriptions. This tool provides an overview of all available documentation sections that can be fetched using the fetch_documentation_tool. Returns: str: Formatted list of available documentation sections with descriptions """ try: await ctx.info("Listing available Ilograph documentation sections") fetcher = get_fetcher() supported_sections = fetcher.get_supported_documentation_sections() # Format the sections list sections_md = "# Available Ilograph Documentation Sections\n\n" sections_md += "The following documentation sections are available for fetching:\n\n" for section, description in sorted(supported_sections.items()): url = f"https://www.ilograph.com/docs/editing/{section.replace('-', '/')}/" sections_md += f"## {section}\n" sections_md += f"**Description:** {description} \n" sections_md += f"**URL:** {url} \n" sections_md += f"**Usage:** Use `fetch_documentation_tool(section='{section}')` to fetch this content\n\n" sections_md += "---\n\n" sections_md += "*To fetch any of these sections, use the `fetch_documentation_tool` with the section name as the parameter.*" await ctx.info(f"Listed {len(supported_sections)} available documentation sections") return sections_md except Exception as e: error_msg = f"Error listing documentation sections: {str(e)}" await ctx.error(error_msg) return f"Error: {error_msg}"
- The @mcp.tool decorator that registers the list_documentation_sections tool with FastMCP server, including metadata annotations that define the tool's schema, title, and description.annotations={ "title": "List Available Documentation Sections", "readOnlyHint": True, "description": "Lists all available Ilograph documentation sections with descriptions", } )
- src/ilograph_mcp/server.py:61-61 (registration)The call to register_fetch_documentation_tool which registers the list_documentation_sections among other documentation tools with the main MCP server instance.register_fetch_documentation_tool(mcp)
- src/ilograph_mcp/server.py:48-48 (schema)Description of the tool in the server's instructions, providing user-facing schema information.- list_documentation_sections: Lists all available documentation sections