list_project_versions
Retrieve all available project versions from Document360 to access specific documentation sets for browsing, searching, or reading articles.
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
- inc/tools.py:121-140 (handler)Core handler function that lists project versions using the Document360 client, includes logging and comprehensive error handling.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
- server.py:106-116 (registration)MCP tool registration using @mcp.tool decorator. Defines input/output schema via type hints and docstring. Delegates execution to the tools module.@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/document360_client.py:66-69 (helper)Low-level helper in Document360Client that performs the HTTP GET request to the /v2/ProjectVersions endpoint to fetch the list of project versions.async def list_project_versions(self) -> Dict[str, Any]: """Get list of all project versions""" return await self._request("GET", "/ProjectVersions")