Skip to main content
Glama

calculate_sales_tax

Read-onlyIdempotent

Sales tax calculator with US state base-rate lookup (local rates excluded) — add or extract tax

Input Schema

NameRequiredDescriptionDefault
zipNoUS ZIP code (5 digits or ZIP+4). Used to find the STATE. The rate is filled in only where it is exact: 0% for DE, NH and OR, or the state rate for states with no local add-on in the Tax Foundation midyear 2026 table. For any other state no rate is guessed (a ZIP can cross city, county and district lines): the response's zip.message says so, and you send taxPercent or state. Response adds 'zip' with the state, status, message, source and the state's official lookup page where one was verified.
modeNo
itemsNoSeveral items (mode add only). Response adds 'cart' with taxable and exempt subtotals, tax, total, steps and lines.
stateNoUS state (two-letter code such as TX, or the full name; DC included). Looks up the STATE base sales tax rate only (Tax Foundation, 1 July 2026). Local city, county and district rates are not included.
amountNoAmount to tax (or the tax-inclusive amount in extract mode). Required unless items is sent.
shippingNoWith items: shipping charged.
taxPercentNoTax rate in percent. Required unless state or an exact zip is sent. Takes priority over state.
discountPctNoWith items: percentage discount on every line.
shippingTaxableNoWith items: true adds shipping to the taxable amount. Default false (rules differ by state, so you choose).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / amount / description
      Added value: +"Amount to tax (or the tax-inclusive amount in extract mode). Required unless items is sent."
    • addedInput schema / properties / discountPct
      Added value: +{
      +  "description": "With items: percentage discount on every line.",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / items
      Added value: +{
      +  "description": "Several items (mode add only). Response adds 'cart' with taxable and exempt subtotals, tax, total, steps and lines.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "name": {
      +        "type": "string"
      +      },
      +      "price": {
      +        "minimum": 0,
      +        "type": "number"
      +      },
      +      "qty": {
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "taxable": {
      +        "description": "Default true. false marks the item exempt.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "price"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / shipping
      Added value: +{
      +  "description": "With items: shipping charged.",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / shippingTaxable
      Added value: +{
      +  "description": "With items: true adds shipping to the taxable amount. Default false (rules differ by state, so you choose).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / taxPercent / description
      Previous value: -"Tax rate in percent. Required unless state is sent. Takes priority over state."New value: +"Tax rate in percent. Required unless state or an exact zip is sent. Takes priority over state."
    • addedInput schema / properties / zip
      Added value: +{
      +  "description": "US ZIP code (5 digits or ZIP+4). Used to find the STATE. The rate is filled in only where it is exact: 0% for DE, NH and OR, or the state rate for states with no local add-on in the Tax Foundation midyear 2026 table. For any other state no rate is guessed (a ZIP can cross city, county and district lines): the response's zip.message says so, and you send taxPercent or state. Response adds 'zip' with the state, status, message, source and the state's official lookup page where one was verified.",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "amount"
      -]
  2. Changed3 schema fields changed
    • addedInput schema / properties / state
      Added value: +{
      +  "description": "US state (two-letter code such as TX, or the full name; DC included). Looks up the STATE base sales tax rate only (Tax Foundation, 1 July 2026). Local city, county and district rates are not included.",
      +  "type": "string"
      +}
    • addedInput schema / properties / taxPercent / description
      Added value: +"Tax rate in percent. Required unless state is sent. Takes priority over state."
    • changedInput schema / required
      Previous value: -[
      -  "amount",
      -  "taxPercent"
      -]New value: +[
      +  "amount"
      +]
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The description adds crucial functional constraints that are not entirely obvious from the annotations or schema. Specifically, stating 'local rates excluded' and detailing that it uses 'US state base-rate lookup' provides key operational context beyond the safety hints.

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?

The description is a concise, well-structured single sentence that immediately identifies the tool's function, scope, and primary modes of operation.

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?

Given the complexity of sales tax laws, defining the scope (state base rate only) and the operational boundaries (add/extract) makes this definition highly functional. It is complete enough for the agent to proceed with calling the tool given the detailed input schema.

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?

The description provides valuable context for the tool's output logic, particularly regarding the `zip` parameter. It explains that the rate is not always deterministic (e.g., 0% for DE, NH, OR) and addresses potential failure modes, adding meaning beyond the schema's structural definition.

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 clearly states the tool is a 'Sales tax calculator' performing 'add or extract tax.' It successfully defines the scope by explicitly noting that 'local rates [are] excluded,' which aids in differentiating it from a comprehensive tax calculation engine.

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

Usage Guidelines2/5

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

The description offers minimal guidance on when this tool should be preferred over alternatives. It does not advise the user on scenarios that would require a different sibling tool (e.g., a full tax converter vs. a base rate lookup).

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