Skip to main content
Glama

pine_new

Create a new blank Pine Script draft in the TradingView editor from a standard indicator, strategy, or library template. Use when starting from scratch; it clears unsaved editor changes.

Instructions

Create a new blank Pine Script draft in the editor from a standard template (indicator, strategy, or library). WHEN TO USE: Call when starting a new script from scratch rather than modifying existing code. SIDE EFFECTS: STATE_MUTATING (Clears current editor and loads starter template). LIMITATIONS: Unsaved changes in active editor will be overwritten.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesType of script to create

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well. It declares STATE_MUTATING, explains that the current editor is cleared, loads a starter template, and warns that unsaved changes will be overwritten.

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 front-loaded and compact, using clear labeled sections for purpose, usage, side effects, and limitations. Every sentence contributes useful information without redundancy.

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?

For a simple one-parameter tool with no annotations and no output schema, the description covers purpose, when to use it, side effects, and destructive limitations. Nothing critical for correct invocation appears to be 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%, so the enum for 'type' is already documented in the input schema. The description repeats the allowed template types but adds no syntax or formatting details beyond what the schema provides.

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 gives a specific verb and resource: create a new blank Pine Script draft in the editor. It also clarifies the template types and distinguishes this from modifying existing code, which separates it from siblings like pine_set_source and pine_save.

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?

It explicitly states 'WHEN TO USE: Call when starting a new script from scratch rather than modifying existing code.' This gives a clear selection context, though it does not name a specific alternative tool for modification.

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