Skip to main content
Glama
Shopify Admin MCP Server

Shopify Admin MCP Server

get_code_discounts

List code-based discounts that require customers to enter a promo code at checkout, with optional search and pagination for finding specific promotions.

Instructions

List only code-based discounts (requires customer to enter a code at checkout).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_code_discounts"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNo
firstNo
queryNoSearch query to filter code discounts

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.5

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. 'List' implies a read-only operation and the filter criterion is clear, but pagination behavior, permissions, response shape, and rate limits are not described. For a list endpoint with an 'after' cursor and 'first' page-size parameter, these are meaningful omissions.

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 a single front-loaded sentence that immediately states the operation and resource. The parenthetical is short and earns its place by distinguishing code-based discounts from other discount types, with no wasted wording.

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?

For a low-complexity list tool, the purpose and discount-type filter are adequately conveyed. However, with no annotations, no output schema, and incomplete parameter documentation, the description leaves pagination and return behavior opaque for an agent trying to invoke it correctly.

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

Parameters2/5

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

Schema description coverage is only 33%: the 'query' parameter is documented in the schema, while 'after' and 'first' have limited or no explanatory descriptions. The tool description adds no parameter meaning at all, so it does not compensate for the low schema coverage.

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 states a specific verb and resource: 'List only code-based discounts.' The parenthetical adds a clear semantic scope that distinguishes it from automatic discounts, and by extension from the general discounts sibling. An agent can identify what this tool returns without opening the schema.

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 phrase 'only code-based discounts' tells the agent when this tool is appropriate versus automatic discount listing, and the checkout-code requirement clarifies the data domain. It does not explicitly name alternatives or state when not to use it, but the usage condition is clear from the description.

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