Skip to main content
Glama

Update discount

loyverse_update_discount

Update a discount by providing its ID and all required fields in a POST request. Include the complete data to replace the existing record.

Instructions

Update an existing discount (POST /discounts with "id" set — Loyverse uses the same create endpoint for updates when "id" is present in the body). This is not a partial patch: include all required fields for this resource, not just the ones changing, or Loyverse will reject the request. Field names follow the Loyverse API v1.0 (developer.loyverse.com/docs). If a call fails with a 400, the error message from Loyverse is returned verbatim — adjust the fields and retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe discount id.
bodyYesFull set of fields for the discount (required fields included, not just the ones changing).
Behavior5/5

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

Discloses that the update uses a POST endpoint with id in the body, requires full resource representation, and that error messages are returned verbatim. No annotations provided, so description fully covers behavioral traits.

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?

Three sentences, each adding distinct value: endpoint behavior, full resource requirement, error handling. No unnecessary words, front-loaded with purpose.

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?

Covers key behaviors (update mechanism, full fields, errors). Lacks description of success response, but given no output schema, this is a minor gap. Otherwise complete for a mutation tool.

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

Parameters5/5

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

Schema coverage is 100%, and description adds critical context: body parameter must include full set of fields, not just changes. This clarifies usage beyond the schema to prevent partial patch mistakes.

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 'Update an existing discount' and explains the HTTP method and endpoint behavior, distinguishing it from create and delete tools.

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?

Provides explicit guidance: use when updating an existing discount, warns that it is not a partial patch, and instructs to include all required fields. Also advises retrying on 400 errors after adjusting fields.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ogarciabrena/mcploy'

If you have feedback or need assistance with the MCP directory API, please join our Discord server