Skip to main content
Glama

Short- vs Long-Term Capital Gains

short_vs_long_term_capital_gains
Read-onlyIdempotent

Realized gains and losses from a pasted broker transactions export, split into short-term (held a year or less) and long-term by tax year, lots matched first-in, first-out, with sells that have no buy in the export set aside. Example questions: "How much short-term gain did I have this year?"; "Split my 2025 trades into short and long term"; "What are my capital gains?"

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "transactions_csv": "<transactions_csv>"
    },
    "name": "short_vs_long_term_capital_gains"
  }
}

Input Schema

NameRequiredDescriptionDefault
tax_yearNoOne tax year (default: every year in the export)
transactions_csvYesThe transactions or gains/losses CSV from the broker, pasted as text (E*TRADE download, this repo's CSV, or plain columns date, action, symbol, quantity, price, fee)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description still adds real behavioral substance beyond that: FIFO lot matching, the one-year holding-period rule, and the important caveat that sells without a matching buy in the export are set aside. It does not mention permission/auth needs or any size or rate limits on pasted CSV text.

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 methodology is front-loaded in one dense opening sentence, followed by illustrative questions that earn their place as disambiguation aids. Slightly longer than strictly necessary, but no sentence is filler.

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?

There is no output schema, so the description must imply the return shape; it does so by stating the split into short-term and long-term by tax year. Combined with the FIFO and unmatched-sell caveats, an agent has enough to call it correctly, though a hint at the response fields or how unmatched lots are reported would close the remaining gap.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already documents tax_year's default of every year in the export and the acceptable CSV shapes. The description restates the tax-year grouping and the CSV sources without adding syntax or format detail beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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 opens with a precise verb+resource: realized gains and losses from a pasted broker export, split short-term vs long-term by tax year. The FIFO lot-matching and the handling of unmatched sells make the computation unambiguous. It does not explicitly distinguish itself from the overlapping sibling realized_pnl, which keeps it just short of a 5.

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 example questions ("How much short-term gain did I have this year?", "Split my 2025 trades into short and long term") give concrete contexts that map an agent's request onto this tool. There are no explicit exclusions or named alternatives, such as when to prefer realized_pnl or wash_sale_check instead.

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.