Skip to main content
Glama
florinel-chis

oanda-mcp

get_position

Read-only

Retrieve the current position for a single instrument in your OANDA account. Shows open or flat status, units, average price, realized and unrealized P/L, and margin used.

Instructions

Get the account's position for one instrument (open or flat).

Returns {"position": {...}, "lastTransactionID": "..."}. The position has instrument, lifetime realized pl, unrealizedPL, marginUsed, financing (decimal strings in the home currency), and long/short sides with units (decimal string; negative on the short side, "0" when flat), averagePrice (only while open), tradeIDs, pl, and unrealizedPL. Requesting an instrument the account has never traded fails with HTTP 404.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instrumentYesInstrument name, e.g. 'EUR_USD' or 'EU50_EUR'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description provides rich behavioral details beyond the readOnlyHint annotation: it explains the return structure, decimal string formatting, flat representation, and the HTTP 404 error for untraded instruments. This gives the agent a clear understanding of edge cases and response semantics.

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?

The description is detailed but every sentence contributes essential information about what the tool returns, how the data is structured, and error behavior. It is well-organized and appropriately sized for the complexity.

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?

With an output schema present, the description still adds crucial context about data types (decimal strings), sign conventions, and failure modes. The tool is a read-only single-position lookup, and the description covers all necessary behavioral aspects completely.

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 documents the instrument parameter with an example, and the description adds meaningful behavior: the parameter must refer to an instrument the account has traded, otherwise a 404 is returned. This adds value beyond the raw 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 precisely states 'Get the account's position for one instrument (open or flat)', which is a specific verb+resource+scope. It clearly distinguishes from sibling tools like list_positions by focusing on a single instrument.

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 clearly indicates the tool is for retrieving a single instrument's position and notes the 404 failure when the instrument has never been traded. However, it does not explicitly contrast with alternatives like list_positions or list_open_positions, though the 'one instrument' phrasing implies the distinction.

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/florinel-chis/oanda-mcp'

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