get-issue-types
Retrieve all issue types available in an Autodesk Construction Cloud project to categorize and manage project issues effectively.
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:6-8 (schema)Zod schema defining the input parameter 'projectId' for the get-issue-types tool.const schema = { projectId: z.string().nonempty() };
- src/tools/get-issue-types.ts:14-26 (handler)Handler function implementing the tool logic: fetches access token, initializes IssuesClient, processes projectId, retrieves issue types, and returns them 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/server.ts:12-14 (registration)Registration of all tools (imported as * from './tools/index.js', which includes get-issue-types) to the MCP server using server.tool().for (const tool of Object.values(tools)) { server.tool(tool.title, tool.description, tool.schema, tool.callback); }