Skip to main content
Glama

flatin.pt — Portuguese homes: taxes, construction, new-builds

Calculate IMT and stamp duty on a home purchase

imt_calculate
Read-onlyIdempotent

Use this when asked what a home purchase in Portugal costs on top of the price: IMT, stamp duty and Casa Pronta registration, by the 2026 tables. Do not use it for the yearly property tax (imi_annual_cost) or to define a term such as VPT (glossary_lookup). Both taxes are charged on the higher of value and vpt: pass the VPT when known. tax_haven_company takes precedence over non_resident. buyer_is_young applies only when primary_home is true. For a non-resident buyer the answer says what the Tax Authority annuls later on request.

Input Schema

NameRequiredDescriptionDefault
vptNoOptional. The VPT (valor patrimonial tributário) from the caderneta predial, in euros. IMT and stamp duty are charged on the higher of the price and the VPT (CIMT art. 12.º n.º 1), so pass it when it is known
valueYesPurchase price as written in the contract, in euros; a dot or a space may group thousands (250.000)
territoryNoMainland Portugal (continente) or the Azores and Madeira (regioes_autonomas), which have their own IMT tablescontinente
non_residentNoThe buyer is not and has never been tax resident in Portugal. IMT is then a flat rate with no exemption or reduction — no zero band, no young buyers' table, no stamp duty deduction (CIMT art. 17.º n.º 10); the result says what the Tax Authority annuls on request if the buyer becomes tax resident or lets the home at a moderate rent. A buyer who has already been treated as tax resident pays by the tables: leave it false
primary_homeNoThe buyer's own permanent home (habitação própria e permanente); false for a second home or an investment, which has no zero band
buyer_is_youngNoThe buyer is 35 or under on the date of the deed, is buying their first own permanent home, is not an IRS dependant and has owned no residential property in the previous three years. Applies the reduced IMT table and the stamp duty deduction (art. 7.º-A Código do Imposto do Selo; not applied above the second band of the young buyers' table). Only applies when primary_home is true; with primary_home false it is ignored
tax_haven_companyNoThe buyer is a company or other entity with its tax domicile in a country, territory or region on the Portuguese list of more favourable tax regimes, or controlled directly or indirectly by such an entity. IMT is then 10 % with no exemption or reduction (CIMT art. 17.º n.º 4), whether or not it is resident, and it overrides non_resident. Never true for an individual (n.º 7)

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changed
    • addedInput schema / properties / buyer_is_young / default
      Added value: +false
    • changedInput schema / properties / buyer_is_young / description
      Previous value: -"The buyer is 35 or under on the date of the deed, is buying their first own permanent home, is not an IRS dependant and has owned no residential property in the previous three years. Applies the reduced IMT table and the stamp duty deduction (art. 7.º-A Código do Imposto do Selo; not applied above the second band of the young buyers' table). Only applies when primary_home is true. Default: false"New value: +"The buyer is 35 or under on the date of the deed, is buying their first own permanent home, is not an IRS dependant and has owned no residential property in the previous three years. Applies the reduced IMT table and the stamp duty deduction (art. 7.º-A Código do Imposto do Selo; not applied above the second band of the young buyers' table). Only applies when primary_home is true; with primary_home false it is ignored"
    • addedInput schema / properties / non_resident / default
      Added value: +false
    • changedInput schema / properties / non_resident / description
      Previous value: -"The buyer is not and has never been tax resident in Portugal. IMT is then a flat rate with no exemption or reduction — no zero band, no young buyers' table, no stamp duty deduction (CIMT art. 17.º n.º 10); the result says what the Tax Authority annuls on request if the buyer becomes tax resident or lets the home at a moderate rent. A buyer who has already been treated as tax resident pays by the tables: leave it false. Default: false"New value: +"The buyer is not and has never been tax resident in Portugal. IMT is then a flat rate with no exemption or reduction — no zero band, no young buyers' table, no stamp duty deduction (CIMT art. 17.º n.º 10); the result says what the Tax Authority annuls on request if the buyer becomes tax resident or lets the home at a moderate rent. A buyer who has already been treated as tax resident pays by the tables: leave it false"
    • addedInput schema / properties / primary_home / default
      Added value: +true
    • changedInput schema / properties / primary_home / description
      Previous value: -"The buyer's own permanent home (habitação própria e permanente). Default: true"New value: +"The buyer's own permanent home (habitação própria e permanente); false for a second home or an investment, which has no zero band"
    • addedInput schema / properties / tax_haven_company / default
      Added value: +false
    • changedInput schema / properties / tax_haven_company / description
      Previous value: -"The buyer is a company or other entity with its tax domicile in a country, territory or region on the Portuguese list of more favourable tax regimes, or controlled directly or indirectly by such an entity. IMT is then 10 % with no exemption or reduction (CIMT art. 17.º n.º 4), whether or not it is resident, and it overrides non_resident. Never true for an individual (n.º 7). Default: false"New value: +"The buyer is a company or other entity with its tax domicile in a country, territory or region on the Portuguese list of more favourable tax regimes, or controlled directly or indirectly by such an entity. IMT is then 10 % with no exemption or reduction (CIMT art. 17.º n.º 4), whether or not it is resident, and it overrides non_resident. Never true for an individual (n.º 7)"
    • addedInput schema / properties / territory / default
      Added value: +"continente"
    • changedInput schema / properties / territory / description
      Previous value: -"Mainland Portugal (continente) or the Azores and Madeira (regioes_autonomas). Default: continente"New value: +"Mainland Portugal (continente) or the Azores and Madeira (regioes_autonomas), which have their own IMT tables"
    • changedInput schema / properties / value / description
      Previous value: -"Purchase price as written in the contract, in euros, e.g. 250000 or 250000.50"New value: +"Purchase price as written in the contract, in euros; a dot or a space may group thousands (250.000)"
    • addedInput schema / properties / value / examples
      Added value: +[
      +  "250000",
      +  "250000.50",
      +  "250.000"
      +]
    • addedInput schema / properties / vpt / examples
      Added value: +[
      +  "180000"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "anyOf": [
      +    {
      +      "properties": {
      +        "annullable": {
      +          "type": [
      +            "object",
      +            "null"
      +          ]
      +        },
      +        "attribution": {
      +          "type": "object"
      +        },
      +        "deed_source": {
      +          "type": "object"
      +        },
      +        "formatted": {
      +          "type": "object"
      +        },
      +        "imt_cents": {
      +          "description": "Euro cents (integer)",
      +          "type": "integer"
      +        },
      +        "imt_regime": {
      +          "description": "Which IMT rule was applied",
      +          "type": "string"
      +        },
      +        "input": {
      +          "type": "object"
      +        },
      +        "notary_estimate_cents": {
      +          "description": "Euro cents: Casa Pronta registration price",
      +          "type": "integer"
      +        },
      +        "notes": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "stamp_duty_cents": {
      +          "description": "Euro cents, after relief",
      +          "type": "integer"
      +        },
      +        "stamp_duty_relief_cents": {
      +          "description": "Euro cents (integer)",
      +          "type": "integer"
      +        },
      +        "taxable_base": {
      +          "type": "string"
      +        },
      +        "taxable_value_cents": {
      +          "description": "Euro cents: the higher of price and VPT",
      +          "type": "integer"
      +        },
      +        "total_cents": {
      +          "description": "Euro cents on top of the price",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "input",
      +        "imt_regime",
      +        "annullable",
      +        "taxable_value_cents",
      +        "taxable_base",
      +        "imt_cents",
      +        "stamp_duty_cents",
      +        "stamp_duty_relief_cents",
      +        "notary_estimate_cents",
      +        "total_cents",
      +        "formatted",
      +        "notes",
      +        "attribution",
      +        "deed_source"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "properties": {
      +        "error": {
      +          "type": "string"
      +        },
      +        "field": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "message": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "error",
      +        "message"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Success, or a refusal with an error code. Units: *_cents euro cents, *_eur euros, *_eur_m2 euros per m², *_pct and percent in percent.",
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / non_resident
      Added value: +{
      +  "description": "The buyer is not and has never been tax resident in Portugal. IMT is then a flat rate with no exemption or reduction — no zero band, no young buyers' table, no stamp duty deduction (CIMT art. 17.º n.º 10); the result says what the Tax Authority annuls on request if the buyer becomes tax resident or lets the home at a moderate rent. A buyer who has already been treated as tax resident pays by the tables: leave it false. Default: false",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / tax_haven_company
      Added value: +{
      +  "description": "The buyer is a company or other entity with its tax domicile in a country, territory or region on the Portuguese list of more favourable tax regimes, or controlled directly or indirectly by such an entity. IMT is then 10 % with no exemption or reduction (CIMT art. 17.º n.º 4), whether or not it is resident, and it overrides non_resident. Never true for an individual (n.º 7). Default: false",
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / value / description
      Previous value: -"Property price in euros, e.g. 250000 or 250000.50"New value: +"Purchase price as written in the contract, in euros, e.g. 250000 or 250000.50"
    • addedInput schema / properties / vpt
      Added value: +{
      +  "description": "Optional. The VPT (valor patrimonial tributário) from the caderneta predial, in euros. IMT and stamp duty are charged on the higher of the price and the VPT (CIMT art. 12.º n.º 1), so pass it when it is known",
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / buyer_is_young / description
      Previous value: -"The buyer is 35 or under and this is their first home. Only applies when primary_home is true. Default: false"New value: +"The buyer is 35 or under on the date of the deed, is buying their first own permanent home, is not an IRS dependant and has owned no residential property in the previous three years. Applies the reduced IMT table and the stamp duty deduction (art. 7.º-A Código do Imposto do Selo; not applied above the second band of the young buyers' table). Only applies when primary_home is true. Default: false"
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare the tool is read-only, idempotent, non-destructive, and closed-world. The description adds important behavioral context beyond annotations: taxes are charged on the higher of `value` and `vpt`, `buyer_is_young` applies only with `primary_home`, and the result explains what the Tax Authority annuls later for non-residents.

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 description is dense but front-loaded and each sentence carries useful information. It could be slightly more scannable, but it avoids filler and prioritizes the most important usage constraints.

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?

Given the rich input schema, output schema, and annotations, the description covers the essential context: purpose, exclusions, precedence rules, and special conditions. Nothing critical for correct invocation is missing.

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 documents each parameter. The description adds cross-parameter semantics that the schema does not fully capture: the precedence of `tax_haven_company` over `non_resident`, the condition that `buyer_is_young` only applies when `primary_home` is true, and the rule that both taxes are charged on the higher of `value` and `vpt`.

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: calculate IMT, stamp duty, and Casa Pronta registration for a Portuguese home purchase using 2026 tables. It explicitly distinguishes itself from sibling tools `imi_annual_cost` and `glossary_lookup`.

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?

Gives explicit when-to-use guidance ('when asked what a home purchase in Portugal costs on top of the price') and when-not-to-use alternatives ('Do not use it for the yearly property tax ... or to define a term such as VPT'). It also explains key decision rules like `tax_haven_company` taking precedence over `non_resident`.

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