list_project_versions
Retrieve all available project versions from Document360 to access documentation content and manage knowledge base resources.
Instructions
List all project versions from Document360
Args: ctx: MCP context for logging and error handling
Returns: List of project versions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:106-116 (handler)The MCP tool handler for 'list_project_versions', registered via @mcp.tool decorator. It delegates execution to the helper in inc/tools.py.@mcp.tool async def list_project_versions(ctx: Context) -> dict: """List all project versions from Document360 Args: ctx: MCP context for logging and error handling Returns: List of project versions """ return await tools.list_project_versions(ctx)
- inc/tools.py:121-140 (helper)Helper function that adds MCP context logging, error handling, and calls the Document360 client to list project versions.async def list_project_versions(ctx: Context) -> Dict[str, Any]: """List all project versions from Document360 Args: ctx: MCP context for logging and error handling Returns: List of project versions from Document360 API """ try: await ctx.info("Listing all project versions") result = await client.list_project_versions() await ctx.info(f"Found {len(result.get('data', []))} project versions") return result except Document360APIError as e: await ctx.error(f"Document360 API error: {e.message}") raise e except Exception as e: await ctx.error(f"Unexpected error listing project versions: {str(e)}") raise e
- inc/document360_client.py:66-68 (helper)Core API client method that performs the HTTP GET request to the Document360 /v2/ProjectVersions endpoint.async def list_project_versions(self) -> Dict[str, Any]: """Get list of all project versions""" return await self._request("GET", "/ProjectVersions")