Skip to main content
Glama

Extract Article Content

extract
Read-onlyIdempotent

Retrieve clean article text from any public URL. Supports HTML and academic PDFs with modes for full content, 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).
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?

The description discloses detailed behavior beyond annotations: how HTML vs PDF detection works (Mozilla Readability, Content-Type, %PDF magic, citation_pdf_url meta, per-domain rules), tiered depth modes, best-effort nature, and private IP blocking. No contradiction with annotations (readOnlyHint, idempotentHint, openWorldHint all true).

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 concise and well-structured: front-loaded with the core purpose, then specific details about PDF detection, modes, and error handling. Every sentence adds value without redundancy.

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 parameters, output schema provided), the description is complete. It covers behavior, modes, error handling, and detection logic. The output schema exists, so return value details are not needed in the description.

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?

The input schema has 100% description coverage, so the description adds limited value beyond the schema. However, it does provide helpful context for the 'mode' parameter by explaining 'abstract' as a cheap survey and 'metadata' as page count only, which enriches the schema's enum values.

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' and distinguishes itself from sibling tools like search and search_extract by focusing on single URL extraction. It details specific academic PDF handling and modes, making the purpose unambiguous.

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?

The description provides explicit usage guidance: it explains when to use the abstract mode ('cheap survey to triage relevance before paying for full body') and notes that failures return errorInfo instead of throwing. It implies when not to use (e.g., for searching) by being a single-URL tool.

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