Skip to main content
Glama

ForexDemo.com

Futures Calculator: how many contracts

calculate_futures_contracts
Read-onlyIdempotent

How many futures contracts fit the amount a trader is willing to lose at the stop, with the micro contract as a finer alternative. Same calculation as the Futures Calculator: how many contracts page at https://forexdemo.com/futures-calculator.html#how-many-contracts. Every input is optional unless marked required; left-out inputs use the page's defaults, which are listed in the reply.

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": {
      "sizeContract": "<sizeContract>",
      "risk": "<risk>"
    },
    "name": "calculate_futures_contracts"
  }
}

Input Schema

NameRequiredDescriptionDefault
riskYesThe most you are willing to lose on the trade, in US dollars.
sizeFeeNoOptional fee per contract, in US dollars.
stopUnitNoHow the stop is given: move (the contract's own point, pip or dollar step), ticks, or prices (sizeEntry and sizeStopPrice).move
sizeEntryNoEntry price (stopUnit prices).
sizeContractYesContract symbol.
sizeFeeBasisNoside or round trip.side
stopDistanceNoDistance to the stop, in stopUnit (move or ticks).
sizeStopPriceNoStop price (stopUnit prices).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so safety needs no restatement. The description adds real behavioral context beyond them: optional inputs fall back to the reference page's defaults and those defaults are echoed in the reply, which matters for a tool with six optional parameters.

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?

Three sentences, front-loaded with the core question the tool answers. The reference URL and 'same calculation as the page' sentence is slightly redundant but serves as a verifiable spec anchor, so little is wasted.

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?

There is no output schema, and the description only partially compensates by saying defaults appear in the reply; it does not say whether the result is a whole number of contracts, how rounding works, or what the micro alternative output looks like. Adequate for a calculator, but an agent cannot fully anticipate the return payload.

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 100% and all eight parameters carry their own descriptions, so the schema does the heavy lifting. The description only adds the defaulting rule for omitted inputs and a passing nod to micro contracts as a finer alternative; it adds no syntax or interaction detail between stopUnit, stopDistance and sizeStopPrice.

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?

The description gives a specific verb and resource: sizing how many futures contracts fit a dollar risk amount at a stop, plus the micro-contract variant. It is clearly distinct from generic calculators, though it never names a sibling (e.g. calculate_position_size or calculate_futures) that an agent might confuse it with.

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?

Usage is implied by the risk-per-trade framing and the note that the micro contract is a finer alternative, which hints at when to prefer it. However, there is no explicit when-to-use/when-not guidance and no routing to or from competing tools such as calculate_position_size or calculate_futures.

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