Skip to main content
Glama

pine_get_source

Reads the active Pine Script source code from TradingView's Monaco editor before refactoring, fixing errors, or saving. Requires the Pine Editor bottom dock panel to be open.

Instructions

Get current Pine Script source code from the active TradingView Monaco editor model. WHEN TO USE: Call before refactoring, fixing errors, or saving an existing Pine script. SIDE EFFECTS: None (Read-only). LIMITATIONS: Requires Pine Editor bottom dock panel to be open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden and largely meets it: it declares 'SIDE EFFECTS: None (Read-only)' and a concrete precondition ('Requires Pine Editor bottom dock panel to be open'). It does not state what happens when the precondition fails or what the returned source looks like, keeping it out of 5 territory.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short labeled clauses (purpose, WHEN TO USE, SIDE EFFECTS, LIMITATIONS) with zero filler and the core purpose front-loaded in the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter read-only getter with no output schema and no annotations, the description covers the read-only guarantee and the runtime precondition, which is most of what an agent needs. It omits failure behavior (panel closed, no script loaded) and the return type, leaving a small gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so per calibration the baseline is 4; there is nothing for the description to disambiguate beyond confirming it operates implicitly on the active editor model.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get current Pine Script source code') plus the exact origin ('active TradingView Monaco editor model'), which distinguishes it cleanly from pine_set_source, pine_list_scripts, and pine_analyze among siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit WHEN TO USE trigger list ('before refactoring, fixing errors, or saving an existing Pine script'), which is clear context. It does not name alternative tools or state when not to use it, so it falls short of the 5 bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.