Skip to main content
Glama

get-issues

Retrieve and list issues from a specified Autodesk Construction Cloud project to track and manage construction-related problems and tasks.

Instructions

List all available projects in an Autodesk Construction Cloud account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes

Implementation Reference

  • The main handler implementation for the 'get-issues' tool, including title, description, schema, and the async callback that processes the projectId, obtains an access token, strips 'b.' prefix, fetches issues via IssuesClient, and returns formatted content.
    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) })) }; } };
  • Input schema definition using Zod, requiring a non-empty string projectId.
    const schema = { projectId: z.string().nonempty() };
  • src/server.ts:12-14 (registration)
    Generic registration loop that registers the 'get-issues' tool (imported as part of tools) with the MCP server using server.tool().
    for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }
  • src/tools/index.ts:5-5 (registration)
    Re-export of the getIssues tool object from its source file, enabling its inclusion in the server's tools import.
    export { getIssues } from "./get-issues.js";
  • Shared helper function to retrieve a cached APS access token for given scopes, called within the get-issues 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; }

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