Skip to main content
Glama

Calculate FEIE physical-presence days

calculate_feie_days
Read-only

Apply the US Foreign Earned Income Exclusion physical-presence day-count method to travel entries, including the best rolling 12-month window. This is the tax-specific calculation, not the general by-country travel summary in count_travel_days. Each entry is arrival|departure|type, where type is us, other or transit; transit under 24 hours counts zero.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entries": "<entries>"
    },
    "name": "calculate_feie_days"
  }
}

Input Schema

NameRequiredDescriptionDefault
entriesYesTrips as YYYY-MM-DD|YYYY-MM-DD|us, |other or |transit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare a safe read (readOnlyHint=true, openWorldHint=false), and the description adds a non-obvious domain rule that transit under 24 hours counts as zero, which materially changes computed output. It does not say what the result contains (per-day counts, residency determination, window range), leaving some behavioral surface unstated given there is no output schema.

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?

Three short sentences, front-loaded with what the tool does before the sibling comparison and format rule. The entry-format sentence partially duplicates the schema's parameter description, which is the only wasted material.

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?

A single-parameter, read-only calculation tool whose schema is fully described; the description covers purpose, alternative, and the key transit rule. The main remaining gap is that with no output schema, the shape of the result (days counted vs. qualifying window vs. eligibility) is never hinted at.

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 baseline is 3, but the description goes beyond the schema by spelling out the positional pipe-delimited format and the allowed type values, and by attaching a rule to the 'transit' value. That adds genuine meaning about how to encode input rather than restating field names.

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 domain resource: applying the US FEIE physical-presence day-count method to travel entries, plus the extra deliverable of the best rolling 12-month window. It explicitly contrasts itself with count_travel_days, so an agent can pick between the two without opening either schema.

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?

Names the alternative tool (count_travel_days) and the condition that selects this one instead: tax-specific FEIE day counting rather than a general by-country travel summary. That is an explicit use/avoid rule rather than inferred context.

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.