Skip to main content
Glama

encode_ebcdic_record

Converts a JSON object into a fixed-width IBM CP037 EBCDIC, COMP-3, or COMP-4 mainframe record using a COBOL copybook, so test data and file payloads match exact wire format.

Instructions

Encode a modern JSON object into an exact fixed-width IBM CP037 EBCDIC / COMP-3 / COMP-4 mainframe wire record.

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>",
      "record": "<record>"
    },
    "name": "encode_ebcdic_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
recordYesJSON object matching Copybook field names (camelCase or COBOL UPPER-CASE).
copybookYesCOBOL Copybook source text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose meaningful traits — exact fixed-width output, CP037 charset, COMP-3/COMP-4 numeric packing — but says nothing about what the encoded result actually is (hex string, base64, raw bytes) or how mismatched fields/validation failures are handled.

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?

A single front-loaded sentence with zero filler; the target formats are packed in without wasted words.

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

Completeness3/5

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

The tool is moderately complex (nested object input, no annotations, no output schema). The description identifies the encoding target but omits return-value form and error/validation behavior, which an agent needs since no output schema exists to explain them.

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 in the schema. The description adds no new meaning about the copybook or record parameters beyond restating that a JSON object is encoded against a copybook.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Encode a modern JSON object into ... wire record') and names the target encodings (CP037, COMP-3, COMP-4). The encode/decode verb split makes it distinguishable from decode_ebcdic_record, though the sibling is never named explicitly.

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?

Usage is only implied by the verb 'encode' and the mention of mainframe wire records; there is no explicit when-to-use, when-not-to-use, or prerequisite statement (e.g., that a copybook must already be compiled or that the record keys must match copybook fields).

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