Skip to main content
Glama
eitan3
by eitan3

extract_links

Fetch a webpage and return its de-duplicated absolute URLs, with optional filtering by same domain, regex pattern, and result limit.

Instructions

Fetch a page and return its links (de-duplicated, absolute URLs).

same_domain: keep only links on the same host as url. pattern: keep only links whose URL matches this regular expression. limit: maximum number of links to return (1-2000). Each link is {"url": ..., "text": ..., "nofollow": bool}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
limitNo
patternNo
obey_robotsNo
same_domainNo
Behavior3/5

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

With no annotations, the description carries the full burden of disclosure. It does disclose meaningful behaviors: deduplication, absolute URL conversion, and the output link object structure. However, it omits any explanation of the `obey_robots` parameter, which could significantly affect behavior (e.g., respecting robots.txt), and provides no details on error handling or edge cases like pages with no links.

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 efficiently structured: a one-sentence core purpose followed by a compact parameter list and output format. Every line adds value with no redundancy, using a clear code block for parameters and return shape. It is front-loaded with the essential 'fetch and return links' message.

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?

Despite no annotations or output schema, the description provides a solid overview of the tool's behavior and return format. It explains the main parameters and output object. The primary gap is the undocumented `obey_robots` parameter and lack of mention of potential errors or page fetch failures, preventing a perfect score.

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 0%, so the description must compensate. It does explain `same_domain` (same host), `pattern` (regular expression), and `limit` (1-2000), adding value beyond the schema. However, `obey_robots` is entirely absent, and `pattern` lacks specifics about regex flavor or matching rules. The description covers 3 of 5 parameters meaningfully but leaves key gaps.

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 first sentence clearly states the tool's function: 'Fetch a page and return its links (de-duplicated, absolute URLs).' It uses a specific verb and resource, and the output is clearly defined. This distinguishes it from sibling tools like fetch_page (returns page content) and extract (generic extraction) by focusing solely on link extraction with deduplication and URL normalization.

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

Usage Guidelines3/5

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

The description implies usage contexts through the parameter explanations (e.g., same_domain, pattern) but provides no explicit guidance on when to choose this tool over alternatives such as extract_tables or get_sitemap. There are no 'use this when...' or 'for X use...' statements, leaving usage as inferred rather than explicit.

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/eitan3/Scrapy_MCP_Scraper'

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