get_suite
Retrieve test suite details including title, description, and metadata by specifying a suite ID. Use this tool to access comprehensive information about specific test suites in TestCollab projects.
Instructions
Get details of a specific test suite by ID. Returns the suite's title, description, parent_id, and other metadata.
Required: id (suite ID) Optional: project_id
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Suite ID to retrieve (required) | |
| project_id | No | Project ID (optional if TC_DEFAULT_PROJECT is set) |
Implementation Reference
- src/tools/suites/get.ts:40-92 (handler)The handler function `handleGetSuite` executes the logic to fetch a test suite by ID from the API client.
export async function handleGetSuite(args: { id: number; project_id?: number; }): Promise<{ content: Array<{ type: "text"; text: string }> }> { try { const projectId = resolveProjectId(args.project_id); if (!projectId) { return { content: [ { type: "text" as const, text: JSON.stringify({ error: { code: "MISSING_PROJECT_ID", message: "No project_id provided and no default project configured. Set TC_DEFAULT_PROJECT or pass project_id.", }, }), }, ], }; } const client = getApiClient(); const result = await client.getSuite(args.id, projectId); return { content: [ { type: "text" as const, text: JSON.stringify({ suite: result, }), }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: JSON.stringify({ error: { code: "GET_SUITE_FAILED", message: error instanceof Error ? error.message : "Unknown error", }, }), }, ], }; } } - src/tools/suites/get.ts:15-21 (schema)The schema definition for the `get_suite` tool inputs.
export const getSuiteSchema = z.object({ id: z.number().describe("Suite ID to retrieve (required)"), project_id: z .number() .optional() .describe("Project ID (optional if TC_DEFAULT_PROJECT is set)"), }); - src/tools/suites/get.ts:27-34 (registration)The tool definition including its name and description.
export const getSuiteTool = { name: "get_suite", description: `Get details of a specific test suite by ID. Returns the suite's title, description, parent_id, and other metadata. Required: id (suite ID) Optional: project_id`, };