Skip to main content
Glama

Stays overlapping a month (pro-rata)

stays_in_month

Calculate pro-rated nights and revenue for bookings overlapping a month, totalled per property, portal and entity to verify Smoobu Analytics data.

Instructions

Every booking overlapping the month with nights inside the month and pro-rated revenue, totalled per property, per portal and per entity. Reproduces Smoobu Analytics' convention so the extraction can be verified without reading the screen.

Input Schema

NameRequiredDescriptionDefault
monthYesCalendar month, YYYY-MM.
entityNoRestrict to one EOM entity (KALAWALA, NAMAITAMI, RIBHOLDING, DELFINES, PERLA).
companyNoRestrict to one fiscal company / bsides account (AO_DIMME, XELION, PERLA).
include_rowsNoReturn the per-booking rows in addition to the per-property / per-portal totals.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries full disclosure burden. It does convey real behavior beyond the schema: pro-rata revenue treatment, night-overlap logic, and the three aggregation axes. But it says nothing about read-only nature, permissions, pagination, or how an empty month is handled.

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?

Two sentences, front-loaded with the core computation and aggregation grain. The verification rationale in the second sentence is slightly self-referential but does justify the tool's existence, so little is wasted.

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?

For a read-oriented analytics tool with no output schema and full schema coverage on inputs, the description supplies the essential missing piece: what the result contains (rows plus per-property/portal/entity totals). Pagination and exact return shape remain unstated, but that is a minor gap given the tool's reporting nature.

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 all four parameters documented including enum values, so the baseline is 3. The description's mention of totals 'per property, per portal and per entity' loosely maps to the entity/company filters and include_rows, but adds no syntax or format detail beyond the schema.

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 computation (bookings overlapping the month, nights inside the month, pro-rated revenue) and its aggregation grain (per property, per portal, per entity). This clearly distinguishes it from siblings like get_bookings and get_booking, which return raw bookings rather than month-overlap analytics.

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?

The second sentence hints at a use case (reproducing Smoobu Analytics' convention so results can be verified), which implies when this tool is relevant. However, it never explicitly contrasts this with get_bookings or states when NOT to use it, leaving the agent to infer the choice.

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