Skip to main content
Glama

Extract Article Content

extract
Read-onlyIdempotent

Fetch a public URL and extract clean article text. Supports HTML pages and academic PDFs with modes for full text, abstract, or metadata.

Instructions

Fetch one public URL -> clean article text. HTML via Mozilla Readability; academic PDFs (arxiv/biorxiv/Nature/OpenReview/NeurIPS/JMLR/PMLR/Springer/PubMed-via-PMC) auto-detected via Content-Type, %PDF magic, citation_pdf_url meta, and per-domain URL rules. Tiered depth: mode="abstract" returns ~1500 chars (PDF page 1 or HTML meta description) -- cheap survey to triage relevance before paying for full body. mode="full" (default) returns the whole article. Best-effort: failures return an errorInfo instead of throwing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPublic http(s) URL. Loopback/private IPs blocked unless SURF_ALLOW_PRIVATE=true.
max_charsNoTruncate body to this many chars (default 8000, set via SURF_EXTRACT_MAX_CHARS).
modeNoExtraction depth. `full` = whole article body (default; uses Playwright if needed). `abstract` = cheap survey: PDF page 1 OR HTML meta description (~1500 chars); use to triage relevance before paying for full text. `metadata` = page count only (PDF). Academic PDFs (arxiv/biorxiv/Nature/OpenReview/NeurIPS/JMLR/PMLR/Springer/PubMed-via-PMC) are auto-detected; abstract mode skips Playwright for them.full

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
titleNo
contentNo
excerptNo
lengthNo
is_pdfNo
page_countNo
extraction_qualityNo
elapsed_msNo
errorNo
metaNo
Behavior5/5

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

Annotations already indicate read-only, idempotent, and open-world. The description adds critical behavior: HTML via Mozilla Readability, academic PDF auto-detection methods, tiered depth, and errorInfo on failures. This goes well beyond annotations, providing rich behavioral context.

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?

The description is a single paragraph of about 5 sentences, efficiently packing purpose, PDF detection, tiered modes, and error handling. No redundant information; every sentence earns its place.

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?

Given the tool's complexity (3 params, output schema exists), the description covers all key aspects: URL requirements, PDF detection, mode semantics, truncation, and error behavior. It is fully sufficient for an agent to select and invoke correctly.

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

Parameters5/5

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

Schema coverage is 100%, so baseline is 3. The description enhances understanding: explains abstract mode as cheap survey (~1500 chars, page 1 or meta description), full mode uses Playwright, and max_chars truncation. It adds use-case context that the schema alone does not convey.

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?

The description clearly states 'Fetch one public URL -> clean article text', specifying the verb and resource. It distinguishes itself from siblings like 'search' and 'search_extract' by focusing on extraction from a given URL, not search. The mention of HTML and academic PDFs adds specificity.

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?

The description explains when to use each mode: abstract for cheap survey/triage, full for full article. It also notes best-effort failure handling. However, it does not explicitly contrast with alternatives like 'search_extract' or specify when not to use the tool, missing some guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HarimxChoi/google-surf-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server