Skip to main content
Glama
haiiibin

acb-tax-mcp

by haiiibin

calculate_acb

Calculate adjusted cost base and capital gains for Canadian trades using the CRA average-cost method, including superficial-loss rule detection.

Instructions

Compute adjusted cost base and capital gains for a set of trades (Canadian rules).

Runs the full calculation and returns: current holdings (shares, total ACB, ACB per share) per security; every disposition with proceeds, ACB, outlays, the gain before and after the superficial-loss rule, and whether it was a superficial loss; per-tax-year summaries with net and taxable capital gain; and any warnings.

Uses the CRA average-cost method (all shares of a security pool into one ACB; gains are computed against the average, not FIFO). Pass trades either inline as 'transactions' or as a file path in 'csv_path' (CSV or JSON). 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.

This is a calculation aid, not tax advice; verify results before filing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
csv_pathNo
transactionsNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the calculation method (average-cost, not FIFO), the types of outputs, and that it is a tax aid requiring verification. It does not mention potential limitations (e.g., number of trades) or errors, but the disclosed behaviors are clear and sufficient for basic usage.

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?

The description is structured in three paragraphs: purpose, outputs, and input format. It is concise with no fluff, but it could be slightly shortened by combining sentences. The key information is front-loaded.

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 complexity of a tax calculation tool with 2 parameters and no output schema, the description provides detailed output types, input formats, and a warning. It covers the major aspects, though it lacks details on error handling, maximum trade counts, or currency handling. Overall, it is sufficiently complete for most use cases.

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 description coverage is 0%, so the description must compensate. It does so extensively: it defines 'csv_path' as a file path for CSV/JSON, and 'transactions' as an array of objects with detailed structure (date, action, security, shares, price, etc.), adding critical meaning beyond the schema's minimal typing.

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?

The description clearly states it computes adjusted cost base and capital gains for trades under Canadian rules, using the CRA average-cost method. It specifies the outputs (holdings, gains, summaries, warnings). However, it does not explicitly differentiate itself from sibling tools like 'acb_summary' or 'capital_gains_report', leaving some ambiguity about when to use this tool over alternatives.

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?

The description explains how to pass trades (inline or file path) and provides transaction structure. It includes a disclaimer about being a calculation aid. However, it does not give explicit guidance on when to use this tool vs. siblings, such as whether to use this for full calculations or 'acb_summary' for summaries.

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