pine_set_source
Inject or replace Pine Script source code in the active TradingView Monaco editor. Use it to deploy new scripts, apply fixes, or load templates when the Pine Editor panel is open.
Instructions
Inject Pine Script source code directly into the active Monaco editor model. WHEN TO USE: Call when deploying new Pine Script code, applying bug fixes, or loading templates. SIDE EFFECTS: STATE_MUTATING (Replaces entire Monaco editor text buffer). LIMITATIONS: Requires Pine Editor panel to be open.
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>"
},
"name": "pine_set_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Pine Script source code to inject |