generate_short_url
Create a Compiler Explorer short URL for sharing code with compiler settings
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": {
"source": "<source>",
"language": "<language>",
"compiler": "<compiler>"
},
"name": "generate_short_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Source code | |
| options | No | Compiler flags (e.g. "-O2 -std=c++20") | |
| compiler | Yes | Compiler ID from list_compilers (e.g. "g161", "clang_trunk") | |
| language | Yes | Language ID (e.g. "c++", "c", "rust") | |
| libraries | No | Libraries to include. |