Skip to main content
Glama

shopify_create_price_rule

DestructiveIdempotent

Create a Shopify price rule to power discount codes, enabling targeted promotions for customer segments after tagging. Set percentage or fixed amount discounts, schedule start/end dates, and limit total uses.

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.
    project_id: Authenticated Project UUID.
    project_ref: Exact project correlation reference.
    connector_account_ref: Project-bound connector account alias.
    idempotency_key: Stable business-action identity.
    effect: Claimed read or write effect; Spring verifies it.
    approval_ref: Approved platform task UUID when resuming a write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
valueNo
effectNo
ends_atNo
starts_atNo
project_idNo
value_typeNo
project_refNo
usage_limitNo
approval_refNo
idempotency_keyNo
connector_account_refNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.1
    • addedInput schema / properties / approval_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Approval Ref"
      +}
    • addedInput schema / properties / connector_account_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Connector Account Ref"
      +}
    • addedInput schema / properties / effect
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Effect"
      +}
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Idempotency Key"
      +}
    • addedInput schema / properties / project_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Id"
      +}
    • addedInput schema / properties / project_ref
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project Ref"
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already signal read/write behavior, open-world effects, idempotency, and destructive potential. The description adds conceptual context but does not disclose additional behavioral details such as what side effects occur in Shopify, whether existing rules are replaced, or approval/verification nuances beyond the parameter notes. No contradiction with annotations.

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 front-loaded with a single clear purpose sentence, then uses a structured Args list. Despite the large number of parameters, every entry is informative and there is no filler or repetition of schema-only information. The structure makes the long parameter list 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?

For a 12-parameter creation tool with an output schema, the description is nearly complete: it documents all parameters, gives examples, and flags approval and effect semantics. It does not discuss error cases, return behavior, or alternative tool routing, but those are not critical given the output schema and strong parameter documentation.

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?

Schema description coverage is 0%, but the description compensates thoroughly by documenting all 12 parameters. It explains required fields, value_type allowed values, value format with examples, defaults for starts_at, open-ended behavior for ends_at, and the roles of project_ref, idempotency_key, effect, and approval_ref. This far exceeds what the bare schema provides.

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 uses a specific verb and resource: 'Create a Shopify price rule', and explains that it is 'the engine behind a discount code'. It also frames the intended outcome ('roll out a targeted promotion for a segment after tagging'), which makes the tool's purpose immediately clear and distinct from the many other shopify_create_* tools.

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 a clear usage context: 'Use to roll out a targeted promotion for a segment after tagging.' It does not explicitly name alternatives or state when not to use this tool, so it stops short of full routing guidance, but the context is specific enough for an agent to understand the intended scenario.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools