Skip to main content
Glama

get_failures_by_pattern

Group failed tests by error pattern to identify root causes. Shows count, affected suites, and sample error for each pattern.

Instructions

Group failed tests by error pattern (e.g., "is not a function", "Cannot read properties"). Shows count, affected suites/files, and sample error for each pattern. Best for quickly identifying root causes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNoNumber of top error patterns to return (default: 10)
job_idYesGitHub Actions job ID
run_idYesGitHub Actions workflow run ID
Behavior4/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It explains the output includes count, affected suites/files, and sample error, giving a clear picture of what the tool returns without stating side effects (which are none apparent for a read operation).

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

Conciseness5/5

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

Three sentences: first states the grouping functionality, second lists output fields, third identifies best use case. Every sentence is informative, no filler words, efficiently front-loaded.

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 the tool has no output schema, the description adequately covers the return format (count, suites/files, sample error). It could mention default sorting or ordering but is sufficient for an agent to understand the output structure.

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

Parameters3/5

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

Schema description coverage is 100%, so the JSON schema already documents all three parameters (run_id, job_id, top_n). The description does not add any additional parameter semantics beyond what is in the 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 the tool groups failed tests by error pattern, using specific examples like "is not a function". This differentiates it from sibling tools like get_failed_tests which likely list individual failures, and get_flaky_tests which focus on flaky behavior.

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

Usage Guidelines3/5

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

The description says 'Best for quickly identifying root causes,' which provides context but does not explicitly state when not to use this tool, nor does it mention alternatives like get_failed_tests for individual failure details.

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/grahamnotgrant/blacksmith-mcp'

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