Skip to main content
Glama
harshil1502

tradingview-mcp

by harshil1502

tradingview-mcp

tradingview-mcp/  v0.1   ──────────────────────────────────────────────────

Claude Code(またはMCP互換クライアント)から、ローカルで実行中のTradingView Desktopアプリケーションを操作(チャート状態の読み取り、シンボルや時間足の変更、OHLCVバーの取得、スクリーンショットの撮影)するための、シンプルで型安全なMCPサーバーです。

[!IMPORTANT] 本プロジェクトはTradingView Inc.と提携、推奨、または関連するものではありません。 これは、Slack、VS Code、Discordなど、あらゆるElectronアプリに組み込まれている標準のデバッグインターフェースであるChrome DevTools Protocolを介して、ローカルで実行中のTradingView Desktopアプリケーションと対話するための個人用ブリッジです。

[!IMPORTANT] 有効なTradingViewサブスクリプションが必要です。 本ツールは、TradingViewのペイウォールやアクセス制御を回避、スクレイピング、または迂回するものではありません。すべては、お客様がすでにログインし、料金を支払っているTradingView Desktopインスタンスに対して、お客様のPC上で実行されます。

[!NOTE] すべての処理はローカルで行われます。 本ツールによってTradingViewのデータが送信、保存、または再配布されることはありません。チャートも、データも、すべてお客様のPC内に留まります。

[!CAUTION] TradingViewの内部ページAPIは非公開です。Desktopのリリースごとに変更される可能性があります。安定性を求める場合はTradingView Desktopのバージョンを固定し、アップグレード前にバージョン互換性の注記を確認してください。


機能

TradingView Desktopのチャートを、適切に定義された一連のMCPツールでラップします。ツールはZodスキーマでエンドツーエンドの型定義が行われており、境界で検証され、問題が発生した際には有用なエラーメッセージを表示します。

                  ┌───────────────┐
                  │ Claude Code   │
                  │ (or any MCP   │
                  │  client)      │
                  └───────┬───────┘
                          │ stdio (MCP)
                          ▼
                  ┌───────────────┐
                  │tradingview-mcp│
                  └───────┬───────┘
                          │ Chrome DevTools Protocol
                          ▼
                  ┌───────────────┐
                  │ TradingView   │
                  │ Desktop       │
                  │ (--remote-    │
                  │  debugging-   │
                  │  port=9222)   │
                  └───────────────┘

Related MCP server: TradingView MCP Jackson

なぜ別のTradingView統合ツールなのか?

既存のTradingView自動化プロジェクトは存在しますが、本プロジェクトは意図的にスコープを絞っています。

  • 78個ではなく12個のツール。 すべてのツールが文書化され、型定義され、テストされています。

  • 厳格なTypeScript。 any型や暗黙の戻り値は使用せず、noUncheckedIndexedAccessを有効にしています。

  • 1ファイル1責務。 接続、ページ、ツール、サーバーが別々のレイヤーになっており、バージョンによる変更が発生しても1箇所を修正するだけで済みます。

  • 型付きエラー。 ConnectionError、ToolExecutionError、ChartStateErrorなど、対処可能なメッセージを伴うエラーを定義しています。

  • tradingview-mcp doctor。 セットアップの何が問題かを正確に診断するコマンドです。

午後の一時で読み切れるほど小さく予測可能なツールを求めているなら、これを使ってください。TradingViewのあらゆる機能を網羅したい場合は、他の多機能な代替ツールを使用してください。


インストール

Node.js 20以上が必要です。

npm install -g tradingview-mcp
# or, in a project:
npm install tradingview-mcp

開発用:

git clone https://github.com/harshil1502/tradingview-mcp.git
cd tradingview-mcp
npm install
npm run build

セットアップ — 3つのステップ

1. 実行中のTradingView Desktopをすべて終了する

そうしないと、デバッグポートを有効にできません。

2. デバッグポートを有効にしてTradingView Desktopを起動する

macOS:

open -a "TradingView" --args --remote-debugging-port=9222

Windows:

& "C:\Users\<you>\AppData\Local\Programs\TradingView\TradingView.exe" --remote-debugging-port=9222

Linux:

tradingview --remote-debugging-port=9222

[!NOTE] --remote-debugging-portフラグは標準的なChromiumデバッグフラグです。これはオプトインであり、デフォルトでは無効になっています。明示的に指定しない限り、何も起こりません。

3. 接続を確認する

tradingview-mcp doctor

すべてが正しく設定されていれば、以下のような表示が出ます:

