Skip to main content
Glama

charm_read_diagram

Read-only

View an original diagram and its separately labeled stored machine OCR.

Use the exact source page path and a diagrams[].index from charm_read_source.
Returns native image content plus provenance and available OCR text, confidence
and bounding boxes. Verify numbers and flowchart branches visually; OCR can err.
OCR may be unavailable; that does not mean the diagram has no text.
Follow ocr.next_offset with ocr_offset to read longer OCR; ocr_limit is 1–20000.

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

Input Schema

NameRequiredDescriptionDefault
pathYes
ocr_limitNo
ocr_offsetNo
image_indexYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the readOnly/destructive annotations it discloses the return shape (native image content, provenance, OCR text, confidence, bounding boxes) and two important failure modes: OCR may be unavailable, and absent OCR does not mean the diagram has no text. It does not address large-image handling or what happens on an invalid index.

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?

Five short sentences, front-loaded with the primary action, then sourcing requirements, then return contract, then caveats, then pagination. No sentence is redundant and the OCR-reliability warning earns its place.

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

Completeness5/5

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

Without an output schema the description nonetheless specifies the return contract (image content, provenance, OCR text with confidence and boxes) and the pagination mechanism, which is what an agent needs to call it correctly and interpret results. Nothing material is missing for a read-only, 4-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description must carry all parameter meaning, and it largely does: path and image_index are tied to their origin in charm_read_source, ocr_offset is tied to following ocr.next_offset, and ocr_limit is bounded at 1–20000. Defaults (12000/0) and whether ocr_limit=0 disables OCR are left only to the schema.

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 ('View an original diagram') plus a second payload ('its separately labeled stored machine OCR'), which immediately distinguishes it from charm_read_source. An agent knows exactly what it gets back without opening the schema.

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

Usage Guidelines4/5

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

Explicitly routes the agent to charm_read_source for the required 'source page path and a diagrams[].index', so the correct calling context is clear. It also advises verifying numbers and flowchart branches visually, but never states a when-not-to-use case or an alternative tool for diagram-heavy extraction.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.