Skip to main content
Glama

tax_us.capital_gains

Read-onlyIdempotent

Calculate US federal capital gains tax by stacking gains on ordinary taxable income, applying long-term 0/15/20% or short-term ordinary rates, with optional 3.8% NIIT.

Instructions

미국 연방 자본이득세를 계산한다. 장기(long)는 0%/15%/20% 구간을 신고 유형별로 적용하며 ordinary_taxable_income 위에 양도소득을 쌓아 과세하고, 단기(short)는 그 증가분에 일반 소득세율을 쓴다. apply_niit=true 이면 순투자소득세 3.8%를 더한다. 금액은 USD Decimal 문자열이고 기본은 소수 둘째 자리 HALF_UP이다. ordinary_taxable_income 을 생략하면 0으로 보므로 다른 소득이 있으면 반드시 넣어야 한다.

Input Schema

NameRequiredDescriptionDefault
gainYes
magiNo
termNolong
yearYes
as_ofNo
decimalsNo
roundingNoHALF_UP
apply_niitNo
filing_statusYes
include_proposedNo
ordinary_taxable_incomeNo

Output Schema

NameRequiredDescriptionDefault
taxYes
niitYes
termYes
_metaNo서버가 붙이는 영수증(integrity), 엔진, 힌트
traceYes계산 근거(tool, formula, inputs, steps, output)
methodYes
ltcg_taxYes
breakdownYes
niit_baseYes
filing_statusYes
marginal_rateYes
policy_sha256Yes
policy_sourceYes
policy_statusYes
policy_versionYes적용된 정책 문서의 식별 정보
taxable_incomeYes
policy_audit_idYes
policy_citationsYes정책의 근거 조문
policy_effective_toYes
policy_effective_dateYes
ordinary_policy_versionYes
ordinary_taxable_incomeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover read-only/idempotent/closed-world, and the description adds real behavioral detail beyond them: gains are stacked on top of ordinary income, NIIT adds 3.8% when apply_niit=true, and rounding defaults to 2 decimals HALF_UP. It stops short of noting any limits or how year/as_of affect bracket selection.

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?

Five sentences, each front-loaded with distinct information (purpose, bracket mechanics, NIIT, numeric format, defaulting trap). No filler or repetition.

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

Completeness3/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 no explanation, but for an 11-parameter, zero-coverage tax tool the description omits critical semantics for magi (NIIT threshold input), as_of (law version) and include_proposed (proposed legislation), which an agent cannot infer from the schema alone.

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 coverage is 0% across 11 parameters, so the description must carry the load. It explains term, apply_niit, ordinary_taxable_income, decimals/rounding and filing_status indirectly, but leaves magi, as_of, include_proposed and year entirely undefined—meaningful gaps for a tax calculator.

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 (미국 연방 자본이득세를 계산한다) and immediately details the two regimes (long-term 0/15/20% brackets vs short-term ordinary rates), which cleanly separates it from tax_us.federal_income and tax.capital_gains_kr.

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?

Gives a concrete usage rule that an agent could easily get wrong: omitting ordinary_taxable_income defaults to 0, so it must be supplied when other income exists. It does not, however, explicitly route the agent away from the KR capital-gains or federal-income siblings.

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

Deploy Server

Other Tools