Skip to main content
Glama
daviddme

TradingView Unified MCP

by daviddme

pine_save_next

Save the next cloud version of exactly one Pine script after matching prior version/full-source hash; back up old source and independently verify the version moved and new source matches.

Instructions

Save the next cloud version of exactly one Pine script after matching prior version/full-source hash; back up old source and independently verify the version moved and new source matches.

Input Schema

NameRequiredDescriptionDefault
sourceYes
script_idYes
target_idYesExact Chrome tab target ID from browser_list_tabs. Required for changes.
timeout_msNo
expected_versionYes
expected_layout_idYesExpected saved-layout ID. A mismatch stops the operation before writing.
expected_saved_source_sha256Yes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Despite annotations already declaring readOnlyHint=false and destructiveHint=false, the description adds genuine value: compare-and-swap semantics against prior version/hash, automatic backup of the old source, and independent post-write verification that version moved and source matches. It does not cover the openWorldHint implications (browser/tab dependency) or timeout behavior.

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?

A single dense sentence with the precondition and verification guarantees front-loaded and zero filler. Every clause carries operational meaning.

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 7-parameter mutation tool with no output schema, the description covers the write-safety model (concurrency check, backup, verification) that an agent most needs. Gaps remain around the browser target requirement, timeout tuning, and what the response reports after verification.

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 coverage is only 29%, so the description must compensate: it implies script_id ('exactly one Pine script'), expected_version ('prior version'), and expected_saved_source_sha256 ('full-source hash'). It says nothing about source, timeout_ms, or target_id (the latter two only partly documented in schema), leaving several parameters unexplained.

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

Purpose4/5

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

States a specific verb ('save the next cloud version') and resource ('exactly one Pine script') with a precondition attached. 'Exactly one' implicitly excludes bulk variants, but it never names pine_save, pine_save_as, or pine_save_new, so the agent must infer the distinction from sibling names alone.

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?

The phrase 'after matching prior version/full-source hash' effectively defines the entry condition: the caller must already hold the current version and source hash. That is a real usage constraint, though the description never states when to prefer this over pine_save or pine_save_as.

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

Deploy Server

Other Tools