Skip to main content
Glama

get-issue-comments

Retrieve comments linked to a specific issue in Autodesk Construction Cloud by specifying the project and issue IDs using the APS MCP Server's Node.js implementation.

Instructions

Retrieves a list of comments associated with an issue in Autodesk Construction Cloud.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdYes
projectIdYes

Implementation Reference

  • Handler function that authenticates via getAccessToken, normalizes projectId, retrieves comments with IssuesClient.getComments, and formats results as MCP content.
    callback: async ({ projectId, issueId }) => { // TODO: add pagination support const accessToken = await getAccessToken(["data:read"]); const issuesClient = new IssuesClient(); projectId = projectId.replace("b.", ""); // the projectId should not contain the "b." prefix const comments = await issuesClient.getComments(projectId, issueId, { accessToken}) if (!comments.results) { throw new Error("No comments found"); } return { content: comments.results.map((comment) => ({ type: "text", text: JSON.stringify(comment) })) }; }
  • Zod schema defining required string inputs: projectId and issueId.
    const schema = { projectId: z.string().nonempty(), issueId: z.string().nonempty() };
  • src/server.ts:12-14 (registration)
    Generic registration loop that adds all tools from tools/index.js (including get-issue-comments via title) to the MCP server.
    for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }
  • src/tools/index.ts:8-8 (registration)
    Re-exports the tool for convenient bulk import into server.ts.
    export { getIssueComments } from "./get-issue-comments.js";
  • Shared helper for obtaining and caching APS access tokens based on scopes, used in the tool handler.
    export async function getAccessToken(scopes: string[]): Promise<string> { const cacheKey = scopes.join("+"); let credentials = credentialsCache.get(cacheKey); if (!credentials || credentials.expiresAt < Date.now()) { const { access_token, expires_in } = await getServiceAccountAccessToken(APS_CLIENT_ID!, APS_CLIENT_SECRET!, APS_SA_ID!, APS_SA_KEY_ID!, APS_SA_PRIVATE_KEY!, scopes); credentials = { accessToken: access_token, expiresAt: Date.now() + expires_in * 1000 }; credentialsCache.set(cacheKey, credentials); } return credentials.accessToken; }

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