Skip to main content
Glama

ForexDemo.com

Forex Compounding Calculator

calculate_compounding
Read-onlyIdempotent

How an account grows when the same percentage gain is made every trade, day, week, month or year, with optional deposits, withdrawals and losing periods. Same calculation as the Forex Compounding Calculator page at https://forexdemo.com/forex-compounding-calculator.html. Every input is optional unless marked required; left-out inputs use the page's defaults, which are listed in the reply.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_compounding"
  }
}

Input Schema

NameRequiredDescriptionDefault
flowNoAmount (or percentage for share) of each deposit or withdrawal.
gainNoGain per period in percent. Negative for a loss. Give 2 for 2%.
periodNoHow often the gain is made.month
targetNoOptional target balance.
balanceNoStarting balance.
periodsNoNumber of periods.
winRateNoOnly for period trade: the share of trades that win. Give 2 for 2%.
currencyNoThe currency the trading account is held in.USD
flowTypeNoOptional regular money in or out: deposit, withdraw (an amount) or share (a percentage of the profit).none
flowEveryNoHow many periods between deposits or withdrawals. Defaults to about once a month.
lossCountNoNot for period trade: how many losing periods in each group of lossEvery.
lossEveryNoNot for period trade: the size of the group, such as 1 loss every 4 months.
lossPercentNoThe percentage lost in each losing period or losing trade. Give 2 for 2%.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare the tool read-only, idempotent, non-destructive, and closed-world. The description adds useful behavior about optional inputs falling back to page defaults that are echoed in the reply, but says little about the result format or calculation limits.

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 calculation model, followed by page equivalence and optional-input behavior. No filler, though the first sentence is dense.

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?

Given 13 optional parameters and no output schema, the description explains the core model and default behavior but leaves the return structure and output semantics largely unstated. The schema covers parameter details, so this is adequate but not complete.

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%, so all 13 parameters and their defaults are documented in the schema. The description adds a general optionality/default rule, but does not add parameter-specific meaning beyond the schema.

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 the core calculation precisely: account growth under a constant percentage gain per period, with optional deposits, withdrawals, and losing periods. It does not explicitly contrast with sibling calculators, but the resource (compounding growth) is clear.

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?

Implies use when modelling repeated percentage gains and optional cash flows, but never says when to prefer it over calculate_profit, calculate_win_rate, or other calculators. No exclusions or prerequisites are given.

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