Skip to main content
Glama

shopify_create_price_rule

Create a Shopify price rule to set up a targeted discount code for a customer segment, with percentage or fixed amount values and optional usage limits.

Instructions

Create a Shopify price rule (the engine behind a discount code). Use to roll out a targeted promotion for a segment after tagging.

Args:
    title (required): Internal price-rule title.
    value_type (required): One of: percentage, fixed_amount.
    value (required): Discount value as a string (e.g. '-15' for 15% off, '-10.00' for $10 off).
    starts_at: ISO-8601 start datetime (defaults to now).
    ends_at: ISO-8601 end datetime (omit for open-ended).
    usage_limit: Maximum total uses across all customers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
value_typeNo
valueNo
starts_atNo
ends_atNo
usage_limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries full burden. It describes the tool as creating a price rule that is the 'engine behind a discount code,' which gives some behavioral insight (not the complete discount creation). However, it does not disclose mutability, side effects (e.g., auto-linking to discount codes), required permissions, or rate limits. The 'after tagging' hint adds context but not enough for a higher score.

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 extremely concise: one sentence for purpose, one sentence for usage context, then a bulleted parameter list. Front-loaded with the core action. Every sentence adds value; no wasted words. The structure is clean and scannable.

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?

Given the tool has 6 parameters with specific formats (ISO-8601, value string) and an output schema exists (reducing need for return description), the description provides adequate coverage. It explains the creation context (after tagging) and parameter defaults. Missing: any note on prerequisites beyond tagging, or that price rules are part of discount code creation in Shopify, but overall sufficient for typical use.

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?

The input schema has 0% description coverage, so the description entirely compensates. The Args section explains all six parameters: title (internal title), value_type (enum: percentage/fixed_amount), value (format with examples like '-15'), starts_at (defaults to now), ends_at (omittable), usage_limit (max uses). This adds significant meaning beyond the schema's bare types. Minor lack of example for usage_limit holds back a 5.

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 tool's function: 'Create a Shopify price rule (the engine behind a discount code).' It specifies a verb (Create), a resource (Shopify price rule), and provides a parenthetical explanation linking to discount codes. Among sibling tools, it is distinct from list/discount/refund tools, making purpose unambiguous.

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 gives explicit usage context: 'Use to roll out a targeted promotion for a segment after tagging.' This indicates when to use (after tagging customers) and suggests a prerequisite (tagging via sibling tool shopify_tag_customers_bulk). However, it does not explicitly state when NOT to use or mention alternatives like shopify_list_discounts for existing rules, missing the 'when-not' guidance for a perfect score.

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/RPasquale/lightbulb-mcp'

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