ListAccounts and GetConnections
ListAccounts enumerates every NinjaTrader account currently visible through the user's connected CrossTrade Add-On. GetConnections reports the connection state for each account (Connected, Disconnected, Connecting, etc.).
Both belong in the first batch of any agent session.
| Property | Value |
|---|---|
| Required scope | mcp:read |
| Risk | None. Read-only. |
| Side effects | None. |
When an agent should use them
- Before any order, cancel, flatten, deploy, or write operation.
- At the start of a journal review or risk-brief workflow.
- After connection-related troubleshooting.
When an agent should not use them
- In a tight polling loop. The state changes on minute-scale.
Parameters
{}
Neither tool requires parameters in the default form.
Response shape
ListAccounts:
{
"accounts": [
{"name": "Sim101", "connection": "Sim101", "broker": "Sim"},
{"name": "APEX1234", "connection": "Rithmic", "broker": "Apex"}
]
}
GetConnections:
{
"connections": [
{"name": "Sim101", "status": "Connected"},
{"name": "Rithmic", "status": "Connecting"}
]
}
The exact field names may vary slightly with add-on version; treat the agent's first call as schema-discovery.
Example user prompt
List my accounts and connection state. Tell me which accounts are usable
right now and which are not. Do not place anything.
Example tool call
{ "name": "ListAccounts", "arguments": {} }
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Empty accounts array | NT8 is closed or no broker is configured. | Open NT8 and confirm at least one connection. |
addon_disconnected | Add-on side is down. | Restart the add-on panel inside NT8. |
Safe workflow placement
GetMcpCapabilities → McpSelfTest → ListAccounts → GetConnections → ...
If any account that the agent intends to act on is not Connected, the agent should refuse the action and surface the connection state to the user.