tradingview-mcp · doctor
─────────────────────────────────────────────
[ok]  CDP endpoint reachable on localhost:9222
[ok]  TradingView page found (NASDAQ:AAPL · 1h)
[ok]  tvWidget detected — chart state readable
─────────────────────────────────────────────
ready.

Claude Codeでの使用

Claude CodeのMCP設定(~/.claude/mcp.jsonまたはプロジェクトの.mcp.json)に以下を追加します:

{
  "mcpServers": {
    "tradingview": {
      "command": "tradingview-mcp",
      "env": {
        "TV_MCP_PORT": "9222"
      }
    }
  }
}

Claude Codeを再起動すると、以下のツールが利用可能になります。


ツール

ツール

説明

chart_get_state

現在のシンボル、時間足、表示中のインジケーター、最終価格を読み取る

chart_set_symbol

アクティブなシンボルを変更する (例: NASDAQ:AAPL, NSE:RELIANCE)

chart_set_timeframe

時間足(解像度)を変更する (1m, 5m, 1h, 1dなど)

chart_get_ohlcv

アクティブなチャートから最新のOHLCVバーを最大5,000件取得する

今後さらにツールを追加予定です。docs/roadmap.mdを参照してください。

セッション例

You:    What's the chart showing?
Claude: [calls chart_get_state]
        Showing NASDAQ:AAPL on 1h timeframe with EMA20, EMA50.
        Last price 187.42.

You:    Switch to BTCUSDT 4h and pull the last 200 bars.
Claude: [calls chart_set_symbol, chart_set_timeframe, chart_get_ohlcv]
        Done. Range: 187 days. Open at start: 62,440.
        Close at end: 67,830. +8.6%.

設定

環境変数

デフォルト

説明

TV_MCP_HOST

localhost

CDPホスト

TV_MCP_PORT

9222

CDPデバッグポート

TV_MCP_TARGET

(自動検出)

明示的なCDPターゲットID — 複数のTradingViewウィンドウを開いている場合にのみ必要


開発

npm install
npm run build         # tsc to dist/
npm run dev           # tsc --watch
npm test              # vitest run
npm run test:coverage # with v8 coverage report
npm run typecheck     # tsc --noEmit

コードベースは4つのレイヤーで構成されています:

src/
├── index.ts              entry — reads env, starts stdio server
├── server.ts             MCP server, tool registration, request handlers
├── errors.ts             typed error classes
├── types.ts              shared types + Zod schemas
├── connection/
│   ├── cdp.ts            CDP client wrapper (chrome-remote-interface)
│   └── tradingview.ts    TradingView-page interactions (all evaluated JS lives here)
└── tools/
    ├── index.ts          tool registry
    └── chart.ts          chart_* tools

ツールを追加するには:

  1. src/tools/配下に新しいファイルを作成する(または既存のファイルを拡張する)。

  2. <name>Inputおよび<name>OutputのZodスキーマとハンドラー関数をエクスポートする。

  3. src/tools/index.tsのTOOLSにエントリを追加する。

  4. tests/配下にテストを追加する。

これだけで、自動登録、自動検証、自動イントロスペクションが行われます。


バージョン互換性

TradingView Desktop

tradingview-mcp

ステータス

2026.x.x

0.1.x

テスト済み

TradingViewがアップデートされ、ツールが動作しなくなった場合は、まずconnection/tradingview.tsを確認してください。このファイルがTradingViewの内部APIを把握している唯一の場所です。


免責事項

本ソフトウェアは「現状のまま」提供され、いかなる種類の保証もありません。本ソフトウェアを実行することにより、お客様は以下を承諾したものとみなされます:

  • お客様自身の有料TradingView Desktopインスタンスを使用して、お客様自身のデータに対して操作を行っていること。

  • Chrome DevToolsデバッグポートをお客様自身で有効にしたこと。

  • TradingViewの内部APIは非公開であり、変更される可能性があること。

  • 本ソフトウェアは、AIエージェントが行う取引判断の正確性を保証するものではないこと。実際の資金を扱う前に、必ずデモ口座でテストしてください。


ライセンス

MIT © 2026 Harshil Patel


謝辞

これは、小さく、型定義がしっかりしており、読みやすいことを目標にゼロから構築された新しい実装です。この分野で同様のツールに取り組んできた方々に感謝いたします。

Available Tools

11 tools
chart_get_ohlcvB

Fetch recent OHLCV bars from the active chart.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of most-recent bars to return. Capped at 5000.

TDQS

B3.1/5.0
Behavior2/5

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

No annotations provided; description lacks details about behavior when no chart is active, what 'recent' means, or that count parameter is capped at 5000.

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

