list_project_versions
Retrieve a list of all versions for a Document360 project to manage content revisions.
Instructions
List all project versions from Document360
Args: ctx: MCP context for logging and error handling
Returns: List of project versions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- inc/tools.py:121-140 (handler)The actual handler function that executes the 'list_project_versions' tool logic. It calls client.list_project_versions() and returns the result with logging.
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:105-115 (registration)Registration of the 'list_project_versions' tool with FastMCP via @mcp.tool decorator. Delegates to tools.list_project_versions(ctx).
@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-68 (helper)The API client helper that makes the actual HTTP GET request to /v2/ProjectVersions endpoint.
async def list_project_versions(self) -> Dict[str, Any]: """Get list of all project versions""" return await self._request("GET", "/ProjectVersions") - server.py:105-114 (schema)The tool's schema/type signature defined at registration. No input parameters required; returns a dict.
@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 """