Skip to main content
Glama
Swipe Smart MCP

Swipe Smart MCP

by afzalmukhtar

analyze_expenses

Analyze spending patterns and reward earnings for any period to identify category breakdowns, card usage, and where your money goes.

Instructions

Analyzes spending patterns and reward earnings for a given period.

Call this tool when user asks:
- "How did I spend this month?"
- "Show me my spending summary"
- "What's my reward rate?"
- "Where is my money going?"

Args:
    period: Time period to analyze. Options: "week", "month", "quarter", "year"
            Ignored if start_date/end_date provided.
    start_date: Custom start date (YYYY-MM-DD). Optional.
    end_date: Custom end date (YYYY-MM-DD). Optional.

Returns:
    dict with spending summary, category breakdown, card usage, and insights.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "analyze_expenses"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNomonth
end_dateNo
start_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 behavioral burden; it does disclose the return shape (spending summary, category breakdown, card usage, insights), which is real added value. It never states that it is read-only/no-side-effect, nor anything about authentication, data scoping, or cost of the call, leaving the agent to infer safety.

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?

Front-loaded purpose sentence, then a compact when-to-call list, then args and returns in clearly labeled sections. Every line carries information; the example utterances are the only padding and they directly serve routing.

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 three optional parameters, no annotations, and no output schema, the description covers purpose, trigger conditions, all parameter formats, and the return shape — enough to call it correctly. The residual gaps are edge-case semantics (single-sided date range, default period) rather than missing essentials.

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 0%, so the description must compensate, and it largely does: it enumerates the period enum values ("week", "month", "quarter", "year") and the YYYY-MM-DD format for start_date/end_date, plus the key precedence rule that period is ignored when dates are supplied. It omits the default of "month" and does not say what happens if only one of start_date/end_date is provided.

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?

States a specific verb+resource: "Analyzes spending patterns and reward earnings for a given period," which is more than a restatement of the name and implies an aggregated analysis rather than raw retrieval. It does not explicitly distinguish itself from retrieval siblings like get_transactions or get_points_history, so an agent must infer that boundary.

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 four concrete user utterances that should trigger it ("How did I spend this month?", "What's my reward rate?", etc.), which is strong positive routing guidance. It provides no when-not-to-use guidance and never names an alternative tool for raw transaction listing.

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