Skip to main content
Glama

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

Average Entry Price

primitive.average_entry
Read-only

Calculate the weighted average entry price from multiple buy/sell fills (DCA): the bare number only, no breakeven or per-fill breakdown. Use when user asks only "what's my average entry?" and wants just that figure. For breakeven and a per-level summary too, use workflow.run_dca_entry instead. Returns: averagePrice, totalSize, totalCost.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes
symbolYesTrading pair symbol, e.g. BTCUSDT
contractTypeNolinear = USDT-margined, average is the arithmetic mean (default). inverse = coin-margined, average is the harmonic mean (fill quantity is USD notional).
exchangeCodeNoExchange identifier (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / contractType
      Added value: +{
      +  "description": "linear = USDT-margined, average is the arithmetic mean (default). inverse = coin-margined, average is the harmonic mean (fill quantity is USD notional).",
      +  "enum": [
      +    "linear",
      +    "inverse"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so safety is covered; the description adds useful scope disclosure beyond that — it returns only the bare average figure and deliberately omits breakeven and per-fill breakdown. It also enumerates the returned fields, which annotations do not. It stops short of any caveats about missing/invalid fills, hence not a 5.

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?

Three short sentences, zero waste, with the core purpose front-loaded before the routing alternative and the return shape. Every clause earns its place.

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?

No output schema exists, but the description enumerates the return fields (averagePrice, totalSize, totalCost), and the nested input is documented by the schema. Between description, schema, and annotations, an agent has everything needed to call this pure-computation tool correctly.

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 coverage is 75%, so the schema already documents symbol, contractType (including the arithmetic vs harmonic mean distinction) and the nested fill fields. The description only adds that fills are 'buy/sell' DCA fills and implies price+quantity weighting; it never mentions contractType, which is the parameter with the most consequential semantics. Baseline 3 is appropriate.

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 ('calculate the weighted average entry price from multiple buy/sell fills') and immediately scopes it as the bare number. It distinguishes itself from workflow.run_dca_entry by name, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use condition (user asks only "what's my average entry?" and wants just that figure) and names the alternative tool plus the condition that selects it (breakeven and per-level summary too → workflow.run_dca_entry). Nothing is left to inference.

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.