get-issue-types
Retrieve all issue types in an Autodesk Construction Cloud project using project ID. Simplify project issue management by accessing detailed issue type information through the APS MCP Server.
Instructions
List all issue types in an Autodesk Construction Cloud project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes |
Implementation Reference
- src/tools/get-issue-types.ts:14-26 (handler)The asynchronous callback function that implements the core logic of the 'get-issue-types' tool: obtains access token, initializes IssuesClient, strips 'b.' prefix from projectId, fetches issue types, and formats results as text content.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 issueTypes = await issuesClient.getIssuesTypes(projectId, { accessToken }); if (!issueTypes.results) { throw new Error("No issue types found"); } return { content: issueTypes.results.map((issue) => ({ type: "text", text: JSON.stringify(issue) })) }; }
- src/tools/get-issue-types.ts:6-8 (schema)Zod schema defining the input parameters for the tool (projectId as non-empty string).const schema = { projectId: z.string().nonempty() };
- src/server.ts:12-14 (registration)Registration loop in the MCP server that dynamically registers all tools (imported as namespace 'tools' from './tools/index.js'), including 'get-issue-types' via its 'title' property.for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }
- src/tools/index.ts:6-6 (registration)Re-export of the getIssueTypes tool from its implementation file, making it available for namespace import in server.ts.export { getIssueTypes } from "./get-issue-types.js";