extract_links_tool
Extract links from HTML content, with options to resolve relative URLs via base URL and filter to same-domain links. Returns each link's URL, text, title, and rel attributes.
Instructions
Extracts all links from HTML content.
Args: html: HTML content base_url: Base URL for resolving relative links internal_only: Only return links from the same domain (default: False)
Returns: Dictionary with list of links containing url, text, title, and rel attributes
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": {
"html": "<html>"
},
"name": "extract_links_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | ||
| base_url | No | ||
| internal_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||