Skip to main content
Glama

list_promo_codes

Read-onlyIdempotent

Retrieve discount codes by exact code, active status, or campaign pool. Verify whether a customer-quoted code exists and remains valid.

Instructions

List discount codes. READ-ONLY - nothing here creates or revokes one.

    THERE ARE THOUSANDS. This organization has over 13,000 promo codes; do not try
    to read them all. `total` answers "how many" on its own, and the filters below
    answer nearly every real question without paging at all.

    `filter_code` looks up one code exactly - the usual question, when someone asks
    whether a code a customer quoted is real.
    `filter_active` splits valid from expired or exhausted.
    `filter_promo_code_pool_id` narrows to one campaign; `list_promo_code_pools`
    finds the pool.

    `use_count` against `max_uses` says whether a code is spent. A null `max_uses`
    means unlimited, which is NOT the same as zero remaining.

    Pages default to 25 rather than v1's 250. `page` is a number, not a cursor.

    Requires `CSA_SKILLJAR_V1_API_KEY`, a separate credential from the v2 client.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
page_sizeNo
filter_codeNo
filter_activeNo
filter_promo_code_pool_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
pageNo
rowsYes
totalNo
has_moreNo
next_pageNo
Install Server

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds substantial behavioral context beyond that: the org has over 13,000 codes, total answers count without paging, default page size differs from v1, page is a number not a cursor, and null max_uses means unlimited rather than zero. It also discloses the separate CSA_SKILLJAR_V1_API_KEY credential requirement.

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?

Every sentence adds value: purpose, safety, scale warning, filter semantics, output field interpretation, pagination differences, and credential requirements. The line breaks and emphasis ('THERE ARE THOUSANDS', 'NOT the same') make critical warnings stand out without fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description need not explain return types in detail, but it still covers the important output concepts (total, use_count, max_uses, null max_uses). It also covers scale, filtering strategies, pagination, and authentication, making the tool fully callable by an agent without external context.

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%, so the description carries the full semantic burden for all five parameters. It explains filter_code exact-match lookup, filter_active's valid/expired/exhausted meaning, filter_promo_code_pool_id's campaign narrowing, and gives pagination semantics with the default of 25 and page being a number, not a cursor.

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?

Opens with 'List discount codes' and immediately clarifies 'READ-ONLY - nothing here creates or revokes one,' giving a specific verb, resource, and safety profile. It also distinguishes this tool from the sibling list_promo_code_pools by explaining that the pool ID filter narrows to a campaign while list_promo_code_pools finds the pool.

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?

Provides concrete guidance on when to use each filter: filter_code for checking whether a customer-quoted code is real, filter_active for valid vs. expired/exhausted, and filter_promo_code_pool_id for campaign scoping. It explicitly warns not to page through thousands of codes and points to list_promo_code_pools as the alternative when the pool is the target.

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

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/CloudSecurityAlliance/csa-skilljar'

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