Skip to main content
Glama
Swipe Smart MCP

Swipe Smart MCP

by afzalmukhtar

add_cap_buckets

Add spending-limit cap buckets to an existing credit card so you can define points caps by category or globally before attaching reward rules.

Instructions

Adds cap buckets (spending limits) to an existing credit card.
Call this BEFORE add_reward_rules if rules need to reference caps.

Args:
    card_id: The ID of the card (returned by add_credit_card).
    buckets: List of bucket dictionaries. Each bucket should have:
        - name (str): Descriptive name (e.g., "SmartBuy Monthly Cap", "Dining Quarterly Cap")
        - max_points (float): Maximum points that can be earned in this bucket
        - period (str): Reset period. Options: "daily", "statement_month", "quarter", "statement_year". Default "statement_month".
        - scope (str): What the cap applies to. Options: "category", "global". Default "category".

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

Example:
    add_cap_buckets(card_id=1, buckets=[
        {"name": "SmartBuy Monthly Cap", "max_points": 5000, "period": "statement_month"},
        {"name": "Total Monthly Cap", "max_points": 15000, "period": "statement_month", "scope": "global"},
    ])

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>",
      "buckets": "<buckets>"
    },
    "name": "add_cap_buckets"
  }
}

Input Schema

NameRequiredDescriptionDefault
bucketsYes
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?

No annotations are supplied, so the description carries the full burden. It does disclose the return shape (status plus created bucket IDs) and documents default values for period and scope, which is useful. It stops short of stating failure modes, whether duplicate bucket names are rejected, whether the operation is idempotent, or whether an unknown card_id raises an error.

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?

Front-loaded purpose followed by Args, Returns, and Example sections, which is well structured and easy to scan. The runnable example is genuinely useful but restates the field list already given in Args, making the definition slightly longer than strictly necessary.

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 top-level parameters, no output schema, and no annotation coverage, the description supplies nearly everything needed: parameter semantics, defaults, return value, and call ordering. Only error and edge-case behavior is unaddressed.

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 coverage is 0% and the nested bucket object is untyped in the schema, yet the description fully compensates: it documents name, max_points, period (with all four allowed values and the default), and scope (with allowed values and default). This is exactly the semantic layer the schema lacks.

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?

"Adds cap buckets (spending limits) to an existing credit card" gives a specific verb, resource, and a plain-language gloss of the domain term 'cap buckets'. It is clearly separable from siblings like add_reward_rules and add_credit_card, which are both named in the body.

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?

Gives an explicit ordering constraint: call this BEFORE add_reward_rules when rules reference caps, and notes card_id comes from add_credit_card. That covers the main sequencing decision an agent faces, though there is no when-not guidance (e.g., what to do if the card already has caps).

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