Extract Links
extract_linksCollects visible links from a browser tab, deduplicates shared host URLs into references, and can restrict results to same-origin links.
Instructions
Visible links, columnar + URL footnoting (_refs table dedups host across rows;
full URL = _refs[ref] + path). same_origin=True to skip outbound.
Ex: extract_links('t0', same_origin=True) → {"_untrusted":true,"links":[...],"_refs":{"1":"https://x.com"}} where rows=[text,ref,path]
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": {
"tab_id": "<tab_id>"
},
"name": "extract_links"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab_id | Yes | ||
| max_links | No | ||
| same_origin | No | ||
| force_refresh | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||