Skip to main content
Glama

APS MCP Server

by petrbroz
import { z } from "zod"; import { IssuesClient } from "@aps_sdk/construction-issues"; import { getAccessToken } from "./common.js"; import type { Tool } from "./common.js"; const schema = { projectId: z.string().nonempty(), issueId: z.string().nonempty() }; export const getIssueComments: Tool<typeof schema> = { title: "get-issue-comments", description: "Retrieves a list of comments associated with an issue in Autodesk Construction Cloud.", schema, 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) })) }; } };

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