Skip to main content
Glama

fetch_links

Read-onlyIdempotent

Extract all outbound links from a webpage, resolved to absolute URLs with anchor text, rel/title, and internal/external classification. Skips non-web links and respects base href.

Instructions

Extract every outbound link from an HTML page, resolved to absolute URLs. Each entry includes href, anchor text, optional rel/title, and an internal/external classification (bare-domain and www. treated as the same host). Anchors (#), javascript:, mailto:, tel:, data:, and file: URIs are skipped. Respects .

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
limitNoCap on returned links (default 1000)
dedupeNoDrop duplicate hrefs (default true)
filterNoFilter by type (default 'all')
max_bytesNo
timeout_msNo
user_agentNo
max_redirectsNo
allow_private_hostsNoAllow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.0
    • addedInput schema / properties / allow_private_hosts / description
      Added value: +"Allow loopback / private / link-local targets for this call (default false). Refused unless the server operator launched fetch-mcp with FETCH_MCP_ALLOW_PRIVATE_HOSTS=1 -- SSRF protection stays on by default either way."
  2. First observedv0.6.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnlyHint, openWorldHint, idempotentHint, and destructiveHint. The description adds valuable behavioral context: it skips certain URI schemes, respects <base href>, and treats bare-domain and www as the same host for internal/external classification. These details go beyond the annotations and help the agent understand edge cases.

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 a single, well-structured paragraph that front-loads the core purpose, then specifies output details, exclusions, and edge-case handling. Every sentence adds value, with no redundancy or filler.

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?

Given the tool has 9 parameters and no output schema, the description should explain more about parameter usage and the return format. It mentions the fields in each entry but not the overall structure (e.g., array vs object), nor does it address error handling, pagination, or timeouts. The description is adequate for basic use but incomplete for a tool with this many parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 44%, meaning most parameters (url, max_bytes, timeout_ms, user_agent, max_redirects) lack descriptions. The tool description does not compensate for this gap—it focuses on output behavior but does not explain any of the parameters. An agent would have to guess at the meaning of several parameters, making this a weak point.

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 states a specific verb ('Extract'), a clear resource ('outbound link from an HTML page'), and details the output fields and exclusions. It explicitly distinguishes itself from sibling tools like fetch_meta or fetch_html_to_text by focusing on link extraction and classification.

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

Usage Guidelines4/5

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

The description clearly implies the use case: when you need to extract outbound links from a page. It does not explicitly name alternatives or provide when-not guidance, but the purpose is unambiguous enough for an agent to select it over similar tools.

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