Skip to main content
Glama

compile_copybook

Generate exact byte offsets, record length, JSON Schema, TypeScript types, and SQL DDL from 80-column or free-format COBOL DATA DIVISION copybooks.

Instructions

Compile an 80-column punched-card or free-format COBOL DATA DIVISION Copybook into exact byte offsets, total record length, JSON Schema, TypeScript types, and SQL DDL.

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

Input Schema

NameRequiredDescriptionDefault
copybookYesCOBOL Copybook source text (supports 80-col fixed format or free format).
sqlDialectNoTarget SQL dialect for generated CREATE TABLE DDL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the burden and it does disclose the concrete output surface (offsets, length, JSON Schema, TS, DDL), which tells an agent this is a deterministic source-to-artifact transformation rather than a mutation. It stops short of stating failure behavior on malformed copybooks or whether output is one combined document or several.

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 sentence with no filler, front-loading the action and resource before listing the artifacts. Every clause carries information an agent needs to select and call the tool.

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?

With only two parameters, no nested objects, and no output schema, the description supplies enough by enumerating exactly which artifacts are returned. It could be slightly stronger by saying whether all artifacts come back together or which are conditional on sqlDialect, but nothing essential is missing.

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, including the sqlDialect enum values. The description's only added signal is reiterating the 80-column vs free-format support, which duplicates the copybook field description; baseline 3 applies.

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 pairs a specific verb ('Compile') with a precise resource ('COBOL DATA DIVISION Copybook') and enumerates the exact artifacts produced: byte offsets, record length, JSON Schema, TypeScript types, SQL DDL. That output set clearly separates it from siblings like decode_ebcdic_record or inspect_hollerith_deck, which operate on records/decks rather than copybook source.

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 implied by the resource type — an agent can infer this is the tool for turning copybook source into layout/type artifacts — but there is no explicit statement of when to prefer it over an alternative, no prerequisites, and no exclusions. Adequate but leaves routing to inference.

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