Skip to main content
Glama

create_discount

Create a discount; it comes out of the operator's payout, never out of the platform commission. Returns the stored discount.

Input Schema

NameRequiredDescriptionDefault
codeNoThe code guests type; required unless trigger is pay_in_full.
stay_toNoLatest check-in it covers, YYYY-MM-DD.
triggerNo`code` (default) or `pay_in_full`, a percentage taken when the guest pays everything at once.
boat_idsNo
currencyNoEUR or USD: the currency a fixed amount is in.
end_dateNoLast day it can be booked, YYYY-MM-DD.
max_usesNo
all_boatsNofalse limits it to `boat_ids`.
stay_fromNoEarliest check-in it covers, YYYY-MM-DD.
auto_applyNotrue applies it without a code.
company_idYesCompany id, from list_boats (`company_id`) or get_company.
start_dateNoFirst day it can be booked, YYYY-MM-DD.
descriptionNoShown to the guest.
discount_typeYes`percentage` or `fixed`.
discount_valueYesThe percent, or for fixed the amount in `currency` (EUR when omitted).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / currency / description
      Added value: +"EUR or USD: the currency a fixed amount is in."
    • changedInput schema / properties / discount_value / description
      Previous value: -"The percent, or the EUR amount for fixed."New value: +"The percent, or for fixed the amount in `currency` (EUR when omitted)."
  2. Added

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only carry the generic safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=false). The description adds genuinely non-obvious behavioral context: the discount is charged against the operator's payout rather than the platform commission, and it discloses the return ("the stored discount"). It still omits auth/validation requirements, keeping it short of a 5.

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?

Two compact clauses with the action and the key financial constraint front-loaded, plus a brief return note. No filler; every sentence earns its place.

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 15-parameter mutation tool with no output schema, the description covers the risky/ambiguous part an agent most needs (who bears the cost) and states the return shape. It lacks prerequisite/auth context and any reference to the update/delete counterparts, but the schema carries the field-level burden.

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 87%, so the schema already documents nearly all 15 parameters, including the code-vs-pay_in_full trigger rule and currency defaults. The description adds no parameter-level detail beyond an indirect hint about how discount_value financially lands, so baseline 3 applies.

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 ("Create a discount") and adds the crucial business framing that the discount is deducted from the operator's payout, not the platform commission. This is more informative than a bare CRUD restatement, though it never explicitly distinguishes itself from update_discount/delete_discount siblings.

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?

No guidance on when to create a discount versus updating one, no prerequisites (permissions, existing company), and no routing to list_discounts/update_discount. The schema hints at trigger semantics but the description offers no usage 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.