Skip to main content
Glama

analyze_test_results

Analyze JUnit XML or CSV test results to identify flaky, ever-failing, never-run, and slowest tests. Returns structured health metrics for multiple runs.

Instructions

Deterministic test-results health metrics (flaky / ever-failing / never-run / slowest / failure clustering) from real test execution data — no LLM anywhere in this call path; write your own narrative from the returned numbers. Provide exactly one of junit_xml or csv_text. junit_xml is normally one JUnit XML report string for one run (accepts both a and a bare root); to analyze flakiness across MULTIPLE runs in one call, pass a JSON array of {"run_id": "...", "xml": "..."} objects instead — either as a genuine JSON array/list argument, or as a string starting with "[" (some MCP clients stringify array arguments; both forms are accepted). csv_text columns: required name/classname/status (passed|failed|error|skipped), optional run_id/duration_s/message. reference_tests, if given, is a list of test identities ("classname::name") expected to have run — any absent from the results are reported under never_run. Flaky = pass_rate strictly between flaky_min and flaky_max with at least 3 executions; fewer executions is reported as insufficient data, not flaky. Malformed/oversized input never raises — it returns a structured {"error": "invalid_argument", ...}. Returns the full ResultsAnalysis as JSON (runs, total_tests, executions, overall_pass_rate, flaky, ever_failing, never_run, slowest, failure_clusters, per_run, warnings).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csv_textNo
flaky_maxNo
flaky_minNo
junit_xmlNo
reference_testsNo
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: no LLM in call path, deterministic results, how flaky thresholds work, handling of malformed/oversized input returning an error struct, and the never_run logic for reference_tests. Provides clear expectations for the agent.

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 lengthy but every sentence adds value. It front-loads the core purpose and constraints, then details input formats and behaviors. Slightly verbose but justified by complexity; no wasted words.

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

Completeness5/5

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

Given the tool's complexity (multiple input formats, flakiness analysis, reference tests) and no output schema, the description provides complete coverage: input formats, output structure (ResultsAnalysis JSON), error handling, and edge cases like insufficient data for flaky detection. Fully equips an agent to use the tool correctly.

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?

The input schema has 0% description coverage, but the description compensates thoroughly: explains junit_xml format (string vs JSON array), csv_text columns (name/classname/status/optional fields), flaky_min/max defaults, and reference_tests format ('classname::name'). Adds meaning far beyond the bare schema.

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 clearly states it provides 'Deterministic test-results health metrics' with a specific list of outputs (flaky, ever-failing, never-run, slowest, failure clustering). It immediately distinguishes itself from unrelated sibling tools (retrieve_qa_knowledge, etc.) by focusing on test execution data analysis.

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

Usage Guidelines4/5

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

Explicitly instructs to provide exactly one of junit_xml or csv_text, explains how to handle multiple runs via JSON array, and describes the optional reference_tests parameter. While it doesn't explicitly state when not to use this tool, the sibling tools are in a different domain, so the usage context is clear.

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/gvasile29/qai-consultant'

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