Skip to main content
Glama
felipebasurto

viajante

Split stay costs

split_stay_costs
Read-onlyIdempotent

Split each stay's total among the people who sleep there, adding any per-person-night fee and allocating cents so each stay sums exactly.

Instructions

Local: split each stay's total among the people who sleep there.

stays are {name, check_in, check_out, total}; roster is as for plan_stay_blocks. A stay's rate is its total over the person-nights the roster puts inside it, so someone who never sleeps there pays nothing toward it. currency is named by the caller and never converted. fee_per_person_night is a per-night charge the caller names (a city tax) added per person. Cents are allocated so each stay sums exactly. Nights no stay covers come back as unallocated_nights. Arithmetic only: it does not price or recommend a stay.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
staysYes
rosterYes
currencyYes
fee_per_person_nightNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusYes
empty_noteYes
error_codeYes
observed_atYes
retry_afterYes
completenessYes
empty_reasonYes
observed_at_basisYes
retry_after_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.5.2
    • removedInput schema / properties / currency / title
      Removed value: -"Currency"
    • removedInput schema / properties / fee_per_person_night / title
      Removed value: -"Fee Per Person Night"
    • removedInput schema / properties / roster / title
      Removed value: -"Roster"
    • removedInput schema / properties / stays / title
      Removed value: -"Stays"
    • removedInput schema / title
      Removed value: -"split_stay_costsArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "completeness": {
      +      "enum": [
      +        "complete",
      +        "partial",
      +        "blocked"
      +      ],
      +      "type": "string"
      +    },
      +    "empty_note": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "empty_reason": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "provider_empty",
      +            "filtered_out",
      +            "not_loaded"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "error_code": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "observed_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "observed_at_basis": {
      +      "anyOf": [
      +        {
      +          "enum": [
      +            "provider",
      +            "fetch"
      +          ],
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "retry_after": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "retry_after_seconds": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "enum": [
      +        "ok",
      +        "no_results",
      +        "rate_limited",
      +        "blocked",
      +        "timeout",
      +        "failed"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "completeness",
      +    "empty_reason",
      +    "empty_note",
      +    "error_code",
      +    "retry_after",
      +    "retry_after_seconds",
      +    "observed_at",
      +    "observed_at_basis"
      +  ],
      +  "type": "object"
      +}
  2. Addedv1.4.1

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 (readOnly, idempotent, non-destructive), so the bar is lower, and the description still adds real behavioral content: cents are allocated so each stay sums exactly, uncovered nights surface as unallocated_nights, currency is never converted, and fee_per_person_night is applied per person. That is meaningful disclosure about rounding and output beyond the annotations.

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 core action is front-loaded in the first clause, and the remaining sentences each carry distinct semantics (rate derivation, currency, fee, rounding, unallocated nights). It is dense but nothing is obviously redundant.

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?

An output schema exists, so return values needn't be spelled out, yet the description usefully explains the unallocated_nights concept and the exact-sum rounding guarantee. The only real gap is the roster structure, which is delegated to a sibling rather than described for a tool with nested-object inputs.

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%, so the description carries the full load. It documents the stays shape ({name, check_in, check_out, total}), the currency semantics, and what fee_per_person_night does, but it defers the roster format entirely to plan_stay_blocks rather than describing it. Three of four parameters are partially covered; the fourth is only referenced.

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 and resource ('split each stay's total among the people who sleep there') and marks it as 'Local' arithmetic, which separates it from the search/booking siblings. It also ties itself to plan_stay_blocks via the roster reference. It stops short of a full sibling differentiation (e.g., when to choose this over plan_stay_blocks).

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 implied rather than stated: 'roster is as for plan_stay_blocks' signals it follows that tool in a workflow, and 'Arithmetic only: it does not price or recommend a stay' functions as a when-not boundary. But no alternative is named for the case where the agent wants pricing or recommendations, so the guidance is only partially explicit.

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