Skip to main content
Glama
haiiibin

acb-tax-mcp

unrealized_gains

Compute unrealized capital gains by comparing current holdings' adjusted cost base to market prices, returning per-security and portfolio totals. Accepts inline transactions or a CSV file.

Instructions

Compute unrealized gains: current holdings' book cost (ACB) against market prices.

For each security still held, returns shares, total ACB, current market value and the unrealized gain in dollars and percent, plus portfolio totals. 'market_prices' maps each security to its current price: either a number already in CAD (e.g. {"XEQT": 35.20}) or, for foreign-quoted securities, an object with the trade-currency price and the CAD exchange rate (e.g. {"VTI": {"price": 305.40, "fx_rate": 1.37}}). Held securities without a price are listed in 'missing_prices' and excluded from totals. Accepts inline 'transactions' or a 'csv_path'. Each transaction is an object: date (YYYY-MM-DD), action ('buy' or 'sell'), security (ticker/symbol), shares, price (per share), and optionally commission, currency, fx_rate (trade-currency to CAD, e.g. 1.35 for USD), and note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csv_pathNo
transactionsNo
market_pricesYes
Behavior4/5

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

No annotations provided, so description carries full burden. It thoroughly explains input formats, handling of missing prices (listed in missing_prices and excluded), and output structure. It does not mention side effects, but for a compute-only tool, this is adequate.

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?

The description is about 150 words, well-organized into purpose/output in first paragraph and parameter details in second. Every sentence adds value, no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters, nested objects, and no output schema, the description explains inputs and outputs sufficiently, including special cases like missing prices. It mentions the output structure clearly.

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

Parameters5/5

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

Schema coverage is 0%, but the description fully details all parameters: csv_path (optional path), transactions (array of objects with all fields), and market_prices (required object with number or {price, fx_rate} per security). This compensates completely.

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 it computes unrealized gains using ACB against market prices, listing outputs per security and totals. It implicitly distinguishes from siblings like calculate_acb (which computes ACB without market prices) and capital_gains_report (realized gains).

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 explains what the tool does and how to format inputs, but does not explicitly state when to use it versus alternatives like capital_gains_report for realized gains. It provides clear context but no exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/haiiibin/acb-tax-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server