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() }; export const getIssueRootCauses: Tool<typeof schema> = { title: "get-issue-root-causes", description: "Retrieves a list of supported root cause categories and root causes that you can allocate to an issue in Autodesk Construction Cloud.", schema, callback: async ({ projectId }) => { // 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 rootCauses = await issuesClient.getRootCauseCategories(projectId, { accessToken }); if (!rootCauses.results) { throw new Error("No root causes found"); } return { content: rootCauses.results.map((rootCause) => ({ type: "text", text: JSON.stringify(rootCause) })) }; } };

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