Skip to main content
Glama
pineforge-4pass

PineForge-Codegen

Transpile Pine to C++

transpile_pine
Idempotent

Generate a C++ translation unit from PineScript v6 source locally with no API key or network, so source never leaves your machine. Returns the generated C++ for backtesting.

Instructions

Transpile PineScript v6 source to a C++ translation unit locally, using the pineforge-codegen transpiler bundled in the pineforge-release Docker image. No API key, no network — source never leaves the machine. Returns the generated C++ as text. Use backtest_pine if you also want to run the strategy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
imageNoDocker image override. Defaults to ghcr.io/pineforge-4pass/pineforge-engine:latest.
sourceYesPineScript v6 source (must include //@version=6).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.4

TDQS

A4.3/5.0
Behavior4/5

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

Adds real behavioral context beyond the annotations: no API key, no network, source never leaves the machine, and the return is text C++. That is more than the hints convey. However the 'no network' claim sits uneasily against openWorldHint=true, and readOnlyHint=false is not explained for what reads as a pure code-generation operation, leaving some ambiguity.

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?

Three short sentences, front-loaded with what it does, then the local/no-key guarantees, then the routing to the alternative. No filler and nothing buried.

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?

No output schema exists, and the description compensates by stating the return is the generated C++ as text. Combined with the version requirement (v6) and the Docker dependency, an agent has what it needs to invoke it correctly.

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 both parameters (source, image) are already documented in the schema, and the description adds no format or syntax detail beyond it. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb (transpile) and resource (PineScript v6 source) and names the concrete output (a C++ translation unit). It explicitly distinguishes itself from the sibling backtest_pine, so an agent can pick the right tool without opening either schema.

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?

Explicitly routes the agent to backtest_pine when it also wants to run the strategy, which is clear alternative-selection guidance. It stops short of stating prerequisites that its own siblings imply, such as needing the engine image present (check_engine_image/pull_engine_image), so it is not a full 5.

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