Skip to main content
Glama

document.extract

Read-only

Fetch a document from a URL, classify its type (personal/medical/business/unknown) with keyword + PII-pattern heuristics (documents containing actual PII data are NEVER business), and return extracted text capped at 100K chars. Free. STREAMING SUPPORTED: send Accept: text/event-stream for started/fetched/classifying/completed phases.

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": {
      "document_url": "<document_url>"
    },
    "name": "document.extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_urlYesPublic HTTPS URL (fetched server-side, 30s timeout; text/* formats classify, binary answers unknown).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Consistent with readOnlyHint=true (it fetches and reads, mutating nothing), and the description adds real behavioral detail beyond annotations: the heuristics used for classification, the rule that PII-containing documents are never business, the 100K char output cap, and streaming phase names. It omits failure modes (non-HTTPS, timeouts, oversized docs) which are only partly covered in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action (fetch, classify, return text) then adds the operational notes (free, streaming) in two tight sentences with no filler. Parentheticals carry real constraints rather than noise.

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

Completeness4/5

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

With a single read-only parameter and no output schema, the description does the heavy lifting: it names the classification categories, states the text cap, and explains the streaming phases an agent would otherwise have to guess. The only gap is how classification results are returned alongside the text.

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 100%, so document_url's format, server-side fetch, 30s timeout, and text/* vs binary handling are already documented in the schema. The description adds nothing parameter-specific beyond saying it fetches from a URL, so the baseline 3 applies.

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 chain: fetch a document from a URL, classify its type into four named categories, and return extracted text capped at 100K chars. The tool name (document.extract) is fully explained, and no sibling tool does document fetching/classification, so there is no ambiguity to resolve.

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?

Gives clear context for use (public HTTPS URL, free, server-side fetch) and an explicit streaming option with the Accept header, telling the agent how to enable phase events. It does not state when-not to use it or name an alternative, so it stops short of a 5.

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