Skip to main content

1. Connect

Add https://harwell.metaphi.ai/mcp/ to your MCP client and sign in. See Connect an MCP server. You need harwell:runs:write.

2. Write a unit

A unit is a directory in a mainframe codebase’s own shape, plus a run.json that says what to run.
Progs/HELLO.cbl:
Procs/HELLOJOB.jcl:
run.json:
submit names the deck by its file stem in Procs/. The deck runs program HELLO, found by its PROGRAM-ID.

3. Run it

Ask your agent: “Run the hello unit with Harwell.” It calls run_unit with the directory:
unit_zip_b64 is the directory as a base64 zip. Hum packs a directory path for you. In any other client, the agent runs:

4. Read the result

The first line is the verdict. Then comes the job log, one line per step, and what each step displayed. The result also carries:
  • structuredContent: the same result as JSON: status, verdict, diagnostics, and every job and step with its return code.
  • Resource links to report.json, every listing and every spool file. Read one with resources/read when the text is not enough.
A step that ran reads ran or ok. Anything else failed, and the call is a tool error.

5. Break it

Change HELLO.cbl to use a name it never declares:
Run it again. The result opens with the compiler’s first error, at the line in your tree, and the call is a tool error:
Fix the line and run again.

Next