Skip to main content
Glama
shukiv

blesta-mcp

by shukiv

Lookup coupon

lookup_coupon
Read-onlyIdempotent

Validate a promo code by checking its status, active dates, usage limits, discount amounts, and eligible packages. Also verify if it applies to specific packages.

Instructions

Validate a promo code: existence, status, start/end dates, usage limits, discount amounts per currency, eligible packages. Wraps Coupons.getByCode; with package_ids, also Coupons.getForPackages to check applicability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
package_idsNoCheck the coupon applies to these packages

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior. The description adds meaningful context by naming the underlying wrapped calls and by disclosing that providing `package_ids` causes an additional lookup. This conditional behavior is not visible from the schema or annotations alone.

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?

Two sentences carry all essential information: the validation scope is front-loaded, and the conditional `package_ids` behavior is stated in one clause. There is no repetition of schema details or filler.

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 simple read-only lookup with two parameters and no output schema, the description covers the input semantics, the validation scope, and the conditional behavior. It does not explicitly describe the return shape or nonexistent-code behavior, but the listed validation fields effectively signal what the agent can expect to learn from the result.

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 coverage is 50%: `package_ids` has a schema description, but `code` does not. The description compensates by identifying `code` as the promo code to validate and clarifying that `package_ids` are packages checked for coupon eligibility. This adds real meaning beyond the raw schema fields.

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 opens with a specific verb ('Validate') and resource ('a promo code'), then enumerates exactly what is checked: existence, status, dates, usage limits, per-currency discounts, and eligible packages. This is far more specific than the title and makes the tool's role 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 clearly frames when to use this tool: to validate a promo code and check its applicability. It also provides conditional guidance for the `package_ids` parameter by noting that it triggers an additional `Coupons.getForPackages` check. There is no explicit when-not-to-use statement, but no coupon-specific sibling tool exists, so the guidance is adequate.

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