get_category_page_content
Retrieve the full HTML and text content of a Document360 page by providing the category ID and page ID.
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
| Name | Required | Description | Default |
|---|---|---|---|
| category_id | Yes | Document360 category ID (UUID string) | |
| page_id | Yes | Document360 page ID (UUID string) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:39-55 (registration)MCP tool registration via @mcp.tool decorator. Defines the tool name 'get_category_page_content' with Pydantic-annotated parameters (category_id, page_id) and delegates to tools.get_category_page_content().
@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/tools.py:5-33 (handler)Core handler function that implements the tool logic. Calls the Document360 client to fetch page content, with error handling for 404, 401, and unexpected errors, logging via MCP context.
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 - inc/document360_client.py:58-60 (helper)Raw API client method. Makes an HTTP GET request to /v2/categories/{category_id}/pages/{page_id}/content to fetch category page content from Document360.
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") - server.py:21-37 (schema)FastMCP server instructions mention this tool. The Pydantic Field annotations (lines 41-42) define parameter schemas: category_id and page_id are UUID strings.
# Initialize FastMCP server mcp = FastMCP( name="Document360 MCP Server", instructions=""" Use this server to access Document360 projects, categories and articles. Search and retrieves categories, articles and pages. - If no project_version_id is provided in the context, search for relevant projects using `list_project_versions`. Inform the user if no relevant projects can be found - If not article_id is provided, use `search_in_project` to find relevant articles, their IDs and contents - While using `search_in_project` pay attention to relevant categoryIds, use `get_category` and `get_category_page_content` if you need to do a deep research on a particular topic - If the user mentions a specific ID, prioritize it over `search_in_project` - Provide the links to the relevant articles as resources """, lifespan=lifespan, # include_tags={"document360", "api"}, on_duplicate_tools="warn", on_duplicate_resources="warn", on_duplicate_prompts="warn" )