get_category_page_content
Retrieve full page content from a Document360 knowledge base by specifying category and page IDs. Use this tool to access formatted HTML/text content for documentation pages.
Instructions
Get category page content by ID from Document360
Args: category_id: Document360 category ID (UUID string) page_id: Document360 page ID (UUID string) ctx: MCP context for logging and error handling
Returns: Full page content including HTML/text content and formatting
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category_id | Yes | Document360 category ID (UUID string) | |
| page_id | Yes | Document360 page ID (UUID string) |
Implementation Reference
- inc/tools.py:5-33 (handler)Main handler function implementing the tool logic: logs via ctx, calls Document360 client to fetch page content, handles specific API errors (404,401) and general exceptions.async def get_category_page_content(category_id: str, page_id: str, ctx: Context) -> Dict[str, Any]: """Get category page content by ID from Document360 Args: category_id: Document360 category ID (UUID string) page_id: Document360 page ID (UUID string) ctx: MCP context for logging and error handling Returns: Page content data from Document360 API """ try: await ctx.info(f"Fetching content for page {page_id} from category {category_id}") result = await client.get_category_page_content(category_id, page_id) await ctx.info("Successfully retrieved page content") return result except Document360APIError as e: await ctx.error(f"Document360 API error: {e.message}") if e.status_code == 404: await ctx.warning(f"Page content {page_id} in category {category_id} not found") elif e.status_code == 401: await ctx.error("Invalid API key - check configuration") raise e except Exception as e: await ctx.error(f"Unexpected error fetching page content: {str(e)}") raise e
- server.py:40-56 (registration)FastMCP tool registration with @mcp.tool decorator. Defines input schema using Annotated[str, Field(description=...)] for parameters and detailed docstring. Delegates execution to the handler in tools.py.@mcp.tool async def get_category_page_content( category_id: Annotated[str, Field(description="Document360 category ID (UUID string)")], page_id: Annotated[str, Field(description="Document360 page ID (UUID string)")], ctx: Context ) -> dict: """Get category page content by ID from Document360 Args: category_id: Document360 category ID (UUID string) page_id: Document360 page ID (UUID string) ctx: MCP context for logging and error handling Returns: Full page content including HTML/text content and formatting """ return await tools.get_category_page_content(category_id, page_id, ctx)
- inc/document360_client.py:58-60 (helper)Supporting utility in Document360Client class: makes the specific HTTP GET request to the Document360 API endpoint /v2/categories/{category_id}/pages/{page_id}/content using the shared _request method.async def get_category_page_content(self, category_id: str, page_id: str) -> Dict[str, Any]: """Get category page content by ID""" return await self._request("GET", f"/categories/{category_id}/pages/{page_id}/content")