Skip to main content
Glama

decode_ebcdic_record

Decode raw IBM CP037 EBCDIC, COMP-3, and COMP-4 hex records against a COBOL copybook to return structured JSON, 88-level condition flags, REDEFINES overlays, byte spans, and forensic anomalies.

Instructions

Deterministically decode a raw IBM CP037 EBCDIC / COMP-3 / COMP-4 hex payload against a COBOL Copybook, returning structured JSON, 88-level condition flags, REDEFINES overlays, byte-by-byte spans, and forensic anomalies.

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": {
      "copybook": "<copybook>",
      "ebcdicHex": "<ebcdicHex>"
    },
    "name": "decode_ebcdic_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
copybookYesCOBOL Copybook source text.
ebcdicHexYesHex-encoded mainframe binary record bytes (spaces/newlines allowed).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior2/5

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

With zero annotations, the description must carry the full behavioral burden. It discloses that the operation is deterministic and enumerates response features (88-level flags, REDEFINES overlays, byte spans, anomalies), but says nothing about failure modes for malformed hex, unsupported copybook constructs, size limits, or whether it is strictly non-mutating.

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?

A single front-loaded sentence that leads with the verb and input formats before listing outputs; the output enumeration is dense but earns its place given the absence of an output schema.

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 two-parameter decode tool with no annotations or output schema, the description covers input families and the resulting structure well. The remaining gap is error/edge-case behavior, which is a real but secondary omission.

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 both parameters are already documented; the description adds only the supported encoding family context (CP037/COMP-3/COMP-4) and no new constraints on the copybook text or hex payload format.

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?

States a specific verb and resource ('decode a raw IBM CP037 EBCDIC / COMP-3 / COMP-4 hex payload against a COBOL Copybook') plus the return shape, so an agent can distinguish it from encode_ebcdic_record purely from the description.

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

Usage Guidelines2/5

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

No when-to-use or when-not guidance, no mention of the inverse tool, and no stated prerequisites such as whether the copybook must first pass through compile_copybook or whether single vs multi-record input is expected.

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