Skip to main content
Glama

position_pnl

PnL in currency and percent for a long or short, including fees and leverage, and the return on margin. 0.001 USDC per call via x402.

Input Schema

NameRequiredDescriptionDefault
exitYesExit price
sideYeslong or short
sizeYesPosition size in base units or notional
entryYesEntry price
feePctNoRound-trip fee percent
leverageNoLeverage
paymentProofNoPayment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose meaningful context: the cost is 0.001 USDC per call via x402, and the computation includes fees, leverage, and return on margin. It does not explicitly state side-effect behavior, but for a pure calculator the cost and computation scope are the key behavioral facts.

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?

Two sentences with zero waste. The computation is front-loaded, and the pricing note follows naturally.

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

Completeness4/5

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

For a 7-parameter calculator with full schema coverage and no output schema, the description covers what is returned (currency and percent PnL, return on margin) and the payment cost. It omits assumptions or edge-case behavior, but is largely complete for correct invocation.

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 all seven parameters are already documented in the schema. The description adds that fees and leverage affect PnL and return on margin, but does not add syntax or format details beyond the schema, so baseline 3 is appropriate.

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 calculation (PnL in currency and percent) for long or short positions, including fees, leverage, and return on margin. This is a clear verb+resource definition, but it does not differentiate itself from sibling finance calculators such as break_even_price or risk_reward.

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 description does not provide explicit when-to-use or when-not guidance, nor does it name alternatives among the many finance calculator siblings. Usage is only implied by the stated calculation.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.