list_documentation_sections
Discover all available Ilograph documentation sections with descriptions to streamline access using fetch_documentation_tool.
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 @mcp.tool-decorated async function implementing the list_documentation_sections tool. It fetches supported sections from the documentation fetcher, formats them into a markdown list with descriptions and URLs, and returns the result. Includes error handling.annotations={ "title": "List Available Documentation Sections", "readOnlyHint": True, "description": "Lists all available Ilograph documentation sections with descriptions", } ) 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}"
- Tool annotations defining title, readOnlyHint, and description used for schema/input/output validation in FastMCP.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)Invocation of register_fetch_documentation_tool on the FastMCP server instance, which defines and registers the list_documentation_sections tool using the @mcp.tool decorator.register_fetch_documentation_tool(mcp)
- src/ilograph_mcp/server.py:16-16 (registration)Import of the registration function for the documentation tools, including list_documentation_sections.from ilograph_mcp.tools.register_fetch_documentation_tools import register_fetch_documentation_tool