Skip to main content
Glama

list_loyalty_programs

Retrieve all loyalty programs managed by your merchant on the Base L2 blockchain, including optional expired programs for comprehensive oversight.

Instructions

List loyalty programs owned by the agent's merchant

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_expiredNoInclude expired programs

Implementation Reference

  • The handler for 'list_loyalty_programs' queries the loyalty_programs table in Supabase filtering by merchant_address.
    mcpServer.tool("list_loyalty_programs", {
      description: "List loyalty programs owned by the agent's merchant",
      inputSchema: { type: "object" as const, properties: { include_expired: { type: "boolean", description: "Include expired programs" } } },
      handler: async ({ include_expired }: any) => {
        const err = authGuard(["read"]);
        if (err) return T(err);
        let q = db().from("loyalty_programs").select("id,name,symbol,token_address,status,expiration_date,created_at").eq("merchant_address", agent.ownerAddress).order("created_at", { ascending: false });
        if (!include_expired) q = q.neq("status", "expired");
        const { data, error } = await q;
        if (error) return T(JSON.stringify({ error: error.message }));
        return T(JSON.stringify({ programs: data || [] }));
      },
Behavior2/5

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

No annotations provided, so description carries full burden. It discloses ownership filtering ('owned by the agent's merchant') but fails to confirm read-only safety, pagination behavior, return format, or rate limits. 'List' implies non-destructive, but this should be explicit without 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?

Single sentence (7 words), front-loaded with action verb, zero redundancy. Every word earns its place.

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?

Tool has low complexity (1 optional param, no nesting). Description covers core purpose but lacks behavioral context expected when no annotations or output schema exist. Adequate but minimal for agent confidence.

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

Parameters3/5

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

Schema has 100% description coverage for the single 'include_expired' parameter. The description doesn't mention this parameter, but with complete schema documentation, no additional compensation is needed. Baseline score appropriate.

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?

Clear verb 'List' with specific resource 'loyalty programs' and ownership scope 'owned by the agent's merchant'. This scope helps distinguish from siblings like list_marketplace_offers, though it doesn't explicitly contrast with create_loyalty_program or register_loyalty_program.

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

Usage Guidelines2/5

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

No explicit guidance on when to use versus alternatives (e.g., when to list vs. create/register). The verb 'List' implies retrieval, but there are no when-not-to-use conditions or workflow guidance provided.

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

Install Server

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/aspekt19/unboxed-loyalty-spark'

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