Skip to main content
Glama

get_positions

Read current positions from the Flox engine runtime snapshot. Returns a list of positions with account, strategy, symbol, quantity, average price, and unrealized P&L, or indicates the engine is not running.

Instructions

Read positions from a running flox engine via its runtime state snapshot. Use this when the user asks 'what's in my positions' / 'show me the BTC position' / 'is strategy X long or short'. Returns a JSON object {snapshot_age_ms, data:[{account, strategy, symbol_id, symbol_name, qty, avg_price, unrealized_pnl}, ...]}. Snapshot path is FLOX_RUNTIME_STATE env var or the passed state_path; the user app is responsible for writing the snapshot. When no engine has written a snapshot yet, returns {engine: 'not_running', data: [], hint: ...} instead of an error — that's a normal pre-engine state, not a problem to surface to the user. Read-only — never modifies state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoFilter to one account.
strategyNoFilter to one strategy.
state_pathNoOverride snapshot path (defaults to FLOX_RUNTIME_STATE or /tmp/flox-runtime-state.json).
Behavior5/5

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

Even without annotations, the description fully discloses that the tool is read-only, explains the snapshot path mechanism (environment variable or parameter), and details the non-error return state when the engine is not running. This goes beyond minimal requirements and gives the agent a complete understanding of the tool's behavior.

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

Conciseness4/5

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

The description is a single paragraph with several sentences, but each sentence adds value. It front-loads the purpose and provides necessary details without excessive verbosity. It is well-structured and easy for an agent to parse.

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?

Given that there is no output schema, the description fully explains the return JSON structure, including the case when the engine is not running. It covers all parameters and provides operational details (env variable, default path). The tool is simple and the description is complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes all three parameters (account, strategy, state_path) with 100% coverage. The description adds valuable context about the default value for state_path and clarifies that account and strategy are filters. This enhances understanding beyond the schema.

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 clearly states it reads positions from a running flox engine via its runtime state snapshot. It provides specific use-case examples like 'what's in my positions' and 'show me the BTC position', which directly help an agent select the tool. It distinguishes itself from siblings by focusing on positions retrieval.

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?

The description explicitly says when to use the tool (e.g., user asking about positions) and explains the behavior when the engine is not running, providing a clear context for usage. It does not explicitly mention alternatives from sibling tools, but the context is sufficiently clear for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FLOX-Foundation/flox'

If you have feedback or need assistance with the MCP directory API, please join our Discord server