Skip to main content
Glama

MaCalculatriceEnLigne

calculate_crypto_profit_loss

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

TableJSON 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

TableJSON 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

A4.4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden. It transparently describes the calculation's inputs and outputs, implying no side effects. Missing details on error handling or precision, but adequate for a calculator.

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 sentences front-loaded with core action and key details. No redundant information; each sentence serves a purpose.

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?

Given the tool's simplicity and existence of an output schema, the description covers essential aspects: purpose, inputs, outputs, and usage. Missing edge cases but acceptable for this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, baseline is 3. The description adds value by grouping inputs and explaining the return values, enhancing semantic understanding 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?

The description clearly states the tool computes crypto trading profit/loss including fees, specifying inputs and outputs. It targets crypto investors and differentiates from siblings by focusing on realized P&L.

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?

The description provides a clear use case ('tracking realized P&L') and references related calculators via list_bundles. However, it lacks explicit exclusions (e.g., when not to use).

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.