get_runs
Retrieve all test runs within a project using specific filters like status, milestone, environment, and date range for efficient test management and tracking.
Instructions
Get all test runs in a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| environment | No | ||
| fromStartTime | No | ||
| include | No | ||
| limit | No | ||
| milestone | No | ||
| offset | No | ||
| search | No | ||
| status | No | ||
| toStartTime | No |
Implementation Reference
- src/index.ts:358-383 (handler)MCP tool handler for 'get_runs': parses arguments using GetRunsSchema and invokes the getRuns helper function with the unpacked parameters..with({ name: 'get_runs' }, ({ arguments: args }) => { const { code, search, status, milestone, environment, fromStartTime, toStartTime, limit, offset, include, } = GetRunsSchema.parse(args); return getRuns([ code, search, status, milestone, environment, fromStartTime, toStartTime, limit, offset, include, ]); })
- src/operations/runs.ts:6-17 (schema)Zod input schema for the 'get_runs' tool, defining parameters like code, search, status, etc.export const GetRunsSchema = z.object({ code: z.string(), search: z.string().optional(), status: z.string().optional(), milestone: z.number().optional(), environment: z.number().optional(), fromStartTime: z.number().optional(), toStartTime: z.number().optional(), limit: z.number().optional(), offset: z.number().optional(), include: z.string().optional(), });
- src/index.ts:190-194 (registration)Tool registration in ListToolsRequestSchema handler, specifying name, description, and input schema for 'get_runs'.{ name: 'get_runs', description: 'Get all test runs in a project', inputSchema: zodToJsonSchema(GetRunsSchema), },
- src/operations/runs.ts:25-28 (helper)Helper function getRuns that wraps the client.runs.getRuns API call using pipe, apply, and toResult utility.export const getRuns = pipe( apply(client.runs.getRuns.bind(client.runs)), toResult, );