edit_and_lint
Apply line edits to a previously linted Pine Script and re-lint to validate changes. Send only modified lines instead of the full script to reduce token usage in fix-and-re-lint cycles.
Instructions
Apply line edits to a previously linted script and re-lint.
Use after lint_script() returns issues. Send only the changed lines instead of the full script — saves tokens on fix-and-re-lint cycles.
Args: script_id: The script_id returned by a previous lint_script() call. edits: List of line edits. Each specifies a 1-based line number, the old text expected on that line, and the new replacement text.
Returns: LintResult with new script_id and fresh lint issues. If script_id not found (expired or different server instance), re-send the full script via lint_script() instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script_id | Yes | ||
| edits | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| count | Yes | ||
| issues | Yes | ||
| script_id | No |