Skip to main content
Glama

build_corpus

Pull every comment and attachment for a docket into a local cache and extract attachment text; re-running skips cached items to resume interrupted pulls.

Instructions

Pull every comment and attachment of a docket into the local cache and extract attachment text. Resumable: anything already cached is skipped, so re-running finishes an interrupted pull. max_comments caps new detail fetches per call. Returns counts of comments, attachments, extraction outcomes, OCR needs, stubs, duplicate groups and itemised failures.

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": {
      "docket_id": "<docket_id>"
    },
    "name": "build_corpus"
  }
}

Input Schema

NameRequiredDescriptionDefault
refreshNo
docket_idYes
max_commentsNo
with_attachmentsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses that the tool writes to a local cache, that it is resumable and skips already-cached items, that max_comments bounds fetches per call, and even that the return includes failures and OCR needs. It omits permissions/auth needs and the interaction between the refresh flag and the resumability promise, which keeps it short of a 5.

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?

Four dense sentences, front-loaded with the core action and followed by the resumability contract and the return shape. The enumeration of return counts is long but earns its place since there is no output schema.

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

Completeness3/5

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

The absence of an output schema makes the return-value enumeration valuable, and resumability is well covered. Gaps remain for a cache-writing, network-heavy tool: refresh semantics, expected volume/runtime for large dockets, and any permission requirements are unaddressed.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate, and it does so only partly: max_comments is clearly defined as a cap on new detail fetches per call. The refresh flag, which directly interacts with the stated resume/skip behavior, and with_attachments are left to be inferred from their names and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb pair (pull into local cache, extract attachment text) and a precise resource (every comment and attachment of a docket), which is far more informative than the bare name build_corpus. It does not explicitly distinguish itself from export_corpus, which sounds similar and is listed as a sibling, so the agent must infer the cache-vs-export difference.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the resumability note tells the agent to re-run an interrupted pull, which is genuinely useful context. However, there is no guidance on when to prefer build_corpus over export_corpus, list_comments, or get_comment, and no mention of cost or dataset size beyond the max_comments cap.

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