Skip to main content
Glama

Known URL Extract

extract

Fetch a known public URL and return clean article or PDF content. Choose metadata, abstract, or full depth for details, summary, or complete text.

Instructions

SECONDARY KNOWN-URL CONTENT EXTRACTION TOOL. Use only when the exact public URL is already known and no new web discovery is required. If sources still need to be found, use search or search_parallel with extract_mode instead. For semantic reading of a public PDF or GitHub repository, use this tool before local download or parsing. Local PDF tools are for local files, forms, OCR recovery, or visual layout inspection; general repository tools are for editing, building, testing, or full Git history. Fetch one public URL and return clean content. With research enabled, one local broker lets multiple MCP sessions query the same knowledge base concurrently and orders writes safely. For GitHub repository URLs, metadata reads the README; abstract and full use the same bounded download gate and differ only in indexed source depth. 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="metadata" returns document metadata without body text, mode="abstract" returns about 1500 chars for relevance checks, and mode="full" reads the full bounded source. response_content controls whether the response contains a 1500-character summary or up to 50000 characters. PDF and landing-page metadata are merged when available. With research enabled, abstract and full PDF reads are stored as searchable evidence with bibliographic metadata and provenance. 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.
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` = document metadata without body text: title, authors, publication details, dates, DOI, keywords, canonical URL, and PDF properties when available. Academic PDFs (arxiv/biorxiv/Nature/OpenReview/NeurIPS/JMLR/PMLR/Springer/PubMed-via-PMC) are auto-detected; abstract mode skips Playwright for them.full
max_charsNoMaximum returned characters when response_content=full. Defaults to 1500 for abstract and 50000 for full.
project_idNoProject memory id.
session_idNoStable host task id. Reuses the same project session after restart.
memory_handleNoReuse the handle returned by a prior project-aware call.
session_intentNoCurrent durable task intent. A changed value creates an immutable revision.
response_contentNoControls only the returned body. full returns up to max_chars; summary returns a 1500-character evidence excerpt. Research storage keeps the full captured text in deterministic chunks.full

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doiNo
urlNo
metaNo
yearNo
errorNo
titleNo
is_pdfNo
lengthNo
memoryNo
authorsNo
contentNo
creatorNo
excerptNo
subjectNo
keywordsNo
languageNo
producerNo
truncatedNo
created_atNo
elapsed_msNo
page_countNo
descriptionNo
modified_atNo
publicationNo
published_atNo
canonical_urlNo
memory_handleNo
source_lengthNo
extraction_qualityNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed4 schema fields changedv1.0.2
    • changedInput schema / properties / max_chars / description
      Previous value: -"Truncate body to this many chars. Defaults to 1500 for abstract and 50000 for full."New value: +"Maximum returned characters when response_content=full. Defaults to 1500 for abstract and 50000 for full."
    • addedInput schema / properties / response_content
      Added value: +{
      +  "default": "full",
      +  "description": "Controls only the returned body. full returns up to max_chars; summary returns a 1500-character evidence excerpt. Research storage keeps the full captured text in deterministic chunks.",
      +  "enum": [
      +    "summary",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / source_length
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "type": "boolean"
      +}
  2. Changed23 schema fields changedv1.0.0
    • removedInput schema / properties / max_chars / default
      Removed value: -8000
    • changedInput schema / properties / max_chars / description
      Previous value: -"Truncate body to this many chars (default 8000, set via SURF_EXTRACT_MAX_CHARS)."New value: +"Truncate body to this many chars. Defaults to 1500 for abstract and 50000 for full."
    • addedInput schema / properties / memory_handle
      Added value: +{
      +  "description": "Reuse the handle returned by a prior project-aware call.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • changedInput schema / properties / mode / description
      Previous value: -"Extraction 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."New value: +"Extraction 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` = document metadata without body text: title, authors, publication details, dates, DOI, keywords, canonical URL, and PDF properties when available. Academic PDFs (arxiv/biorxiv/Nature/OpenReview/NeurIPS/JMLR/PMLR/Springer/PubMed-via-PMC) are auto-detected; abstract mode skips Playwright for them."
    • addedInput schema / properties / project_id
      Added value: +{
      +  "description": "Project memory id.",
      +  "maxLength": 64,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Stable host task id. Reuses the same project session after restart.",
      +  "maxLength": 200,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / session_intent
      Added value: +{
      +  "description": "Current durable task intent. A changed value creates an immutable revision.",
      +  "maxLength": 2000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedOutput schema / properties / authors
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / canonical_url
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / created_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / creator
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / description
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / doi
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / keywords
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / language
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / memory
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / memory_handle
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / modified_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / producer
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / publication
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / published_at
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / subject
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / year
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  3. Changed1 schema field changedv0.6.8
    • changedInput schema / properties / max_chars / description
      Previous value: -"Truncate body to this many chars (default 8000)."New value: +"Truncate body to this many chars (default 8000, set via SURF_EXTRACT_MAX_CHARS)."
  4. Addedv0.6.5
  5. Removedv0.6.1
  6. Addedv0.5.2
  7. Removedv0.5.1
  8. Addedv0.4.8
  9. Removedv0.4.7
  10. Changed6 schema fields changedv0.3.5
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / max_chars / default
      Added value: +8000
    • changedInput schema / properties / max_chars / description
      Previous value: -"Truncate content to this many chars (default 8000)"New value: +"Truncate body to this many chars (default 8000)."
    • changedInput schema / properties / max_chars / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / url / description
      Previous value: -"URL to fetch"New value: +"Public http(s) URL. Loopback/private IPs blocked unless SURF_ALLOW_PRIVATE=true."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "content": {
      +      "type": "string"
      +    },
      +    "elapsed_ms": {
      +      "type": "number"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "code": {
      +              "type": "string"
      +            },
      +            "message": {
      +              "type": "string"
      +            },
      +            "retry_after_ms": {
      +              "type": "number"
      +            },
      +            "retryable": {
      +              "type": "boolean"
      +            },
      +            "user_action": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "code",
      +            "message",
      +            "retryable"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "excerpt": {
      +      "type": "string"
      +    },
      +    "length": {
      +      "type": "number"
      +    },
      +    "meta": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  11. First observedv0.3.2

TDQS

A4/5.0
Behavior4/5

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

Annotations are minimal (readOnlyHint=false, openWorldHint=true, idempotentHint=false), so the description carries the burden. Description discloses several behavioral traits: best-effort failures return errorInfo instead of throwing; PDF auto-detection; bounded download gates; research-enabled concurrency; tiered depth behavior; response_content limits. However, openWorldHint=true suggests the tool may act beyond the given URL, but the description emphasizes 'fetch one public URL' and 'exact URL already known' — a mild tension but not a direct contradiction since openWorldHint may refer to research-storage side effects. The description adds substantial behavior beyond annotations.

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

Conciseness3/5

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

The description is information-dense but somewhat sprawling; it covers many behaviors in a single paragraph without clear topical organization. It is front-loaded with the key usage constraint ('Use only when the exact public URL is already known'), which is good, but later sentences about research-enabled brokers and local file tools add noise. Every sentence has some value, but readability suffers from length and lack of structure.

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?

Given 8 parameters, an output schema, and moderate behavioral complexity, the description is fairly complete. It explains modes, response_content, best-effort errors, PDF auto-detection, and research evidence storage. It omits some specifics like exactly how project_id/memory_handle relate, but the schema covers those. The output schema exists, so return values need not be described. This is a thorough, if slightly over-stuffed, description.

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 the baseline is 3 even without additional param info. The description adds some context, such as 'abstract returns about 1500 chars' and 'PDF and landing-page metadata are merged when available,' but most parameter meaning is already in the schema. It doesn't significantly enrich beyond the schema, so 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear purpose: extracting clean content from a single known public URL, with tiered modes (metadata/abstract/full) and explicit limitations (known URL only, no discovery). It is distinguishable from siblings like search, search_parallel, and project_memory_search, though the title 'Known URL Extract' is redundant with the name. The description could be more concise but is specific about the resource and operation.

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?

Provides explicit when-to-use/when-not-to-use guidance: 'Use only when the exact public URL is already known and no new web discovery is required.' Names alternatives (search, search_parallel) for the discovery case, and differentiates from local PDF tools and repository tools. This is model guidance with clear exclusions.

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

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