Conciseness4/5

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

Single sentence, 8 words, no fluff; but could be longer to include essential details without being verbose.

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

Completeness2/5

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

Tool has one parameter and no output schema; description omits explanation of OHLCV, return format, timeframe context, and count's effect.

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 baseline is 3; description adds no extra meaning beyond the schema's parameter documentation.

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?

Description clearly states the verb 'Fetch', resource 'OHLCV bars', and context 'from the active chart', distinguishing it from sibling tools like chart_get_state or quote_get.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., quote_get for quotes) or prerequisites like having an active chart.

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

chart_get_stateA

Read the current chart state: symbol, timeframe, visible studies, and last price.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior4/5

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

Description explicitly declares the tool as read-only ('Read'), which aligns with the operation. It discloses the output fields. Since no annotations are provided, the description carries the full burden and does so adequately, though it could mention if auth or rate limits apply.

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?

Single sentence with no unnecessary words. Every part adds value: action, resource, and output details. Highly efficient.

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

Completeness5/5

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

Given no output schema, the description clearly lists all return values (symbol, timeframe, visible studies, last price). The tool is simple, and the description covers its purpose completely.

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?

No parameters exist, and schema coverage is 100%. The description doesn't add parameter information, which is acceptable since there are none. Baseline score of 4 applies.

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?

Description clearly states the action (Read) and the resource (current chart state), and lists specific outputs (symbol, timeframe, visible studies, last price). It distinguishes itself from sibling tools like chart_get_ohlcv (which returns historical data) and chart_set_symbol (which modifies state).

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It simply describes the function without providing context on scenarios or exclusions. For example, it doesn't indicate that for historical data one should use chart_get_ohlcv.

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

chart_set_symbolB

Change the active chart symbol (e.g. "NASDAQ:AAPL").

ParametersJSON Schema
NameRequiredDescriptionDefault
symbolYesTradingView symbol identifier, e.g. "NASDAQ:AAPL", "BINANCE:BTCUSDT", "NSE:RELIANCE".

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description carries full burden for behavioral traits. It only states 'change', but does not disclose side effects (e.g., whether it clears chart state, requires certain permissions, or is reversible). Minimal transparency.

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?

The description is a single sentence with no superfluous words. It is efficiently front-loaded and directly communicates the tool's purpose and provides an example.

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 one-parameter setter with no output schema, the description is fairly complete: it defines the action, resource, and provides a valid input example. However, it omits details about what constitutes 'active chart' or confirmation of success, but these are minor gaps given the tool's simplicity.

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 100% with a detailed parameter description. The tool description repeats the example ('NASDAQ:AAPL') which adds little beyond the schema. Baseline 3 is appropriate as the description does not substantially enhance understanding of the parameter.

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 clearly states the action ('Change the active chart symbol') and the resource, with an example. It effectively distinguishes from sibling tools like chart_set_timeframe (which changes timeframe) and get/read operations.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives (e.g., if the symbol needs to be set before fetching data or if it has prerequisites). The description lacks explicit context for invocation.

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

chart_set_timeframeB

Change the active chart timeframe / resolution.

ParametersJSON Schema
NameRequiredDescriptionDefault
timeframeYesResolution: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w, 1M.

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure, but it only states the action without mentioning side effects (e.g., chart reload, impact on other chart state). The tool is a state mutator, yet no consequences are described.

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?

The description is a single sentence with no wasted words. It is front-loaded and to the point, though minimal.

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

Completeness2/5

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

Given the simplicity of the tool (1 param, no output schema), the description is too brief. It lacks context about when timeframe changes take effect, whether they are reversible, or any related state changes. More context is needed for a mutation tool.

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 100% for the single parameter 'timeframe', including both description and enum. The description adds no extra semantic meaning beyond 'resolution', so baseline 3 is appropriate.

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 clearly states the action 'change' and the resource 'active chart timeframe / resolution', making the tool's purpose unambiguous. It distinguishes itself from sibling tools like chart_get_ohlcv or chart_set_symbol by focusing on timeframe modification.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or context. An agent receives no hints about appropriate usage scenarios.

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

pine_compileB

Trigger a Pine compile and return diagnostics (errors, warnings).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations, the description should disclose side effects or state dependencies. It does not mention that it compiles the current source or what happens on failure.

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?

Single sentence, no redundancy, and front-loaded with action and result.

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

Completeness2/5

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

Lacks mention of state or prerequisite (e.g., requires source to be set), and no output schema or format details. Incomplete for a compile action.

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?

