Skip to main content
Glama

trade_expectancy

Read-onlyIdempotent

Trade expectancy and fractional Kelly: balance in USD, win rate/buffer/cap in percent, wins/losses/cost in R, fraction 0–1. Returns results, conditions, assumptions, an editable link, share page and PNG. No account access or order execution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costNoCost per trade in R units.
avgWinNoAverage winning trade in R units.
avgLossNoAverage losing trade in R units.
balanceNoAccount balance in dollars.
riskCapNoMaximum account risk in percent.
winRateNoEstimated win rate in percent.
fractionNoKelly multiplier, e.g. 0.25 for quarter Kelly.
winBufferNoConservative reduction in win rate, in percentage points.
include_imageNoAlso inline a PNG no wider than 1000 pixels. Image URL is always returned.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsYes
resultsYes
edit_urlYes
image_urlYes
share_urlYes
calculatorYes
conditionsYes
disclaimerYes
assumptionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description adds a scope boundary (no account access, no order execution) that clarifies it is a stateless computation. It complements rather than repeats the annotations, though it does not add auth or rate-limit context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences, front-loaded with the computation and its units; every clause maps to real content. The payoff list in sentence two is slightly verbose given an output schema exists, but nothing is wasted.

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 calculator with 9 optional, fully-defaulted params, an output schema, and safety annotations, the definition gives enough to call it correctly. The only real gap is sibling routing, which a purely computational tool can partly afford to omit.

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 each parameter's unit, so the description's unit groupings largely restate structured data. The compressed 'fraction 0–1' and buffer/cap framing adds marginal value, fitting the baseline 3.

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?

Names the specific computation (trade expectancy and fractional Kelly) and enumerates each input group with its unit, so an agent knows exactly what the tool computes. It does not explicitly distinguish itself from calculator siblings like position_size or compound_interest, which keeps it short of a 5.

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

Usage Guidelines3/5

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

The trailing clause 'No account access or order execution' signals this is a pure calculator rather than a trading action, implying usage. However, it never states when to pick this over position_size or the other calculators, so guidance is only implied.

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.

Resources