Skip to main content
Glama

Create discount

loyverse_create_discount

Create a new discount in your Loyverse store. Send discount fields per the API; if a 400 error occurs, adjust fields and retry.

Instructions

Create a new discount in Loyverse (POST /discounts). 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
bodyYesThe discount fields, per the Loyverse API schema.
Behavior2/5

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

No annotations are provided, so the description bears full responsibility. It discloses error behavior for 400 responses and references the API docs, but lacks information on success responses, idempotency, permissions, or other mutation consequences beyond the error case.

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 concise sentences. The first sentence fronts the purpose, the second adds error handling detail. Every word earns its place with no redundancy.

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

Completeness3/5

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

Given the complexity (nested body parameter, no output schema, no annotations), the description covers the basic action and error handling but omits the success response format, making it less complete for an agent to fully understand the tool's output.

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?

The single parameter 'body' is described as containing discount fields per the Loyverse API schema. Schema coverage is 100%, so baseline is 3. The description adds value by directing to external docs but does not explain the internal structure of the body object, which is a nested object with additional properties.

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 action ('Create a new discount'), the resource ('discount'), and the HTTP method (POST /discounts). It effectively distinguishes from sibling tools that create different resources (e.g., categories, customers).

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 provides error handling guidance (retry on 400 with field adjustments) but does not explicitly state when to use this tool versus alternatives like update or delete discounts, or when not to use it.

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