zero_estimate_cost
Calculate operational costs for transactions on Zero Network to help developers budget for crypto-based payments and MCP pricing implementations.
Instructions
Estimate the cost of operating on Zero Network.
Args: num_transactions: Number of transactions to estimate for avg_amount_z: Average transaction amount in Z (default 0.10 Z)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_transactions | Yes | ||
| avg_amount_z | No |
Implementation Reference
- zero_mcp/server.py:661-687 (handler)The implementation of the 'zero_estimate_cost' tool which calculates transaction fees and total costs on the Zero Network.
@mcp.tool() def zero_estimate_cost(num_transactions: int, avg_amount_z: float = 0.10) -> str: """Estimate the cost of operating on Zero Network. Args: num_transactions: Number of transactions to estimate for avg_amount_z: Average transaction amount in Z (default 0.10 Z) """ fee_per_tx = 0.01 # Z total_fees_z = num_transactions * fee_per_tx total_fees_usd = total_fees_z * 0.01 total_amount_z = num_transactions * avg_amount_z total_amount_usd = total_amount_z * 0.01 total_z = total_fees_z + total_amount_z total_usd = total_z * 0.01 return f"""# Cost Estimate for {num_transactions:,} transactions ## Fees - Fee per transaction: 0.01 Z ($0.0001) - Total fees: {total_fees_z:,.2f} Z (${total_fees_usd:,.4f}) ## Payments (at {avg_amount_z:.2f} Z average) - Total payment volume: {total_amount_z:,.2f} Z (${total_amount_usd:,.4f}) ## Total Cost - Total Z needed: {total_z:,.2f} Z (${total_usd:,.4f})