extract_links
Parse HTML to categorize all links by type—anchors, forms, scripts, images, and CSS—and resolve relative URLs with an optional base URL. Build a crawl tree from a page response without manually searching source.
Instructions
Extract all links (anchors, forms, scripts, images) from HTML. Useful for building a crawl tree without manually grep'ing the response body. html: HTML string base_url: optional base URL for resolving relative links only_same_origin: if True and base_url given, only return links to same host Returns: lists of links by category (anchors, forms, scripts, images, css)
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | ||
| base_url | No | ||
| only_same_origin | No |