Skip to main content
Glama

getPromocodes

Read-only

List promocodes. Omit locationRef and couponRef to list promocodes across all locations, or provide one to scope to a location or a coupon. Call getLocations to list locations, or getLocation to fetch one by locationId. Get couponRef from getCoupons.

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": "getPromocodes"
  }
}

Input Schema

NameRequiredDescriptionDefault
couponRefNoUUID of the coupon whose promocodes to list.
locationRefNoUUID of the location whose promocodes to list. Omit with couponRef to list promocodes across every location of the network.

Output Schema

NameRequiredDescriptionDefault
promocodesYes
nextPageTokenNoPass it back as nextPageToken, with the same filters, to get the next page. Absent on the last page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds the useful filter-combination behavior, but leaves the edge case ambiguous: it says "provide one," yet never says what happens if both refs are supplied. It also says nothing about result size, limits, or pagination.

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?

Three short sentences, front-loaded with the core action and the scoping rule, with no filler. Slight redundancy exists: the closing sentence of the schema's locationRef description restates the "omit to list across every location" rule already in the prose.

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?

With only two optional parameters, an output schema present, and annotations covering the safety profile, the description is nearly self-sufficient. The remaining gap is the both-refs-provided case and any limit/pagination expectations, which an agent would otherwise have to discover by calling.

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?

Schema description coverage is 100%, so the schema already defines both UUID parameters and their formats, making 3 the baseline. The description earns above baseline by explaining how to source each identifier (couponRef from getCoupons, locationRef from getLocations/getLocation), which is operational meaning the schema does not carry.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"List promocodes" gives a specific verb and resource, and the description immediately states the scoping semantics (all locations vs. a location vs. a coupon). It is clearly distinct from getCoupons and the getLocation/getLocations helpers, though it never explicitly contrasts itself with a single-promocode fetch.

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

Usage Guidelines5/5

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

It states exactly how to select scope ("Omit locationRef and couponRef to list promocodes across all locations, or provide one to scope to a location or a coupon") and routes the agent to the right prerequisite tools for obtaining each reference. That is explicit when-to-use plus concrete alternatives for the caller's next step.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources