Skip to main content
Glama

debug_testcase

Fetch historical run and failure data for a test case to identify patterns, root causes, and get AI-powered fix suggestions. Use to debug failing tests across branches and runs.

Instructions

Fetch historical execution and failure data for a specific test case. Returns raw historical data with test run details (ID, counter, branch), test runs summary, and a debugging prompt from the API. Each execution includes its associated test run information (testRunId, testRunCounter, branch) to help correlate failures across different test runs and branches. The AI client will analyze the data to identify failure patterns, find root causes, and provide fix suggestions. Use this when you need to debug a failing test case. Example: 'Debug test case "Verify user login"'. Set include_ai_insights=true to also get TestDino's stored AI analysis for this test under ai_fixes: recommendations (investigation/remediation steps + reasoning + historical insight) and quick fixes (concrete fixes, often with code snippets, plus long-term stabilization steps). By default they target the most recent failing execution; pass testrun_id to target a specific run. AI payloads are generated lazily — if ai_fixes sections report status "in_progress", poll get_ai_insights(testrun_id=..., testcase_id=...) until they report "completed". An "unavailable" section carries the upstream statusCode: a 5xx or timeout is transient (retry once via get_ai_insights); a 4xx (bad ids) is terminal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (Required). The TestDino project identifier.
testrun_idNoOnly with include_ai_insights: target the AI fixes at this specific run instead of the most recent failure.
testcase_nameYesTest case name/title to debug (Required). Example: 'Verify user can logout and login'.
suite_file_pathNoOptional spec file path to disambiguate when several tests share the same title. Example: 'tests/checkout.spec.ts'.
include_ai_insightsNoAttach AI recommendations + quick fixes for this test under `ai_fixes` (targets the most recent failing execution unless testrun_id is set). If a section reports `in_progress`, poll get_ai_insights(testrun_id=..., testcase_id=...) instead of re-calling this tool.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses that each execution includes testRunId/testRunCounter/branch, that AI insights are generated lazily and may report 'in_progress', and how to interpret the 'unavailable' status code. It also states that the AI client will analyze the data for root causes, setting expectations for the tool's role.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every section earns its place: purpose, return contents, parameter guidance, and error handling. It is front-loaded with the core purpose and includes an illustrative example. However, the AI-payload explanation is somewhat dense and could be condensed without losing essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description covers the key return components (raw historical data with test run details, test runs summary, debugging prompt, and optional ai_fixes) and explains the lazy AI generation and polling behavior. It does not fully detail the exact JSON structure of historical data, but it provides enough for an agent to use the tool and follow up appropriately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already covers all five parameters (100% coverage), the description adds crucial semantics beyond the schema: it explains that testrun_id is only valid with include_ai_insights and targets a specific run rather than the most recent failure, and that suite_file_path disambiguates tests with identical titles. This enriches the parameter understanding beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Fetch historical execution and failure data for a specific test case.' It also explicitly states the intended use case ('Use this when you need to debug a failing test case') and provides an example, clearly distinguishing it from siblings like get_testcase_details or get_ai_insights.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear when-to-use guidance ('Use this when you need to debug a failing test case') and explicitly names alternatives for follow-up actions: if ai_fixes status is 'in_progress', poll get_ai_insights instead of re-calling this tool; transient 5xx/timeout errors should be retried once via get_ai_insights, while 4xx errors are terminal. This is strong, actionable usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/testdino-hq/testdino-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server