Skip to main content
Glama

record_split

Destructive

Record a stock split or reverse split to update a position's units and average cost while leaving cash unchanged; use ledger-only mode when the snapshot already reflects the split.

Instructions

Record a stock split / reverse split: units x ratio, average cost / ratio, cash unchanged (market value is unchanged). Call it once per split — a second call multiplies the position again; use an idempotency_key if unsure whether an earlier attempt landed. Rejected when the ledger already has trades / corrections for the symbol on or after trade_date (their units are already post-split, so multiplying the whole snapshot would invent shares) — pass ledger_only=true if the snapshot is already correct.

Confirm symbol, ratio, and ex-date with the user before calling; this rewrites the position's units and average cost.

Args: symbol: Ticker that split. ratio: New / old shares (10-for-1 = 10; 1-for-10 reverse = 0.1). trade_date: Ex-date YYYY-MM-DD (default today). note: Free-text note. ledger_only: Write the ledger row only; do not change units / average cost. idempotency_key: Reuse the same key when retrying this exact call; recorded once.

Returns: New units / average cost (plus a follow_up hint), or {"status": "error", "error": ...}.

Input Schema

NameRequiredDescriptionDefault
noteNoFree-text note stored with the ledger row.
ratioYesNew shares per old share: a 10-for-1 split is 10, a 1-for-10 reverse split is 0.1. Must be > 0 and not 1.
symbolYesyfinance ticker that split (must be held now or appear in the ledger).
trade_dateNoEx-date of the split, YYYY-MM-DD (default: today). Pass the real ex-date when back-filling: account performance uses it to restate earlier trades.
ledger_onlyNoOnly write the ledger row, leave the holding's units / average cost untouched. Use it when the snapshot already reflects the split (e.g. you fixed the units by hand, or later trades were booked in post-split units).
idempotency_keyNoOptional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "duplicate"} without touching cash or holdings. Only the key is compared, not the arguments — a different order (other symbol/units/price/amount) needs a new key, or it is silently treated as the retry.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.45.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false; the description is consistent with both and adds real context: it rewrites units and average cost, the rejection condition, and the duplicate-return behavior when reusing an idempotency_key. Return shape is mentioned but an output schema already covers that, so it is a modest addition rather than a gap.

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?

Front-loaded with the core behavior and mutation warning, then the rejection rule, then a caution. The trailing Args/Returns block duplicates the JSON schema descriptions verbatim, which is redundant, but the prose paragraphs themselves are tight and every sentence carries information.

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?

For a destructive, non-idempotent mutation with 6 parameters, the description covers the arithmetic effect, the confirmation requirement, the double-apply hazard, the rejection condition with its workaround, and retry semantics. An output schema exists, so the brief Returns line is sufficient rather than insufficient.

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?

Schema coverage is 100%, so the schema already documents all six parameters, and the Args block largely restates it. What the description adds beyond the schema is the derived semantics — that units multiply by ratio while average cost divides by it, with cash untouched — which tells the agent the actual effect of the ratio value.

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?

States a specific verb and resource ("Record a stock split / reverse split") and immediately gives the arithmetic effect: units x ratio, average cost / ratio, cash unchanged. This clearly separates it from sibling mutation tools like record_dividend, record_return_of_capital, and record_fee.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call it once per split and warns that a second call multiplies the position again. It also names the precondition that causes rejection (existing trades/corrections on or after trade_date) and the escape hatch (ledger_only=true), plus a confirmation-before-calling instruction.

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