Skip to main content
Glama

pnl_position

Retrieve real-time profit and loss for a specific Interactive Brokers position using its contract ID (conId), with optional account and model code filters.

Instructions

Get real-time PnL for a specific position by conId.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "conId": "<conId>"
    },
    "name": "pnl_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
conIdYesContract ID
accountNoAccount ID
modelCodeNoModel code for FA

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does contribute one genuine behavioral fact beyond the schema: the values are 'real-time' rather than end-of-day or snapshot. It says nothing about data-permission requirements, failure behavior for an invalid or expired conId, or whether the optional account/modelCode change the result scope.

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?

A single sentence with the key identifier (conId) front-loaded and no redundant restatement of the title or schema. Nothing could be removed without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter, read-only lookup with no output schema and no annotations, the description covers the core question (what it returns) but leaves out selection guidance versus pnl_account and the meaning of the two optional parameters. Adequate to invoke, thin for correct routing and interpretation.

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 conId, account, and modelCode are already documented in the schema and the baseline is 3. The description adds only the notion that conId identifies the position being priced; it does not clarify when account or modelCode (FA model) should be supplied or how they alter the returned PnL.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get real-time PnL') plus a scoping qualifier ('for a specific position by conId'), which lets an agent distinguish it from the account-level sibling pnl_account. It stops short of naming that sibling explicitly, so differentiation relies on the agent noticing the word 'position'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'by conId' implies a single-position lookup, but there is no explicit when-to-use guidance, no statement of when to prefer pnl_account instead, and no prerequisites (e.g. whether a market-data subscription or account context is needed). The agent must infer the choice between this and the account-level PnL tool.

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

Deploy Server

Other Tools