Skip to main content
Glama
daviddme

TradingView Unified MCP

by daviddme

pine_set_source

Replace the existing Pine buffer only if its prior SHA-256 still matches; verify exact full-text readback. Does not create a new saved script.

Instructions

Replace the existing Pine buffer only if its prior SHA-256 still matches; verify exact full-text readback. Does not create a new saved script.

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With annotations already declaring this as a non-read-only, non-idempotent mutation, the description adds valuable behavioral context: the SHA-256 precondition and the full-text readback verification. It also clarifies scope by stating it does not create a new saved script, which goes beyond the annotations.

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?

Two sentences, front-loaded with the primary action and key precondition. Every clause earns its place: replacement action, SHA-256 gate, verification step, and scope limitation. No redundancy.

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?

Given the tool's complexity (a mutation with safety preconditions), the description covers the essential behavioral contract: the SHA-256 check, readback verification, and non-creation of saved scripts. While it leaves some parameter details to the schema, it provides enough context for an agent to understand the operation's safety and scope.

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 low (40%), so the description must compensate. It only clarifies the role of expected_source_sha256 ('prior SHA-256 still matches'), while the other required parameters (source, expected_title, expected_layout_id, target_id) are not further explained beyond what the schema provides. This partial compensation meets the baseline for a low-coverage 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?

The description states a specific verb and resource: 'Replace the existing Pine buffer'. It also explicitly distinguishes this tool from siblings by noting 'Does not create a new saved script', separating it from pine_save_new, pine_new_buffer, etc.

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 precondition 'only if its prior SHA-256 still matches' provides clear context for when to use it, and the caveat 'Does not create a new saved script' clarifies a when-not scenario. However, it does not explicitly name alternative tools like pine_save or pine_save_as that an agent might consider.

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