LookupNinjaScriptSymbol
Resolves one symbol against the live NinjaScript runtime: namespace, members, and overload list. The most useful repair tool when compile fails on an unknown identifier.
| Property | Value |
|---|---|
| Required scope | mcp:read |
| Risk | None. Read-only. |
| Side effects | None. |
When an agent should use it
- After a
CompileNinjaScriptfailure that references a missing or ambiguous symbol. - When choosing among method overloads before writing code.
Parameters
{ "name": "EMA" }
Response shape
{
"name": "EMA",
"kind": "indicator",
"namespace": "NinjaTrader.NinjaScript.Indicators",
"members": [
{"signature": "EMA(int period)"},
{"signature": "EMA(ISeries<double> input, int period)"}
]
}
Example user prompt
The compile failed on a call to ATR. Look up ATR and tell me the overloads
available. Pick the one that matches what we have and rewrite the line.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
not_found | The symbol does not exist or is not loaded. | Use SearchNinjaScriptSymbols to find similar names. |
Use in AI-generated NinjaScript workflows
- When the agent should call it: for every unresolved identifier in a compile failure, and before generating code that references an ambiguous overload.
- Required scope:
mcp:read. - Confirmation required: no.
- What the agent should summarize: the chosen overload's exact signature and the rationale, plus any rejected alternatives.
- Failure mode it helps catch: the most common compile failure pattern in AI-generated NinjaScript: wrong overload, removed method, hallucinated namespace.
For the broader vibe coding workflow, see NinjaScript AI Workflow.