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 — 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.

Input Schema

TableJSON 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.8/5.0
Behavior5/5

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

Annotations only carry readOnlyHint and openWorldHint, and the description adds substantive behavioral context beyond them: OCR handling for scans and photos, per-mode latency, async completion semantics, and firm exclusions (no legal advice, no review, no recommendation). This is well past what the annotations disclose.

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?

Front-loaded with purpose, then inputs, then behavior, then output shape and timing. Dense but every sentence carries actionable information; slightly long, though nothing is clearly expendable.

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?

With no output schema, the description steps in to describe the return shape (clauses with original wording, plain-language version, why it matters, plus a summary). Combined with async and OCR notes, an agent has everything needed to call and interpret this 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?

Schema coverage is 100%, so the baseline would be 3, but the description adds a genuine cross-parameter rule the schema cannot express: exactly one of pdf/text/images must be supplied. It also explains the rationale for choosing pdf (no usable text layer, layout matters) versus OCR'd images.

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?

Names a specific verb (explains) and resource (contract, official letter, tax assessment, T&Cs), and scopes it clause-by-clause. It also distinguishes itself from its only sibling by stating when the call defers to get_explanation.

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?

Explicitly states the three accepted input modes and the constrainable 'exactly one of the three', plus the fallback path ('use get_explanation with the returned analysis_id'). It also gives expected latency for each mode so an agent can pick sensibly.

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