Skip to main content
Glama

Save a readable copy of a case or statute

export_document
Read-onlyIdempotent

Optional. If your client can save files locally and you want a readable copy of a case or statute, this returns the complete document to save; otherwise use get_case / get_statute as before. The document is the syfert.com page as the website renders it (caption, headings, footnotes, star-page markers such as [*551], links to the cited cases): Markdown with YAML front matter (default) or one self-contained HTML file. Returns filename, format, bytes, document and note; the MCP cannot write to disk, so saving document under filename is up to you. A case: cluster_id, or citation (+ case_name). A statute or rule: jurisdiction + citation, as get_statute takes them. A document longer than one response (about 20k tokens) comes in parts that each fit one (page / pages, truncated, next_offset): call again with offset = next_offset and append the parts in order.

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": "export_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNomarkdown (default) or html
offsetNoByte offset of the next part (next_offset from the previous call) for a long document
includeNoSections. Cases: text (the opinion), treatment (flag and strongest signal), propositions (what courts cite it for), cited_by_top (leading citing cases with their parentheticals), scope (how far a red or yellow flag reaches). Statutes: text, cited_by_top (Notes of Decisions), scope (source and scrape date). Default ["text","treatment","scope"].
citationNoA case's reporter citation ("875 F.2d 994"; used if cluster_id is absent), or, with jurisdiction, the section or rule ("90.803", "Nev. J. Ct. R. Civ. P. 70")
case_nameNoCase name; lets a citation newer than the reporter index resolve by name + date
cluster_idNoCluster id of the case
jurisdictionNoFor a statute or rule: the corpus, as get_statute takes it (two-letter state code, usc, cfr, fedrule, sg, fac …)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint, idempotent, non-destructive), and the description adds genuinely new behavior: the returned payload shape (filename, format, bytes, document, note), the fact that persistence is caller-side, the fidelity of the output (site rendering, star-page markers, footnote links), and the ~20k-token truncation/pagination model. The one gap is that the 'note' field's meaning and any failure modes (unresolvable citation, statute jurisdiction mismatches) are not described.

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?

It is a single dense paragraph, but the routing statement is front-loaded and each sentence carries new information (return shape, pagination, per-type parameter recipes). It loses a point for the leading 'Optional.' and 'as before', which are marginally useful framing rather than actionable content, and the parenthetical stacks make it slightly heavy to scan.

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 carries the full burden and meets it: it enumerates the returned fields, explains the pagination contract, documents all seven optional parameters' roles, and clarifies who is responsible for writing the file. Nothing an agent needs in order to call this correctly is missing.

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 already 100%, so the baseline is 3, but the description adds real selection logic the schema cannot: which parameter combination to use per resource type — cluster_id or citation (+ case_name) for a case, jurisdiction + citation for a statute or rule — and how offset/next_offset chain across parts. It still leaves the interplay of the optional 'include' sections and format defaults largely 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?

The description names a specific outcome (a complete, save-ready rendering of a case or statute) with a stated verb ('returns the complete document to save') and explicitly separates this tool from the get_case / get_statute siblings. The title reinforces the distinction ('Save a readable copy'). An agent can pick between this and the plain getters without opening a schema.

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 an explicit decision rule: use this when the client can write files locally and a readable copy is wanted, otherwise use get_case / get_statute. It also states the prerequisite the agent must satisfy (local file-saving capability, since the MCP cannot write to disk) and covers the long-document follow-up case with the offset/next_offset loop.

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