Skip to main content
Glama

Calculate capital gains tax

calculate_capital_gains_tax
Read-onlyIdempotent

Estimates UK capital gains tax on selling a rental property, shares or another asset: gain after allowable costs, private residence relief where it applied, the annual exempt amount, tax at basic and higher rates based on the seller's income, and how much a joint sale with a spouse or civil partner would save.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sdltPaidNoStamp duty paid on purchase in GBP.
assetTypeNoWhat is being sold.residential_property
salePriceYesSale price in GBP.
annualIncomeNoThe seller's gross annual income in GBP, which sets the CGT rate.
sellingCostsNoAgent and legal selling costs in GBP.
ownershipTypeNoOwned by one person or jointly with a spouse or civil partner.single
purchaseCostsNoLegal, survey and other buying costs in GBP.
purchasePriceYesOriginal purchase price in GBP.
isMainResidenceNoWhether the property was ever the seller's main home.
improvementCostsNoCapital improvements in GBP (not repairs).
totalMonthsOwnedNoTotal months owned, for partial private residence relief.
otherGainsThisYearNoOther capital gains already made this tax year in GBP.
monthsAsMainResidenceNoMonths lived in as main home, for partial private residence relief.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, openWorldHint=false), so the bar is lower. The description goes beyond them by disclosing exactly what the calculation accounts for — allowable costs, private residence relief 'where it applied', the annual exempt amount, rate bands driven by income, and a joint-sale comparison — which tells the agent what the tool will and will not consider.

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?

A single dense sentence, front-loaded with the verb and object, and every listed clause maps to a real output component. It is long but not padded; slight readability cost from packing five items into one sentence.

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?

With 13 parameters and no output schema, the description usefully doubles as a return-value summary, which is exactly what's needed here. It omits tax-year/rate-version assumptions, jurisdiction edge cases (non-UK, non-spouse joint ownership), and any disclaimer that this is an estimate rather than tax advice — modest but real gaps for a tax tool.

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% with 13 well-documented parameters, so the schema carries the load and the baseline is 3. The description hints at relationships (rate 'based on the seller's income', joint ownership savings) but adds no syntax, units, or defaults beyond what the schema already states.

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?

States a specific verb ('Estimates') and a specific, bounded resource ('UK capital gains tax on selling a rental property, shares or another asset'), then enumerates the components computed. It is easily separable from siblings like calculate_section_24_tax or calculate_stamp_duty by subject matter, though it never names a sibling to route against.

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?

Usage is only implied: the enumerated outputs tell an agent this tool applies to a disposal scenario, but there is no explicit when-to-use, when-not-to-use, or alternative routing (e.g. vs. calculate_section_24_tax or the ownership-comparison tool). Nothing is misleading, but the agent must infer the entry conditions.

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.

Resources