Skip to main content
Glama
Swipe Smart MCP

Swipe Smart MCP

by afzalmukhtar

add_reward_rules

Add reward rules to an existing credit card to specify points earned by category, merchant, or platform, enabling card selection for purchases.

Instructions

Adds reward rules to an existing credit card. Call this AFTER add_credit_card.

Each rule defines how points are earned for a specific category/merchant/platform.

Args:
    card_id: The ID of the card (returned by add_credit_card).
    rules: List of rule dictionaries. Each rule should have:
        - category (str): Category name, merchant, or platform (e.g., "Dining", "Amazon", "SmartBuy")
        - base_multiplier (float): Base reward rate (e.g., 0.02 for 2%)
        - bonus_multiplier (float): Additional bonus rate (e.g., 0.03 for 3% extra). Default 0.
        - min_spend (float): Minimum spend to trigger rule. Default 0.
        - match_conditions (dict): Tier conditions (e.g., {"membership": "prime"}). Default None.
        - cap_bucket_name (str): Name of cap bucket to link. Default None.

Returns:
    dict with status and list of created rule IDs.

Example:
    add_reward_rules(card_id=1, rules=[
        {"category": "Dining", "base_multiplier": 0.04, "bonus_multiplier": 0.01},
        {"category": "All Spends", "base_multiplier": 0.02, "bonus_multiplier": 0},
        {"category": "SmartBuy", "base_multiplier": 0.10, "cap_bucket_name": "SmartBuy Monthly Cap"},
    ])

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "card_id": "<card_id>",
      "rules": "<rules>"
    },
    "name": "add_reward_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
rulesYes
card_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the mutation's prerequisite ordering and the return shape ("dict with status and list of created rule IDs"), plus defaults for optional rule fields, which is real context beyond the schema. However, it says nothing about error/validation behavior, whether re-adding the same category duplicates or replaces rules, or whether a referenced cap_bucket_name must already exist.

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?

Well front-loaded: purpose and prerequisite first, then args, returns, and a compact example. The one wasted line is "Each rule defines how points are earned for a specific category/merchant/platform," which largely restates the category field described a few lines later.

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 no output schema, the Returns section earns its place by naming the response shape, and the nested rule structure is fully specified despite a bare input schema. The remaining gap is failure semantics—invalid card_id, unknown cap bucket, or duplicate category—which an agent adding rules would plausibly need.

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% and the rules array is an untyped object list (additionalProperties: true), so the description must define everything—and it does: each key is documented with type, meaning, and default, plus a worked example showing realistic values and the 0.02-style multiplier convention. card_id's origin is also explained.

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?

States a specific verb and resource ("Adds reward rules to an existing credit card") and immediately clarifies the relation to the sibling mutation tool via "Call this AFTER add_credit_card." An agent can distinguish this from add_credit_card and from the read-side get_card_rules without opening either 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 prerequisite ordering ("Call this AFTER add_credit_card") is an explicit, actionable condition, and the card_id note reinforces where the ID comes from. It stops short of naming exclusions—e.g., that rules require an existing cap bucket for cap_bucket_name, or that get_card_rules is the read counterpart—so it is clear context but not full when/when-not guidance.

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