No parameters exist, so schema coverage is 100%. Description does not explicitly state 'no parameters required' but is acceptable. Baseline 4 for zero params would expect more clarity about inputs.

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 clearly states the action ('Trigger a Pine compile') and the output ('return diagnostics (errors, warnings)'), distinguishing it from sibling tools like pine_save or pine_get_source.

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

Usage Guidelines3/5

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

No guidance on when to use this tool vs alternatives or prerequisites (e.g., setting source via pine_set_source). Purpose is clear but lacks context.

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

pine_get_sourceA

Read the current Pine Editor source code. Pine Editor must be open.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations provided; description indicates read-only operation but does not detail behavior if editor is closed or format of returned source code.

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, no redundant information. Perfectly concise.

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 read tool with no parameters, the description covers purpose and precondition. Could mention output format but not essential.

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?

No parameters, description adds no extra parameter info beyond schema. Baseline 4 for 0 parameters.

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?

Clearly states it reads the current Pine Editor source code, distinguishing it from pine_set_source (write) and pine_compile (compile). The verb 'Read' and resource are specific.

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

Usage Guidelines3/5

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

Includes prerequisite 'Pine Editor must be open' but lacks explicit guidance on when to use this tool vs alternatives like pine_compile or saving source code.

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

pine_saveA

Save the current Pine script (commits + reloads the indicator on the chart).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.8/5.0
Behavior3/5

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

The description discloses that the tool commits and reloads the indicator, which implies it modifies state and may have side effects on the chart. However, without annotations, it does not fully detail what happens to unsaved changes, whether it overwrites previous versions, or if it requires specific permissions. The disclosed behavior is helpful but incomplete.

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?

The description is a single, concise sentence that immediately conveys the core action. It is front-loaded with the verb 'save' and includes essential behavioral details parenthetically. No extraneous words or repetition.

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 that there are no parameters, no output schema, and no annotations, the description provides a reasonable overview of the tool's function. However, it lacks details on return values, error conditions, and what 'current Pine script' refers to (e.g., the script in the editor). It is mostly complete for a zero-parameter tool but could elaborate on state implications.

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 input schema has no parameters, so the description does not need to add parameter semantics. The baseline for 0 parameters is 4, and the description appropriately avoids unnecessary detail.

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 clearly states the tool saves the current Pine script, with the specific actions of committing and reloading the indicator. The verb 'save' and resource 'Pine script' are precise, and the detail 'commits + reloads' differentiates it from siblings like pine_compile (which only compiles) or pine_set_source (which sets source but may not commit).

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives such as pine_compile or pine_set_source. The description does not mention prerequisites, ordering, or scenarios where saving might be inappropriate (e.g., if the script has errors).

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

pine_set_sourceB

Replace the Pine Editor source code with new content.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesNew Pine Script source code. Replaces the current editor contents entirely. Include `//@version=5` at the top.

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must convey behavioral traits. It notes that the replacement is 'entirely,' indicating full overwrite. However, it omits important details such as whether the operation triggers compilation, validates syntax, or interacts with unsaved content. The description is minimal but not misleading.

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

Conciseness4/5

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

Extremely concise at 8 words. While efficient, it could be slightly expanded to include usage context (e.g., 'before compiling'). The single sentence is front-loaded but borderline under-specified for a set operation.

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

Completeness3/5

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

For a simple setter with one parameter and no output schema, the description is adequate but not comprehensive. It fails to mention typical usage patterns (e.g., paired with pine_get_source and pine_compile) or the need for valid Pine Script. Schema covers parameter details, but contextual workflow is missing.

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 100%, and the schema already provides a detailed description of the 'code' parameter (new source, replaces entirely, include version). The tool description adds no additional semantic value beyond the schema, meeting the baseline for high schema coverage.

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 clearly states the tool's function: 'Replace the Pine Editor source code with new content.' It uses a specific verb ('Replace') and resource ('Pine Editor source code'). This distinguishes it from sibling tools like pine_get_source (retrieve) and pine_compile (compile), and from unrelated tools like chart_get_ohlcv.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., pine_save). No prerequisites, constraints, or workflow hints (e.g., compiling after setting). The description only states what it does, not when it's appropriate.

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

quote_getA

Get a real-time quote snapshot for the active symbol (last price, day OHLC, volume).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It discloses the tool is a read operation (real-time snapshot), but omits critical behavioral details: the dependency on a pre-set 'active symbol', potential error conditions if no symbol is active, and any side effects or rate limits. The active symbol mechanism is not explained, leaving significant transparency gaps.

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?

The description is a single efficient sentence that front-loads the action and key outcomes. Every word contributes value, with no redundancy or filler.

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

