Skip to main content
Glama

fetch_sysout

Fetch a mainframe job's SYSOUT, surface its return code and any abend, then purge the spool to keep the JES queue clean.

Instructions

Fetch a job's SYSOUT and surface RC + abend if present.

Detects abends inside the returned spool body and trips the abend lockout the same way a screen-side check_for_errors would. The spool is purged after fetch so the JES output queue stays clean.

Args: job_id: JES job id, or "last" for the most recent. ddname: Reserved for future per-DD filtering (requires SDSF; TSO OUTPUT returns the union). Currently informational only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ddnameNoALL
job_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the spool is purged after fetch, which is a critical side effect, and that abend detection triggers a lockout similar to check_for_errors. It also clarifies the ddname parameter's current informational nature. This is solid but does not cover every edge case like error handling for nonexistent jobs.

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 concise, around 120 words, with the core purpose front-loaded. It uses a clear structure: a one-sentence summary, then behavioral details, then an args list. Every sentence adds value with no filler.

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?

The tool has a simple signature with one required param and an output schema (indicated but not shown). The description covers the main purpose, side effects, and parameters, which is sufficient for most use cases. However, it does not mention potential error conditions or prerequisites like requiring an active session, though these might be implied by the tool family. Minor gap.

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 0%, so the description must explain parameters, and it does excellently. job_id is explained with the 'last' special value, and ddname is given context about its future use and current limitations. This fully compensates for the lack of schema descriptions.

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 verb 'fetch' and resource 'SYSOUT', and adds the key outcome of surfacing RC and abend. It also mentions side effects (purge) which help differentiate from other tools like check_job. The purpose is unambiguous and specific.

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 implies usage by mentioning detection of abends similar to check_for_errors, but it does not explicitly state when to prefer this tool over alternatives like check_job or list_my_jobs. There is no clear exclusionary guidance or conditional use case. The 'currently informational only' for ddname is a useful hint but not a full usage rule.

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