get_link
Extracts href and text from a link using CSS selector. Optionally clicks the link to follow navigation and return the final URL.
Instructions
Get link href and text from a web page. By default extracts href without clicking. When click=true, follows the link and returns the final URL. Useful for extracting download links, checking redirect destinations, or getting link text.
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>",
"selector": "<selector>"
},
"name": "get_link"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL of the page containing the link (must be http or https) | |
| selector | Yes | CSS selector for the anchor element | |
| click | No | Click the link and follow navigation (default: False) | |
| timeout | No | Timeout in seconds (default: 30) |