Skip to main content
Glama

cart_rule_create

Create a cart rule by specifying kind, target, conditions, and result. Conditions define criteria with comparator and value; result sets the discount field and value.

Instructions

Create a cart rule (POST /admin/api/ecommerce/v1/cart_rules). Envelope {cart_rule: {...}}. Required: kind, target_kind, target_id, conditions[], result{}. Inner conditions[] entries are {value, comparator, field, value_type}. result is {value, field, value_type}. Inner key validation is left to Voog — invalid combos return a 422 with the offending field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYes
kindYes
target_kindYes
target_idYes
conditionsYes
resultYes
enabledNo
positionNo
valid_fromNo
valid_toNo
Behavior3/5

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

Annotations already indicate non-read-only, non-destructive, non-idempotent behavior. The description adds error handling details (422 with offending field) but does not elaborate on other side effects, permissions, or rate limits.

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 sentences, front-loaded with purpose and endpoint, then concise details on nested structures and error handling. No wasted words.

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?

Despite good coverage of required fields and nested structures, the description omits explanation of optional parameters and return value. Given the complexity (10 params, nested objects, no output schema), it is not fully complete.

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

Parameters4/5

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

With 0% schema coverage, the description adds significant meaning by explaining the structure of nested objects (conditions and result). It covers all required parameters but omits optional fields like site, enabled, position, valid_from, valid_to.

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 it creates a cart rule, provides the HTTP method and endpoint, and lists required fields. It is distinct from sibling tools like cart_rule_update and cart_rule_delete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies creation use, but does not explicitly contrast with alternatives such as update or provide prerequisites like existence of referenced entities. It mentions required fields but lacks guidance on when to avoid use.

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/runnel/voog-mcp'

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