Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Crypto Profit Loss

calculate_crypto_profit_loss
Read-onlyIdempotent

Compute crypto trading profit/loss including fees. Use for crypto investors tracking realized P&L. Inputs: buy price, sell price, quantity, buy fee, sell fee. Returns net P&L, ROI %, break-even price. See list_bundles for related 'crypto' calculators.

Input Schema

NameRequiredDescriptionDefault
quantityYesQuantity of cryptocurrency traded
buy_priceYesPurchase price per unit in fiat currency
sell_priceYesSale price per unit in fiat currency
buy_fee_pctNoBuy transaction fee percentage (default 0.1%)
sell_fee_pctNoSell transaction fee percentage (default 0.1%)

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds that fees are part of the computation and what outputs are returned, but since an output schema exists that return list is largely redundant and no sign convention (losses negative) or currency assumption is disclosed.

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?

Four short sentences, front-loaded with purpose before inputs and outputs. The input/output enumeration partly restates the schema and output schema, so it is efficient but not entirely free of redundancy.

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 read-only, closed-world calculator with full schema coverage and an output schema, the description covers purpose, inputs, outputs and discovery. Minor gaps remain around sign convention for losses and the percent-vs-absolute fee wording, but nothing blocking for a correct invocation.

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%, so parameter documentation is already complete and the 3 score baseline applies. The description's 'buy fee, sell fee' phrasing slightly diverges from the actual buy_fee_pct/sell_fee_pct percentage parameters, adding no additional meaning beyond the schema.

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 ('Compute crypto trading profit/loss including fees') and narrows scope to realized P&L for crypto investors, which cleanly separates it from siblings like calculate_mining_profitability, calculate_staking_rewards, calculate_impermanent_loss and calculate_crypto_tax_fr.

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?

'Use for crypto investors tracking realized P&L' gives clear usage context, and 'See list_bundles for related crypto calculators' points at discovery. It stops short of naming when NOT to use it (e.g. unrealized P&L, tax reporting), so no explicit alternative routing.

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.