list_projects
Retrieve accessible Codebeamer projects with IDs, names, and keys to enable fetching trackers and items.
Instructions
List all Codebeamer projects the authenticated user can access. Returns a summary table with project IDs, names, and keys. Use the returned IDs to fetch trackers or items.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (starts at 1) | |
| pageSize | No | Items per page (max 100) |
Implementation Reference
- src/tools/projects.ts:37-40 (handler)The handler for "list_projects" that calls the client and formats the output.
async ({ page, pageSize }) => { const result = await client.listProjects(page, pageSize); return { content: [{ type: "text", text: formatProjectList(result) }] }; }, - src/tools/projects.ts:13-41 (registration)Registration of the "list_projects" tool.
server.registerTool( "list_projects", { title: "List Projects", description: "List all Codebeamer projects the authenticated user can access. " + "Returns a summary table with project IDs, names, and keys. " + "Use the returned IDs to fetch trackers or items.", inputSchema: { page: z .number() .int() .min(1) .default(1) .describe("Page number (starts at 1)"), pageSize: z .number() .int() .min(1) .max(100) .default(25) .describe("Items per page (max 100)"), }, }, async ({ page, pageSize }) => { const result = await client.listProjects(page, pageSize); return { content: [{ type: "text", text: formatProjectList(result) }] }; }, ); - Implementation of the project listing call within the CodebeamerClient.
async listProjects(page: number, pageSize: number): Promise<CbProject[]> { const raw = await this.http.get<unknown>("/projects", { params: { page, pageSize }, resource: "projects", }); return toArray(raw); }