Skip to main content
Glama

rulecart_add

Create a shopping cart discount or promotion rule with configurable discount amount, type, voucher code, usage limits, and validity period.

Instructions

Create a shopping cart rule (discount / promotion).

Parameters

data : JSON object describing the cart rule. Key fields: - name (string) rule name - discount (float) discount amount or percentage - type (string) "fixed" | "percent" - code (string) voucher code (leave empty for auto-apply) - dateFrom (YYYY-MM-DD) start date (optional) - dateTo (YYYY-MM-DD) end date (optional) - usesPerCode (int) maximum total uses (0 = unlimited) - usesPerCustomer (int) maximum uses per customer (0 = unlimited) - enabled (0 or 1)

Example

'{"name": "Spring Sale 10%", "discount": 10, "type": "percent", "code": "SPRING10", "enabled": 1, "usesPerCode": 100}'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It indicates this is a creation/mutation operation and lists parameters and an example. However, it does not mention idempotency, error handling, authentication needs, or side effects like overwriting existing rules. This is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with a clear header, bulleted parameter list, and example. It is moderately concise; every sentence adds value. The example takes some space but is useful. Could be slightly tightened, but overall efficient.

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 tool creating a cart rule with many fields, the description thoroughly documents the data structure. The presence of an output schema (not shown but indicated) covers return values. Missing are error scenarios or post-creation behavior, but the description is sufficient for typical use.

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?

The input schema has only a single 'data' parameter of type string with 0% description coverage. The description fully compensates by detailing the expected JSON structure, including all key fields, their types, optionality, and an example. This adds critical meaning beyond the schema.

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 starts with 'Create a shopping cart rule (discount / promotion)', which clearly states the action (create) and the resource (shopping cart rule). It distinguishes itself from sibling creation tools like product_create or category_create by being specific to cart rules.

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 does not explicitly state when to use this tool or when to avoid it. It provides parameter details but lacks guidance on alternatives or exclusions. The usage is implied as 'when you need to create a discount rule', but no explicit context is given.

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/florinel-chis/gomag-mcp'

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