Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Forex Average Entry

workflow.run_forex_average_entry
Read-only

Size-weighted average entry price across multiple forex fills: plain arithmetic mean, since forex has no coin-margined analog requiring the harmonic mean the crypto average_entry tool uses for inverse contracts. Use when user asks "what's my average entry after these fills?". Returns: totalUnits, totalCost, avgEntry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYesCurrency pair in BASE/QUOTE format, e.g. "EUR/USD"
fillsYesFills to average, each with a price and a size in base-currency units

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, non-destructive, and non-open-world behavior. The description adds meaningful context beyond that: it specifies the calculation method (plain arithmetic mean) and lists the exact return fields (totalUnits, totalCost, avgEntry). It does not address edge cases like empty fills, but for a simple averaging read operation the added computation and return detail is substantial.

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 front-loaded with the core operation, follows with the rationale that differentiates it from the crypto sibling, then gives the trigger and return fields. Every clause earns its place and there is no redundant filler.

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?

For a simple two-parameter read-only averaging tool with full schema coverage and annotations, the description is complete: it explains the computation, provides a usage trigger, and enumerates the return values. No output schema exists, so specifying the return fields fills the remaining gap.

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%, and the schema already documents both 'pair' (BASE/QUOTE format) and 'fills' (price and units). The description does not add further parameter syntax, constraints, or formatting details, so the baseline of 3 applies.

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?

States a specific verb and resource: 'Size-weighted average entry price across multiple forex fills.' It explicitly distinguishes itself from the sibling crypto average_entry tool by contrasting arithmetic and harmonic means for inverse contracts, so an agent can tell them apart without opening schemas.

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?

Gives an explicit trigger phrase: 'Use when user asks what's my average entry after these fills?'. It also implicitly sets boundaries by noting forex has no coin-margined analog, pointing to the crypto average_entry tool for that case. However, it does not explicitly state when not to use this tool or name the alternative as a direct replacement.

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.