Skip to main content
Glama

Get Debug Evidence

get_debug_evidence
Read-only

Retrieve error details, flake verdict, regression boundary, and trace/image links for a failing test so you can debug from evidence instead of guesswork.

Instructions

Start every failing-test investigation here. One call returns the whole cheap tier of the evidence ladder: the full error message, the computed flake verdict with its per-attempt failure signatures, the regression boundary (the last run this test passed and the first it failed), and download links for the trace, error-context and the expected/actual/diff images on a visual failure. Read all of it before forming a hypothesis. The verdict says whether the failure repeats, never why, so it rules fixes out rather than pointing at a cause; the boundary turns "why does this fail" into "what changed between these two runs", which is a far smaller question. Artifact links are minutes-scale: download what you need immediately, and call this again to mint fresh ones rather than treating an expired link as a missing artifact. Debugging several failures from one run? Pass them all in testcase_ids with testrun_id: one call, with the shared rules and environment sent once.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectId": "<projectId>"
    },
    "name": "get_debug_evidence"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoResponse shape. "md" is markdown, and markedly cheaper for the same content.
maxLengthNoCap the markdown length. Applies to format="md" only; anything cut is announced in the output. JSON is never truncated, because a cut payload would not parse and would read as a complete one.
projectIdYesProject ID (e.g. project_<id>)
testrun_idNoRun scope. Omit to use the most recently started run carrying this case.
testcase_idNoThe case's pw_test_id — exact, so prefer it when known.
testcase_idsNoSeveral pw_test_ids from one run, instead of testcase_id. Needs testrun_id. Always JSON, under `tests`.
testcase_nameNoFull test title. Give this or testcase_id.
suite_file_pathNoSpec file path — only needed when the title is shared across files.
include_instructionsNoDefault false: the response carries short debugging rules. Set true for the full procedure and the trace runbook.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / include_instructions / description
      Previous value: -"Default true. The procedure and the trace runbook are identical on every call and about half the response — set false on repeat calls once you have read them."New value: +"Default false: the response carries short debugging rules. Set true for the full procedure and the trace runbook."
    • addedInput schema / properties / testcase_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Several pw_test_ids from one run, instead of testcase_id. Needs testrun_id. Always JSON, under `tests`."
      +}
  2. Changed5 schema fields changedv2.2.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / maxLength / exclusiveMinimum
      Added value: +0
    • changedInput schema / properties / testcase_id / description
      Previous value: -"The case's pw_test_id."New value: +"The case's pw_test_id — exact, so prefer it when known."
    • changedInput schema / properties / testcase_name / description
      Previous value: -"Full test title. Required for the regression boundary — prefer it when known."New value: +"Full test title. Give this or testcase_id."
  3. Addedv2.0.3

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the read-only/non-destructive profile, so this is bonus context, and it delivers: the verdict describes repetition and never cause, the regression boundary reframes the question as a diff between two runs, and artifact links expire on a minutes scale. The link-expiry behavior in particular is an operational trait no annotation or schema field discloses, and it prevents a common misdiagnosis.

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?

Front-loaded with the routing instruction, then organized as contents → interpretation rules → operational caveats → batching, with no filler sentences. A few clauses are editorial ('which is a far smaller question', 'markedly cheaper'), but they carry reasoning that helps an agent act rather than padding.

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?

For a 9-parameter, no-output-schema tool, the description conveys enough to call it correctly and interpret the payload, including what each evidence component means and the difference between the json and md generation costs implied by the schema. Remaining gaps are minor: no mention of authorization/prerequisites or the shape of the returned JSON beyond the enumerated contents.

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?

Schema coverage is 100%, so the baseline would be 3, but the description adds cross-parameter meaning the schema cannot: batching many pw_test_ids from one run under testrun_id sends shared rules and environment once, and results come back under `tests`. It also tells the agent to download artifacts promptly rather than re-calling with the same inputs.

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?

Names a specific verb and resource ('one call returns the whole cheap tier of the evidence ladder') and enumerates exactly what comes back: error message, flake verdict with per-attempt signatures, regression boundary, and trace/error-context/image artifact links. The opening 'Start every failing-test investigation here' plus the tier framing separates it from deeper-investigation siblings like debug_testcase or get_trace_analysis without needing their schemas.

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?

Explicitly states when to use it (first step of any failing-test investigation, and read everything before hypothesizing) and how to sequence it against alternatives (rule out fixes with the verdict before chasing a cause; narrow with the boundary before asking why). It also gives batch guidance — pass several testcase_ids with testrun_id in one call rather than repeatedly — and tells the agent to re-mint links instead of concluding artifacts are missing.

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