Skip to main content
Glama
tedorigawa001

TradingView-MCP

get_pine_source

Retrieve the full Pine source code of your own saved TradingView scripts for review or improvement. Accepts only USER script IDs from list_pine_scripts and is read-only.

Instructions

Get the full Pine source code of one of the user's OWN saved scripts, for review or improvement suggestions. Only 'USER;...' ids from list_pine_scripts are accepted; published/protected third-party scripts are refused. Read-only — editing or saving scripts is not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pine_idYesScript id from list_pine_scripts, e.g. 'USER;adc40b1dfee344f19412f1ae9af74f3f'
versionNoVersion to fetch, e.g. '3'. Default: 'last'. Older versions are how you revert a bad save

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and covers key behavior: read-only, no editing/saving, and refusal of published/protected third-party scripts. It does not go into error cases, rate limits, or response format, but the core constraints are explicit and not hidden.

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 sentences with no filler. The core action and scope lead off, followed by compact restriction and read-only statements. Every sentence adds a distinct, necessary fact.

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 simple two-parameter, read-only fetch with no output schema, the description is nearly sufficient: it covers the target object, eligibility, read-only nature, and parameter constraints via the schema. Missing explicit error behavior or return format are minor for this simplicity, keeping it a step below complete.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description reinforces the pine_id eligibility rule (USER-only, third-party refused) and the version default is already in the schema. The 'revert a bad save' insight appears in the schema, not the description, so the description adds little beyond the schema.

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 action ('Get the full Pine source code') scoped to the user's OWN saved scripts, clearly distinguishing it from siblings like list_pine_scripts (which lists script metadata) and save_pine_script (which writes). The added restriction against published/protected third-party scripts sharpens the tool's identity.

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?

Explicitly states the eligibility rule: only 'USER;...' ids from list_pine_scripts are accepted and third-party scripts are refused. It also disclaims editing/saving support. It does not name a specific alternative tool for editing, but the read-only note and referenced list_pine_scripts give enough context for correct selection.

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

Install Server

Other Tools