Skip to main content
Glama

get-item-versions

Retrieve all document versions in Autodesk Construction Cloud projects to track changes and access historical data.

Instructions

List all versions of a document in Autodesk Construction Cloud

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
itemIdYes

Implementation Reference

  • The asynchronous callback function that implements the core logic of the 'get-item-versions' tool. It retrieves an access token, uses the DataManagementClient to fetch item versions from Autodesk Platform Services, and formats the response as MCP 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 input parameters for the tool: projectId (string, nonempty) and itemId (string, nonempty).
    const schema = { projectId: z.string().nonempty(), itemId: z.string().nonempty() };
  • src/tools/index.ts:4-4 (registration)
    Re-export of the getItemVersions tool from its module, aggregating it into the tools index for bulk import and registration.
    export { getItemVersions } from "./get-item-versions.js";
  • src/server.ts:12-14 (registration)
    Generic registration loop that registers all tools (including get-item-versions) from the tools index into the MCP server using server.tool().
    for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }

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