Skip to main content
Glama

Create or update discount

loyverse_upsert_discount
Idempotent

Create a discount or update an existing one by its ID, setting the discount type, amount or percent, and store availability for Loyverse POS.

Instructions

Create a discount, or update one by passing its id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoOmit to create.
nameYes
typeYes
storesNo
discount_amountNoFor the amount types.
discount_percentNoFor the percent types.
restricted_accessNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already cover read-only behavior (readOnlyHint=false), idempotency, and non-destructiveness, and the description does not contradict them. The description does add the behavioral distinction between create and update based on id presence. However, it does not disclose side effects like partial overwrite behavior or response shape beyond annotation coverage.

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 one short, front-loaded sentence with no filler or repetition. It directly conveys the essential create/update behavior without wasting tokens.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter upsert tool with no output schema, the description is too sparse. It does not clarify required-value relationships (e.g., which amount/percent fields align with each type), what stores means, or what happens on an update when fields are omitted. The annotations provide some safety context, but the description alone leaves several important usage gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 43%, with name, type, stores, and restricted_access lacking full schema descriptions. The description only reinforces the id semantics ('passing its id') already present in the schema's 'Omit to create' note. It does not compensate for the undocumented parameters or explain how type, discount_amount, and discount_percent interact.

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?

The description clearly states the operation: 'Create a discount, or update one by passing its name' and names the target resource. It distinguishes this from the sibling list/get/upsert tools by specifying the discount resource and the create/update behavior. There is no ambiguity about the tool's core purpose.

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 description gives an actionable rule: create by omitting the id, update by passing the id. It does not explicitly mention alternatives or exclusions, such as using list_discounts to retrieve existing IDs before updating. The create/update condition is clear, but sibling comparison guidance is absent.

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