list_manual_test_cases
Search and list manual test cases with filters by project, status, priority, severity, type, and more for QA testing and test case management.
Instructions
Search and list manual test cases with filtering capabilities. Use this to find specific manual test cases for QA testing, auditing, or test case management. Supports filtering by project, time, suite, status, priority, severity, type, layer, behavior, automation status, and tags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID (Required). The TestDino project identifier. | |
| time | No | Filter by time interval. | |
| search | No | Search term to match against title or caseId. Example: 'login' or 'TC-123'. | |
| suiteId | No | Filter by specific test suite ID. Use list_manual_test_suites to find suite IDs. | |
| status | No | Filter by test case status. | |
| priority | No | Filter by priority level. | |
| severity | No | Filter by severity level. | |
| type | No | Filter by test case type. | |
| layer | No | Filter by test layer. | |
| behavior | No | Filter by test behavior type. | |
| automationStatus | No | Filter by automation status. | |
| tags | No | Filter by tags. Can be a single tag or comma-separated tags. Example: 'smoke' or 'smoke,regression,login'. | |
| limit | No | Maximum number of results to return (default: 10, max: 1000). |
Implementation Reference
- The handler function that executes the 'list_manual_test_cases' tool logic. It validates inputs, builds query params, calls the API endpoint, and returns results.
export async function handleListManualTestCases( args?: ListManualTestCasesArgs ) { // Read PAT from environment variable (set in mcp.json) or from args const token = getApiKey(args); if (!token) { throw new Error( "Missing TESTDINO_PAT environment variable. " + "Please configure it in your .cursor/mcp.json file under the 'env' section." ); } // Validate required parameter if (!args?.projectId) { throw new Error("projectId is required"); } try { const params: ListManualTestCasesParams = { projectId: String(args.projectId), }; // Add optional filters if (args?.time) { params.time = String(args.time); } if (args?.search) { params.search = String(args.search); } if (args?.suiteId) { params.suiteId = String(args.suiteId); } if (args?.status) { params.status = String(args.status); } if (args?.priority) { params.priority = String(args.priority); } if (args?.severity) { params.severity = String(args.severity); } if (args?.type) { params.type = String(args.type); } if (args?.layer) { params.layer = String(args.layer); } if (args?.behavior) { params.behavior = String(args.behavior); } if (args?.automationStatus) { params.automationStatus = String(args.automationStatus); } if (args?.tags) { params.tags = String(args.tags); } if (args?.limit !== undefined) { params.limit = Number(args.limit); } else { params.limit = 10; // Default limit } const listManualTestCasesUrl = endpoints.listManualTestCases(params); const response = await apiRequestJson<unknown>(listManualTestCasesUrl, { headers: { Authorization: `Bearer ${token}`, }, }); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); throw new Error(`Failed to list manual test cases: ${errorMessage}`); } } - Input arguments interface (ListManualTestCasesArgs) and input schema for the tool's properties and validation.
interface ListManualTestCasesArgs { projectId: string; time?: "last 1 hour" | "Last 5 hours" | "Yesterday" | "last 7 days"; search?: string; suiteId?: string; status?: "active" | "draft" | "deprecated"; priority?: "high" | "medium" | "low" | "Not set"; severity?: | "Blocker" | "critical" | "major" | "Normal" | "minor" | "trivial" | "Not set"; type?: | "functional" | "smoke" | "regression" | "security" | "performance" | "e2e" | "Integration" | "API" | "Unit" | "Accessability" | "Compatibility" | "Acceptance" | "Exploratory" | "Usability" | "Other"; layer?: "e2e" | "api" | "unit" | "not set"; behavior?: "positive" | "negative" | "destructive" | "Not set"; automationStatus?: "Manual" | "Automated" | "To be automated"; tags?: string; limit?: number; } - Tool definition object with name 'list_manual_test_cases', description, and JSON Schema input validation.
export const listManualTestCasesTool = { name: "list_manual_test_cases", description: "Search and list manual test cases with filtering capabilities. Use this to find specific manual test cases for QA testing, auditing, or test case management. Supports filtering by project, time, suite, status, priority, severity, type, layer, behavior, automation status, and tags.", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project ID (Required). The TestDino project identifier.", }, time: { type: "string", description: "Filter by time interval.", enum: ["last 1 hour", "Last 5 hours", "Yesterday", "last 7 days"], }, search: { type: "string", description: "Search term to match against title or caseId. Example: 'login' or 'TC-123'.", }, suiteId: { type: "string", description: "Filter by specific test suite ID. Use list_manual_test_suites to find suite IDs.", }, status: { type: "string", description: "Filter by test case status.", enum: ["active", "draft", "deprecated"], }, priority: { type: "string", description: "Filter by priority level.", enum: ["high", "medium", "low", "Not set"], }, severity: { type: "string", description: "Filter by severity level.", enum: [ "Blocker", "critical", "major", "Normal", "minor", "trivial", "Not set", ], }, type: { type: "string", description: "Filter by test case type.", enum: [ "functional", "smoke", "regression", "security", "performance", "e2e", "Integration", "API", "Unit", "Accessability", "Compatibility", "Acceptance", "Exploratory", "Usability", "Other", ], }, layer: { type: "string", description: "Filter by test layer.", enum: ["e2e", "api", "unit", "not set"], }, behavior: { type: "string", description: "Filter by test behavior type.", enum: ["positive", "negative", "destructive", "Not set"], }, automationStatus: { type: "string", description: "Filter by automation status.", enum: ["Manual", "Automated", "To be automated"], }, tags: { type: "string", description: "Filter by tags. Can be a single tag or comma-separated tags. Example: 'smoke' or 'smoke,regression,login'.", }, limit: { type: "number", description: "Maximum number of results to return (default: 10, max: 1000).", default: 10, }, }, required: ["projectId"], }, - src/index.ts:237-241 (registration)Registration of the tool handler in the main server's call-tool request handler (routes by name).
if (name === "list_manual_test_cases") { return await handleListManualTestCases( args as Parameters<typeof handleListManualTestCases>[0] ); } - src/lib/endpoints.ts:187-206 (helper)Endpoint helper that builds the API URL for listing manual test cases: /api/mcp/manual-tests/:projectId/test-cases
listManualTestCases: (params?: { projectId: string; time?: string; search?: string; suiteId?: string; status?: string; priority?: string; severity?: string; type?: string; layer?: string; behavior?: string; automationStatus?: string; tags?: string; limit?: number; }): string => { const baseUrl = getBaseUrl(); const { projectId, ...queryParams } = params || {}; const queryString = queryParams ? buildQueryString(queryParams) : ""; return `${baseUrl}/api/mcp/manual-tests/${projectId}/test-cases${queryString}`; },