Skip to main content
Glama

pine_save_new

Creates a new cloud Pine script from supplied source, rejects duplicate names, and verifies the saved ID, version, and source hashes without changing the editor binding.

Instructions

Create a new cloud Pine script from supplied source, refuse duplicate names, and independently verify new ID/version/full source, allowing only uniform LF/CRLF conversion with explicit comparison and both hashes. Leaves the editor binding unchanged.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "source": "<source>",
      "target_id": "<target_id>",
      "expected_layout_id": "<expected_layout_id>"
    },
    "name": "pine_save_new"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare a non-readonly, non-idempotent, open-world write, so the description correctly frames this as a mutation. It adds real value beyond that: duplicate names are rejected, the new ID/version/full source is independently verified, only uniform LF/CRLF conversion is tolerated, both hashes are reported, and the editor binding is left intact. Auth/permission requirements and failure modes are not covered, keeping it below a 5.

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

Conciseness3/5

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

Purpose is front-loaded, but the remaining content is packed into one dense run-on that chains duplicate refusal, ID/version verification, line-ending normalization, hashing, and binding state. Every clause is relevant, but the lack of sentence breaks makes the verification guarantees harder to scan.

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 five-parameter mutation with no output schema, the description covers the important behavior: uniqueness enforcement, post-write verification, tolerance for line-ending differences, and editor binding side effects. Only the timeout parameter and permission requirements are left unaddressed, which is a minor gap.

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 40%, so the description must compensate; it does partially by tying 'name' to the uniqueness check and 'source' to the LF/CRLF verification, and by noting the editor binding is unchanged (relevant to expected_layout_id). However, timeout_ms is undocumented in both schema and description, and expected_layout_id's mismatch-abort semantics come from the schema, not the description.

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 and resource: 'Create a new cloud Pine script from supplied source,' plus the key invariant that duplicate names are refused. It is distinct from siblings like pine_save or pine_save_as, though it never names them explicitly, so differentiation is inferred from the verb rather than stated.

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 create-only framing and duplicate-name refusal imply when to use it (new script, not saving an existing one), but there is no explicit when-not guidance or an alternative such as pine_save_as / pine_new_buffer for related cases. Preconditions like editor state or tab requirements are only hinted at via 'Leaves the editor binding unchanged.'

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