TradingView PineScript MCP Server for validating, fixing, and managing PineScript code with template support and version management
PineScript MCP demonstrates foundational tool structure but exhibits significant gaps in descriptions, schema completeness, and error handling. 12 of 14 tools have minimal descriptions (under 50 chars), most parameter constraints lack validation detail, and output schemas are not documented. No tool explicitly declares error recovery guidance, and several tools conflate multiple concerns (e.g., update_pinescript_config accepts a generic 'config' object with z.record(z.any()), no validation). The naming convention is reasonable (verb-noun), but descriptions fail the LLM-optimization test: they are too terse to guide agent selection and composition. Config tools (get_pinescript_config, update_pinescript_config, reset_pinescript_config) overlap in concern; validation tools (validate_pinescript, fix_pinescript_errors) do not document output structure.
Compare two versions of PineScript code
Convert PineScript code between versions
Automatically fixes common syntax errors in PineScript
Format PineScript code according to best practices
Get a specific section of the PineScript MCP configuration
Get the current PineScript MCP configuration
Get version history for a PineScript
update_pinescript_config accepts z.record(z.any()) with zero validation; LLM cannot infer valid config keys or types. No documentation of config structure (version support, validation rules, etc.). Violates pattern:constrained-input.
Descriptions across 12 of 14 tools are under 50 characters and provide no actionable context for agent selection. E.g., 'Validates PineScript code for syntax errors' (49 chars) does not explain when to use validate_pinescript vs fix_pinescript_errors, what output structure to expect, or how errors are represented. Baseline for good tools: 50 - 200 chars.
No documented output schemas. None of the 14 tools document what fields their responses contain, forcing LLMs to guess structure and cannot compose tools reliably. E.g., validate_pinescript's response format (errors array? error count? line numbers?) is invisible; fix_pinescript_errors' correction format is undocumented.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 42 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 41 | - | v1 |
Get a template for a PineScript strategy or indicator
Reset PineScript MCP configuration to default values
Save a version of PineScript code
Set a custom directory for PineScript templates
Test MCP server connectivity with a minimal script
Update PineScript MCP configuration settings
Validates PineScript code for syntax errors
No error recovery guidance in any tool description. E.g., if validate_pinescript detects an error, the description does not say 'call fix_pinescript_errors next' or provide guidance on how to interpret errors. Violates pattern:recovery-guide.
Parameter descriptions are minimal. E.g., 'version' parameter in multiple tools described as 'The PineScript version' or 'PineScript version to test with' without specifying valid enum values (v4, v5, v6) in the description itself, LLM must infer from schema. Baselines: 94% of A+ tools have param descriptions; this server lacks substantive param descriptions in 8+ tools.
get_pinescript_history accepts only 'script_id' but no guidance on how to obtain a script_id; if agents cannot find this ID from prior tool responses, they hit a dead end. Violates pattern:tool-chain (tools should return IDs needed by downstream tools).
Tool overlap without disambiguation. get_pinescript_config, get_config_section, reset_pinescript_config, and update_pinescript_config all manipulate the same resource, but descriptions do not clarify which tool to use when. E.g., get_config_section('templates') vs get_pinescript_config, why two tools? Violates pattern:tool.
No idempotency guidance. save_pinescript_version and other write tools do not declare whether repeated calls with identical inputs produce duplicate records or update in-place. Agents retry on ambiguous failures, non-idempotent tools cause double-saves, duplicated history entries. Violates pattern:idempotent-operation.
fix_pinescript_errors does not document what types of errors it fixes (syntax only? logic issues? style?), what happens if the script is already valid, or what the fix strategy is. Description is 30 chars ('Automatically fixes common syntax errors in PineScript'), too vague to guide agent composition or understand limits.