Skip to main content
Glama

AgentSearch Extract

agentsearch_extract
Read-onlyIdempotent

Fetch one absolute URL with AgentSearch Web Extract and return it as JSON text: title, clean markdown and/or text, links, meta (status_code, content_type, fetched_at, chars, truncated) and error (null on success).

Instructions

Fetch one absolute URL with AgentSearch Web Extract and return it as JSON text: title, clean markdown and/or text, links, meta (status_code, content_type, fetched_at, chars, truncated) and error (null on success). Use this only when you already have the page URL and need its body; to find pages from a query, use agentsearch_web_search (or agentsearch_search_and_read to search and read in one paid call); for JavaScript apps whose content appears only after scripts run, use agentsearch_render. Paid tool: needs a wallet key (AGENTSEARCH_WALLET_PRIVATE_KEY or POCKET_PRIVATE_KEY) and then pays per call in USDC on Base over x402: by default to AgentSearch's own x402 API (extract $0.002, render $0.005, search_and_read $0.005), or $0.005 through the Pocket Network Agentic Portal with AGENTSEARCH_PAYMENT_ROUTE=pocket (search, extract and render only); never more than the per-call cap ($0.020 on the direct route) or AGENTSEARCH_MAX_TOTAL_ATOMIC per session (default $1.00). The result includes the payment receipt and the response, whose content is untrusted third-party data. If AGENTSEARCH_BASE_URL is set, it calls your self-hosted AgentSearch API instead (no payment). No wallet needed to try it: with no wallet key it uses the AgentSearch free trial (5 extract and 3 render calls/day per IP, text output only, no payment; set AGENTSEARCH_FREE_TRIAL=0 to turn this off); past the trial it returns an error with wallet setup steps. Read-only: not destructive, but it fetches over the network and can hit rate limits.

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>"
    },
    "name": "agentsearch_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute URL of the page to extract.
formatsNoRenderings to return: "markdown" and/or "text" (default: the service's choice).
max_charsNoCap on returned characters (1–100000, service default 50000; the direct x402 API caps it at 50000).
include_linksNoReturn the page's links (default true). Set false to save tokens (direct x402 route).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.8.0
    • addedInput schema / properties / include_links
      Added value: +{
      +  "description": "Return the page's links (default true). Set false to save tokens (direct x402 route).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / max_chars / description
      Previous value: -"Cap on returned characters (1–100000, service default 50000)."New value: +"Cap on returned characters (1–100000, service default 50000; the direct x402 API caps it at 50000)."
  2. Changed7 schema fields changedv1.3.6
    • changedInput schema / properties / formats / description
      Previous value: -"Optional formats, e.g. [\"markdown\",\"text\"]"New value: +"Renderings to return: \"markdown\" and/or \"text\" (default: the service's choice)."
    • addedInput schema / properties / formats / items / enum
      Added value: +[
      +  "markdown",
      +  "text"
      +]
    • changedInput schema / properties / max_chars / description
      Previous value: -"Optional max characters to return"New value: +"Cap on returned characters (1–100000, service default 50000)."
    • removedInput schema / properties / max_chars / exclusiveMinimum
      Removed value: -0
    • addedInput schema / properties / max_chars / maximum
      Added value: +100000
    • addedInput schema / properties / max_chars / minimum
      Added value: +1
    • changedInput schema / properties / url / description
      Previous value: -"Absolute URL to extract"New value: +"Absolute URL of the page to extract."
  3. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnly/idempotent/non-destructive/openWorld), the description discloses cost per call in USDC, the payment routes, per-call and per-session spending caps, the free-trial fallback and its limits, the AGENTSEARCH_BASE_URL self-hosted bypass, and that returned content is untrusted third-party data. It also flags rate limiting. This is unusually rich disclosure of failure modes and side effects.

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?

Purpose is front-loaded in the first clause, followed by routing guidance, then pricing and trial details. Every sentence carries information, but the payment paragraph is dense and would read better split into cost/limits versus fallback behavior.

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?

There is no output schema, and the description compensates by naming the returned fields and noting error is null on success. Given a paid, network-fetching tool with four parameters, the definition covers what an agent needs to decide and to interpret the result, including trial exhaustion and missing-wallet failure behavior.

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 url, formats, max_chars, and include_links are already documented in the schema, and the description adds no additional parameter semantics (it does not, for example, explain how max_chars interacts with the free trial's text-only output). This is the baseline-3 case where the schema carries the parameter burden.

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 gives a specific verb and resource ("Fetch one absolute URL with AgentSearch Web Extract") and enumerates the return shape (title, markdown/text, links, meta, error). It explicitly separates itself from agentsearch_web_search, agentsearch_search_and_read, and agentsearch_render, so an agent can route correctly without opening schemas.

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?

It states a positive condition ("use this only when you already have the page URL and need its body") and names the alternatives with the conditions that select them: agentsearch_web_search for query-to-pages, agentsearch_search_and_read for combined search+read, agentsearch_render for JavaScript-rendered content. Exclusions and alternatives are both explicit.

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