Skip to main content
Glama

klaro.legal Document Explainer

Explain a contract or official letter

explain_document
Read-only

Explains a contract, official letter, tax assessment or terms-and-conditions document in plain language, clause by clause. The document can be sent as plain text, as a base64-encoded PDF, or as base64-encoded photos of its pages. Send exactly one of the three. Scans and phone photos without a text layer are read by OCR, so a photographed letter works as well as a typed one. Returns every relevant clause with the original wording, a plain language version and why it matters, plus a short summary. It explains what the document says. It does not give legal advice, does not review the document and does not recommend a course of action. Plain text takes 20 to 60 seconds, a scan or photo longer because of OCR. If it is still running when this call returns, use get_explanation with the returned analysis_id.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "explain_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pdfNoThe document as a base64-encoded PDF, for a file that has no usable text layer or whose layout matters. Up to 8 MB decoded.
textNoThe full text of the document to explain.
imagesNoPhotos or scans of the document pages, base64-encoded, in page order. JPEG, PNG, HEIC or WebP, up to 15 images and 8 MB decoded in total.
languageNoLanguage the explanation should be written in (ISO 639-1). Defaults to English. The document itself may be in any language.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / images
      Added value: +{
      +  "description": "Photos or scans of the document pages, base64-encoded, in page order. JPEG, PNG, HEIC or WebP, up to 15 images and 8 MB decoded in total.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 15,
      +  "type": "array"
      +}
    • addedInput schema / properties / pdf
      Added value: +{
      +  "description": "The document as a base64-encoded PDF, for a file that has no usable text layer or whose layout matters. Up to 8 MB decoded.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "text"
      -]
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the readOnlyHint/openWorldHint annotations it discloses latency characteristics (20–60s for text, longer for OCR), the asynchronous fallback path with analysis_id, and the shape of the returned explanation. The one gap is that it never says whether the analysis_id is always returned or only when timing out, though the polling sentence strongly implies the latter.

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?

Purpose is front-loaded, followed by input modes, exclusions, latency, and the async hand-off — a logical order with no filler sentences. It runs long for a tool description, but nearly every sentence carries operational information an agent would otherwise have to guess.

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?

There is no output schema, yet the description still sketches the return payload (per-clause original wording, plain-language version, rationale, plus a summary) and covers the async case. For a four-parameter, multi-modal document tool this is complete enough to call correctly on the first try.

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?

Schema coverage is 100%, so per the rubric the baseline is 3, but the description adds a genuine constraint the schema does not encode: exactly one of text/pdf/images must be supplied, despite an empty required list. The OCR note also clarifies when the pdf/images paths are preferable to plain text.

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 opens with a specific verb and resource ('Explains a contract, official letter, tax assessment or terms-and-conditions document, clause by clause') and names the concrete output unit (clause). It also explicitly separates itself from the only sibling by noting that unfinished work is retrieved via get_explanation with the returned analysis_id.

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

Usage Guidelines5/5

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

It gives explicit input routing ('Send exactly one of the three'), states that photos and scans without a text layer work via OCR, and draws clear negative boundaries: 'does not give legal advice, does not review the document and does not recommend a course of action.' The hand-off condition to get_explanation is spelled out as well.

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.

Resources