Skip to main content
Glama

get-item-versions

Retrieve all versions of a document in Autodesk Construction Cloud using the APS MCP Server by specifying the projectId and itemId for efficient version tracking and management.

Instructions

List all versions of a document in Autodesk Construction Cloud

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdYes
projectIdYes

Implementation Reference

  • The asynchronous callback function that executes the tool's core logic: authenticates via getAccessToken, uses DataManagementClient to fetch item versions, and returns them as JSON text content.
    callback: async ({ projectId, itemId }) => { // TODO: add pagination support const accessToken = await getAccessToken(["data:read"]); const dataManagementClient = new DataManagementClient(); const versions = await dataManagementClient.getItemVersions(projectId, itemId, { accessToken }); if (!versions.data) { throw new Error("No versions found"); } return { content: versions.data.map((version) => ({ type: "text", text: JSON.stringify(version) })) }; }
  • Zod schema defining the required string inputs: projectId and itemId.
    const schema = { projectId: z.string().nonempty(), itemId: z.string().nonempty() };
  • src/server.ts:12-14 (registration)
    Generic registration loop in McpServer that registers all exported tools from src/tools/index.js by their title, including "get-item-versions".
    for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }
  • src/tools/index.ts:4-4 (registration)
    Re-export of the getItemVersions tool from its implementation file, making it available for import in server.ts.
    export { getItemVersions } from "./get-item-versions.js";

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/petrbroz/aps-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server