list-projects
Retrieve a list of all qTest projects, or fetch a single project by providing its ID.
Instructions
Projects — list all qTest projects, or fetch a single project by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Project ID; omit to list all projects |
Implementation Reference
- src/tools/projects/list_projects.ts:9-19 (handler)The core handler that executes the list-projects tool logic. If projectId is provided, fetches a single project by ID; otherwise fetches all projects.
export async function listProjects(args: ListProjectsArgs): Promise<QTestProject | QTestProject[]> { const { projectId } = args if (projectId !== undefined) { const raw = await qtestFetchGlobal(config, `/projects/${projectId}`, 'GET') return raw as QTestProject } const raw = await qtestFetchGlobal(config, '/projects', 'GET') return extractArray<QTestProject>(raw) } - Input argument interface for listProjects, accepting an optional projectId number.
export interface ListProjectsArgs { projectId?: number }