Skip to main content
Glama

APS MCP Server

by petrbroz
get-issues.ts1.01 kB
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 getIssues: Tool<typeof schema> = { title: "get-issues", description: "List all available projects in an Autodesk Construction Cloud account", 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 issues = await issuesClient.getIssues(projectId, { accessToken }); if (!issues.results) { throw new Error("No issues found"); } return { content: issues.results.map((issue) => ({ type: "text", text: JSON.stringify(issue) })) }; } };

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