Skip to main content
Glama
SkillfulElectro

url-context-mcp

extract_links

Extract all hyperlinks from a URL or raw HTML, returning link details like href, text, and type. Useful for discovering pages and anchors before fetching them.

Instructions

Extract all hyperlinks from a URL (or raw HTML). Returns array of {href, text, title, section, isExternal, hash, type} grouped to dedupe. Great for discovering pages/anchors before fetching them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL to fetch and parse. Required unless 'html' is provided.
htmlNoRaw HTML to parse instead of fetching. If given, 'url' is used only as base for resolving relative links.
limitNoMax links to return.
filterNoRegex pattern; only links whose href or text match are returned.
baseUrlNoBase URL for resolving relative links when using 'html'. Defaults to 'url'.
sameDomainOnlyNoOnly return links on the same domain as the base URL.
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the return structure (array of {href, text, ...}), mentions deduplication via grouping, and indicates support for raw HTML input. This adds meaningful behavioral insight beyond the schema, though it omits error handling and network behavior.

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 two sentences: the first states action and return format, the second states the use case. It is front-loaded, concise, and contains no redundant text.

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?

Despite no output schema, the description lists the return fields, compensating well. The schema fully documents all six parameters. Combined, the description and schema provide complete understanding of tool usage, and sibling tools offer contrast.

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% with each parameter explained. The description adds context about the two input modes but no new semantics beyond what the schema already provides. Baseline 3 is appropriate.

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 uses a specific verb 'Extract' with a clear resource 'all hyperlinks from a URL (or raw HTML)'. It distinguishes from sibling tools like fetch_url and search_content by focusing on link extraction, not content retrieval or searching.

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 provides clear usage context with 'Great for discovering pages/anchors before fetching them', implying a discovery step before fetching. However, it does not explicitly state when not to use or name alternative tools, so it stops short of a 5.

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/SkillfulElectro/url-context-mcp'

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