web_fetch_code
Extract code blocks with language annotations from documentation pages. Retrieves code examples from any URL for reuse.
Instructions
Extract only code blocks from a page. Ideal for documentation pages with code examples. Returns code blocks with language annotations.
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>"
},
"name": "web_fetch_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to extract code from | |
| timeout | No | Request timeout in seconds (default 30, max 120) |