Skip to main content
Glama
aiwebsearcher
by Vist233

Extracttextfromurl

extractTextFromUrl

Extract clean readable text from a webpage and filter it with regex patterns; optionally follow pagination links to gather content across pages.

Instructions

Extract and filter readable text from a webpage with optional pagination support.

Uses requests to fetch HTML, trafilatura to extract clean text (falls back to raw HTML), and regex patterns to filter content.

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

Input Schema

NameRequiredDescriptionDefault
urlYesTarget webpage URL
timeoutNoHTTP request timeout in seconds
user_agentNoCustom User-Agent header (defaults to common browser UA)
pagination_limitNoMaximum pagination depth (minimum 1)
follow_paginationNoWhether to follow rel="next" pagination links
regular_expressionsNoRegex patterns to filter text; no filtering if None or empty

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavior: requests fetches HTML, trafilatura extracts text, raw HTML is the fallback, and regex patterns filter output. It omits important traits such as what happens when fetch or extraction fails, whether JS-rendered pages are supported, and any rate-limit or network-policy constraints.

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?

Three short sentences, front-loaded with the purpose before implementation detail. The second sentence earns its place by explaining the extraction pipeline and fallback, though naming specific libraries ('requests', 'trafilatura') is somewhat more implementation detail than an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and every parameter is documented, so return values and arguments are covered elsewhere. What remains thin is behavioral coverage for a network-facing tool: failure modes, unsupported page types, and the interaction between filtering and pagination are unaddressed.

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%, taking all six parameters, so the baseline is 3. The description confirms the pagination and regex-filtering concepts that correspond to follow_pagination/pagination_limit and regular_expressions, but adds no syntax, format, or interaction detail beyond the schema.

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?

States a concrete verb and resource: 'Extract and filter readable text from a webpage', plus scoping qualifiers ('optional pagination support'). The singular 'a webpage' implicitly separates it from the batch sibling extractTextFromUrls, but no sibling is named or contrasted, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, no mention of alternatives (e.g. the plural URL variant), and no prerequisites or failure conditions. The only usage signal is the phrase 'optional pagination support', which is incidental rather than directive.

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