Completeness3/5

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

For a zero-parameter tool with no output schema, the description covers the basic purpose and return fields. However, it lacks essential context about the active symbol dependency, how to ensure the symbol is set, and error handling. While low complexity reduces the burden, this missing information could lead to incorrect invocation.

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?

There are zero parameters, and the schema coverage is effectively 100%. According to guidelines, baseline is 4 when no parameters exist. The description adds no parameter-specific info but none is needed.

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 clearly states the tool retrieves a real-time quote snapshot for the active symbol, specifying the exact data fields (last price, day OHLC, volume). It distinguishes from sibling tools like chart_get_ohlcv which fetch historical OHLC data, not real-time snapshots.

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

Usage Guidelines3/5

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

The description implies usage when a real-time snapshot is needed but does not provide explicit guidance on when not to use it or alternatives. For instance, it does not mention that the active symbol must be set beforehand via chart_set_symbol, nor does it contrast with chart_get_ohlcv for historical data.

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

screenshot_chartA

Capture the chart pane as a base64-encoded PNG.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It correctly implies a read operation ('capture') but does not mention potential side effects, error conditions (e.g., no chart loaded), or authentication needs. It is adequate but not thorough.

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?

The description is a single, concise sentence that conveys all necessary information. It is front-loaded with the core purpose and efficiently structured.

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 no parameters and no output schema, the description is largely complete. It specifies the action and output format. However, additional context about when the tool might fail or prerequisites would improve completeness.

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 input schema has zero parameters, so baseline is 4. The description adds value by specifying the output format (base64-encoded PNG), which is beyond the schema. However, there is no additional semantic enrichment for parameters.

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 clearly states the action ('capture'), the target ('chart pane'), and the output format ('base64-encoded PNG'). It is specific and distinguishes from the sibling tool 'screenshot_full' which captures the full screen.

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

Usage Guidelines3/5

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

The description implies the tool is used when needing a chart pane screenshot, but provides no explicit guidance on when to use it versus alternatives or any prerequisites (e.g., a chart must be open).

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

screenshot_fullA

Capture the full TradingView viewport as a base64-encoded PNG.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so the description carries the full burden. It discloses the action and output format, but lacks details on side effects, performance, or permission requirements. Adequate for a simple tool.

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?

Single sentence that is front-loaded with the action and resource. No unnecessary words, every part earns its place.

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 zero parameters and no output schema, the description adequately covers what the tool does and the output format. Could mention any constraints (e.g., chart must be loaded), but not required for this simplicity.

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?

Zero parameters, so the baseline is 4 per rubric. The description does not need to add parameter info, and the schema coverage is 100%.

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 clearly states the action ('Capture'), the specific resource ('full TradingView viewport'), and the output format ('base64-encoded PNG'). It is distinct from siblings like screenshot_chart, which likely captures a chart area.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool versus alternatives (e.g., screenshot_chart). However, the zero-parameter simplicity implies it's for full viewport capture, which is moderately clear.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 11 tool updatesv0.1.0
    • First observedchart_get_ohlcv
    • First observedchart_get_state
    • First observedchart_set_symbol
    • First observedchart_set_timeframe
    • First observedpine_compile
    • First observedpine_get_source
    • First observedpine_save
    • First observedpine_set_source
    • First observedquote_get
    • First observedscreenshot_chart
    • First observedscreenshot_full

TDQS

A3.8/5.0

Scored across 11 tools

Disambiguation5/5

Each tool has a clearly distinct purpose. The chart_* tools handle different aspects of chart interaction, pine_* tools manage Pine script editing and compilation, screenshot_* tools capture images, and quote_get fetches real-time quotes. No overlapping functionality.

Naming Consistency5/5

Tool names follow a consistent pattern: <domain>_<verb>_<noun> (e.g., chart_get_ohlcv, pine_set_source, screenshot_chart). All use lowercase with underscores, and the verb-noun structure is uniform across domains.

Tool Count5/5

With 11 tools, the server is well-scoped for a TradingView MCP. It covers chart manipulation, Pine scripting, quotes, and screenshots without being bloated or too sparse.

Completeness4/5

The tool set covers core workflows like symbol/timeframe changes, data retrieval, Pine script management, and screenshots. A minor gap is the lack of tools to add or remove studies (only visible studies are read), but this does not severely hinder typical use cases.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    MCP server that lets AI agents directly control and interact with the TradingView desktop app via 88 chart-control tools, enabling automated chart reading, Pine Script compilation, strategy optimization, and replay control.
    4
    113
    384 npm
    41
    MIT