Skip to main content
Glama
hostinger

hostinger-api-mcp

Official
by hostinger

ecommerce_createADiscountV1

Create a discount for a store by specifying code, type, and value. Supports percentage, fixed, and free-shipping discounts, with optional validity period, usage limits, and minimum cart value.

Instructions

Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe discount code customers enter at checkout.
nameNoA human-friendly discount name.
typeYesThe discount type.
valueYesFor percentage discounts a whole number 1-100; for fixed discounts an amount in the smallest currency unit (e.g. $10 is 1000). Ignored for free_shipping.
ends_atNoWhen the discount expires. A bare date runs to the end of that day in time_zone. Never expires when omitted.
store_idYesThe ID of the store to create the discount for.
starts_atNoWhen the discount becomes active. A bare date (2026-11-27) anchors to time_zone. Defaults to now when omitted.
time_zoneNoIANA time zone used to interpret starts_at and ends_at.
allocationNoWhether the discount applies to the cart total or to each eligible item.
usage_limitNoMaximum number of times the discount can be redeemed.
min_cart_valueNoMinimum cart value in the smallest currency unit required for the discount to apply.
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explains value semantics (smallest currency unit, 1-100 range, free_shipping ignoring value) and that it returns the created discount. However, it omits side effects, permission requirements, duplicate-code behavior, or idempotency, which a create operation should ideally disclose.

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 three sentences with no fluff. It front-loads the core purpose, then explains value semantics, and ends with the return behavior. Every sentence contributes essential information, making it optimally concise.

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 11 parameters and full schema coverage, the description covers the core operation but lacks contextual prerequisites such as requiring a valid store_id or unique discount code. It also does not mention error scenarios or validation behavior, leaving some gaps for a create tool without annotation support.

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 input schema has 100% coverage, so the description adds no new parameter information beyond what the schema already states. The description repeats the value rules verbatim from the schema and provides no additional semantic insight, so it sits at the baseline for a fully documented schema.

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?

The description states a specific verb ('Create') and resource ('a discount for a store'), with additional detail on discount types and value units. It clearly identifies the action, though it does not explicitly differentiate from sibling tools like ecommerce_listDiscountsV1 beyond the obvious create-vs-list distinction.

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 implies usage (create when you need a new discount) but does not mention any alternatives or conditions for choosing this tool over others. There is no explicit 'when not to use' or reference to a sibling creation tool, leaving the usage context mostly implicit.

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/hostinger/api-mcp-server'

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