Skip to main content
Glama

parse_document

Read-onlyIdempotent

Normalize supplied HTML, JSON or text into a source snapshot and SHA-256 digests. No network fetch. Caller-provided URL is a label, not proof of origin. Lightweight extraction, not PDF parsing or browser rendering.

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": {
      "url": "<url>",
      "media_type": "<media_type>",
      "text": "<text>"
    },
    "name": "parse_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
textYes
media_typeYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "required": [
      +    "url",
      +    "media_type",
      +    "raw_sha256",
      +    "text",
      +    "text_sha256"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so credit goes for added context: the no-network guarantee plus the trust caveat that a caller-provided URL 'is a label, not proof of origin' is a genuinely useful disclosure beyond the structured fields. It still says nothing about behavior on oversized or malformed input, which matters for a 200k-character text field.

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?

Four short sentences, front-loaded with the capability before the caveats. Every clause carries distinct information — scope, network constraint, provenance warning, capability boundary — with no repetition of the name or title.

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 an output schema present, the description needn't explain the returned snapshot or digest format, and it covers the safety and scope questions well. The remaining gap is minor: it doesn't say what the digests are computed over or how oversized input is handled, but those are arguably schema/output concerns.

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 carry the load. It does add real meaning for `url` — 'a label, not proof of origin' clarifies a field the schema documents only as a bounded string — and its HTML/JSON/text phrasing maps to the `media_type` enum. But it adds nothing about the 2048/200000 length caps or what `text` should contain (raw markup vs. decoded string), leaving part of the gap unfilled.

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 ('Normalize supplied HTML, JSON or text into a source snapshot and SHA-256 digests') and then bounds it negatively: 'No network fetch' and 'not PDF parsing or browser rendering.' An agent can tell this is an offline content-hashing/extraction step and rule it out for PDFs or JS-rendered pages without opening the 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?

Implicitly clear about when it applies: content must already be supplied by the caller, since there is 'No network fetch.' The exclusions ('not PDF parsing or browser rendering') give useful when-not guidance, but no positive alternative tool is named for those cases.

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.