Skip to main content
Glama

Document extract: PDF, DOCX, HWP/HWPX or web page to structured JSON with English overview

docs_extract
Read-onlyIdempotent

Use when an agent needs the key facts of a document, not just its text: Korean HWP/HWPX, PDF, DOCX or web page. Input: url via GET, or POST a file (multipart 'file', raw body, or JSON contentBase64+filename). Output: fixed-schema JSON title, title_en, document_type, date, org, amounts, english_overview, tables (rows, header columns, merged cells, records). Bad input or model outage refused before payment. Use instead: web_extract for your own JSON Schema on a web page; convert_to_markdown for the full text. Example: ?url=https://example.com/ Price: $0.009 per call, paid in USDC (Base, Monad, Polygon, Arbitrum or Solana) via x402.

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

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL of a PDF, DOCX, HWP, HWPX or web page. For uploads use POST.
typeNoOptional expected type; a mismatch is rejected before payment (415, not charged)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Beyond readOnlyHint/idempotentHint, it discloses transport modes (GET url vs POST multipart/raw/JSON base64), the exact output field set, pre-payment refusal on bad input or model outage, and per-call pricing settled in USDC over x402 across five chains. That payment and billing-failure behavior is exactly the kind of context annotations cannot carry. It does not state rate limits or latency, so it falls just 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?

Front-loaded with the selection rule, then Input/Output/refusal/alternatives/example/price in a consistent telegraphic pattern; almost every clause carries operational information. The example fragment ('?url=https://example.com/') and the five-chain payment list make it dense to the point of being a run-on.

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 enumerates the fixed output fields (title, title_en, document_type, date, org, amounts, english_overview, tables with merged cells and records), so the agent knows what it receives. Error and payment semantics are covered too. Nothing needed to call it 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 100%, so baseline would be 3; the description earns more by documenting the POST body forms ('multipart file', raw body, JSON contentBase64+filename) that the two-property schema does not represent at all. It also ties 'type' to the 415-not-charged outcome. The url format is still left 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?

"Use when an agent needs the key facts of a document, not just its text" names both the action (extract key facts) and the resource (Korean HWP/HWPX, PDF, DOCX, web page), and immediately contrasts with convert_to_markdown's full text. An agent can distinguish it from web_extract and convert_to_markdown without opening any 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?

Explicit selection rule up front ("key facts... not just its text"), plus a named-alternatives block: web_extract when you supply your own JSON Schema, convert_to_markdown for full text. Both the when and the when-not cases are stated.

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