Skip to main content
Glama

grep_job_logs

Search CI job logs for regex patterns to locate mid-log failures like E2E errors or build issues, returning matching lines with surrounding context.

Instructions

Grep a job log for lines matching a regex (case-insensitive). Returns matching lines with 2 lines context before/after. Use when failure is mid-log (E2E tests, build errors) rather than at the tail. Input: {repo, jobId, pattern: string, maxMatches?: number=50}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
jobIdYes
patternYesRegex pattern (case-insensitive)
maxMatchesNoMax matching lines (default 50)
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses key behaviors: regex matching (case-insensitive), returns matching lines with 2 lines of context before/after, and default maxMatches of 50. However, it does not mention error handling, permissions, or whether the operation is read-only, but the core behavior is well-covered.

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?

The description is three sentences front-loading the main action, then output format, usage guidance, and input format. Every sentence is necessary and there is no fluff.

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's complexity (regex search with context) and lack of output schema, the description is largely complete. It covers purpose, usage, input, and output format. It could add error handling or performance notes, but for the intended use case it suffices.

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 description coverage is only 50% (pattern and maxMatches have descriptions, repo and jobId do not). The description compensates by listing all parameters in a compact format: 'Input: {repo, jobId, pattern: string, maxMatches?: number=50}', clarifying types and providing default value for maxMatches.

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 'Grep a job log for lines matching a regex (case-insensitive)'. It specifies a specific verb (grep) and resource (job log), and distinguishes itself from sibling tools like get_job_logs_tail by focusing on pattern matching with context lines.

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?

The description explicitly provides when to use: 'Use when failure is mid-log (E2E tests, build errors) rather than at the tail.' This implies when not to use (for tail failures) and gives context signals, differentiating from the sibling tool get_job_logs_tail.

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/aamar-shahzad/ci-triage-mcp'

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