Skip to main content
Glama

fetch_links

Read-onlyIdempotent

Extract every outbound link from an HTML page as absolute URLs, with anchor text, rel/title, and internal/external classification. Skips non-http(s) schemes.

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). Only http and https links are returned: anchors (#) and every other scheme (javascript:, mailto:, tel:, data:, file:, ...) are skipped. Respects .

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

Input 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

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description is free to add the details that matter: output entry shape, scheme filtering, base-href handling, and the host-normalization rule for internal/external. It omits failure behavior for non-HTML responses, redirect handling, and what happens when the limit is hit.

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?

Four tightly packed sentences, front-loaded with the core action and return shape, then the filtering rules, then the base-href caveat. No sentence is filler and each adds a distinct fact.

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?

For a 9-parameter network-fetching tool with no output schema, the description does well on return values and filtering, but leaves five network-control parameters unexplained and says nothing about error or partial-result behavior. Adequate to call it correctly on the happy path, incomplete for edge cases.

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 coverage is 44%, below the 50% threshold, so the description needs to compensate and only partly does. It usefully defines the semantics of the internal/external classification (bare-domain and www treated as the same host) and restates the dedupe/limit defaults, but max_bytes, timeout_ms, user_agent, and max_redirects are documented nowhere.

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 specific verb and resource ('Extract every outbound link from an HTML page') plus the key transformation (resolved to absolute URLs), which cleanly separates it from the HTML-to-text/markdown siblings. It does not explicitly name a sibling or say when to prefer it over, say, fetch_html_to_markdown, 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 Guidelines3/5

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

Usage is implied by the purpose: use it when you need the link inventory of a page. The scheme-exclusion sentence does tell the agent it cannot retrieve mailto:/javascript: targets, which is a useful boundary. But there is no explicit when-to-use vs alternatives guidance and no stated prerequisites or failure conditions.

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