Skip to main content
Glama

compute_capital_gains

Calculates long-term and short-term capital gains by asset class from validated trades using FIFO lots, including grandfathering for pre-31-Jan-2018 equity.

Instructions

Compute LTCG and STCG by asset class from validated trades using FIFO lots, with grandfathering for pre-31-Jan-2018 equity.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "compute_capital_gains"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the computation methodology (FIFO lot matching, grandfathering cut-off date), but says nothing about side effects — whether results are persisted, what happens if trades are unvalidated or missing, or whether re-running is idempotent.

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?

A single dense sentence with zero waste, front-loading the outputs (LTCG/STCG) before the method. Nothing is redundant or padded.

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?

An output schema exists, so return values need not be described, and there are no parameters to document. The remaining gap is operational context: whether it reads previously ingested/validated data only, and what it does with prior results.

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?

The tool takes zero parameters, so there is no parameter semantics to explain; baseline is 4. The description wisely avoids inventing parameter-like details and instead describes the implicit data source (validated trades).

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?

Names a specific verb ('Compute') and specific resources (LTCG and STCG by asset class) plus the method (FIFO lots, grandfathering for pre-31-Jan-2018 equity). It is clearly a capital-gains computation rather than a tax/deduction computation, but it never explicitly contrasts itself with siblings like compute_tax, leaving differentiation implicit.

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 phrase 'from validated trades' implies a prerequisite (trades must be ingested and validated first) and the scope is limited to capital gains, but there is no explicit when-to-use/when-not-to-use statement and no sibling tool is named as an alternative.

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