Skip to main content
Glama

CaseMagic — Federal Court Case Lookup & Monitor

Read the text of a filing

read_case_document
Read-onlyIdempotent

Return the text of one filing in a saved case — a complaint, a motion, an order, an exhibit — as the court archive extracted it from the PDF, so you can read, quote and explain what the document actually says rather than only its docket title. Takes a document_id from get_case_docket. Long documents come in parts: pass the returned next_offset to read on. When a document has no text (a scanned page nobody has run OCR on, or a copy only the court holds), the result says so and gives the PDF link if there is one; never guess at what an unread document says.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetNoWhere to start reading, in characters. Defaults to 0.
matter_idNoThe CaseMagic matter id, as returned by create_case_passport or shown in an earlier result. Omit it when the account follows exactly one case and that is the one meant.
document_idYesThe document_id of a document listed by get_case_docket.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoHow to use the text.
textNoThe text, or null when the archive holds none.
errorNoPresent only when the call failed: a code, a message and, where there is one, an action such as a link to give the user.
offsetNoWhere this slice starts.
pdf_urlNoLink to the PDF.
matter_idNoThe case.
page_countNoPages.
descriptionNoWhat the document is.
document_idNoThe document.
next_offsetNoWhere the next slice starts, or null at the end.
total_charsNoLength of the whole text.
docket_numberNoEntry number.
attachment_numberNoAttachment number.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "attachment_number": {
      +      "description": "Attachment number."
      +    },
      +    "description": {
      +      "description": "What the document is."
      +    },
      +    "docket_number": {
      +      "description": "Entry number."
      +    },
      +    "document_id": {
      +      "description": "The document.",
      +      "type": "string"
      +    },
      +    "error": {
      +      "additionalProperties": true,
      +      "description": "Present only when the call failed: a code, a message and, where there is one, an action such as a link to give the user.",
      +      "properties": {
      +        "code": {
      +          "description": "Machine-readable error code, for example CASE_NOT_FOUND or MULTIPLE_CASES_FOUND.",
      +          "type": "string"
      +        },
      +        "message": {
      +          "description": "What went wrong, in a sentence.",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "matter_id": {
      +      "description": "The case.",
      +      "type": "string"
      +    },
      +    "next_offset": {
      +      "description": "Where the next slice starts, or null at the end."
      +    },
      +    "note": {
      +      "description": "How to use the text.",
      +      "type": "string"
      +    },
      +    "offset": {
      +      "description": "Where this slice starts.",
      +      "type": "number"
      +    },
      +    "page_count": {
      +      "description": "Pages."
      +    },
      +    "pdf_url": {
      +      "description": "Link to the PDF."
      +    },
      +    "text": {
      +      "description": "The text, or null when the archive holds none."
      +    },
      +    "total_chars": {
      +      "description": "Length of the whole text.",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description goes well beyond them: it discloses pagination via next_offset, and a real failure mode — documents with no extracted text (un-OCR'd scans, court-only copies) — plus the corrective guidance to never guess. That is exactly the kind of behavior an agent cannot infer from structured fields.

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 the core action and artifact types, then pagination, then the failure mode — a sensible order. It is on the long side and the final warning sentence is slightly editorial, but each sentence carries distinct information and none is pure filler.

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?

For a read tool with annotations and an output schema, the description need not explain return values, and it doesn't. It covers the pagination contract and the empty-text case, which are the two things an agent must know to call this correctly and interpret its results.

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 is 3, but the description adds genuine semantics: offset is the value returned as next_offset from a prior call, establishing the read-on loop, and document_id is scoped to a docket listing. It adds meaning beyond the schema's own field descriptions without fully re-documenting matter_id.

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 ('Return the text of one filing in a saved case') and enumerates the concrete artifact types (complaint, motion, order, exhibit). It explicitly distinguishes itself from get_case_docket by contrasting full text with 'only its docket title,' so an agent can route between the two without opening either 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?

Tells the agent where document_id comes from (get_case_docket) and frames the use case as reading/quoting/explaining actual text rather than titles, which implicitly routes callers away from the docket tool. It gives clear context but stops short of an explicit 'when not to use this' statement or naming other alternatives.

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