Skip to main content
Glama
ebcdicjp-mcp

ebcdicjp-mcp

by yukijames25

detect_codepage

Determines whether a Japanese EBCDIC data file uses IBM930 or IBM939, returning both previews with an 'ambiguous' result when the code page cannot be determined.

Instructions

Guess whether a data file is IBM930 or IBM939 (says 'ambiguous' with both previews when it can't tell).

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": {
      "path": "<path>"
    },
    "name": "detect_codepage"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
copybookNoAbsolute path to the COBOL copybook
copybook_encodingNoauto = UTF-8, else Shift_JIS (cp932)auto

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the important behavioral trait that the tool may return 'ambiguous' with both previews rather than a single answer, which is exactly the kind of non-obvious outcome an agent must handle; however it says nothing about permissions, uncertainty thresholds, or how the copybook parameters influence the guess.

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 well-formed sentence that front-loads the verb and resource and parenthetically covers the edge case. No filler, though the parenthetical could be slightly tighter.

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 three-parameter detection tool with no output schema and no annotations, the description covers purpose and the key ambiguous-return behavior. It falls short on how copybook/copybook_encoding affect the result and whether an explicit failure can occur, but the essentials are present.

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?

With 67% schema coverage the baseline is around 3. The description adds no information about what the three parameters do or how the optional copybook refines detection — it only discusses the file path implicitly — so the schema does the heavy lifting for copybook and copybook_encoding.

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?

The description names a specific action (guess) and specific resource (a data file's codepage), with the concrete candidate encodings IBM930 vs IBM939. It distinguishes itself from generic siblings like decode_bytes or read_records, though the sibling set does not include a competing detection tool.

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 — call this when you don't know whether a file is IBM930 or IBM939 — and the description clarifies the ambiguous-outcome behavior. It gives no explicit when-not guidance or pointer to which tool to use after detection (e.g., decode_bytes).

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