Skip to main content
Glama

finance

Analytics: Get merchant spending

get_merchant_spending
Read-onlyIdempotent
    Get total spending at a specific merchant or matching a description.

    Answers questions like "how much have I spent at Amazon/Starbucks?"
    Searches transaction descriptions (case-insensitive partial match).

    Args:
        search_term: Merchant name or description to search for
        start_date: YYYY-MM-DD (defaults to 12 months ago)
        end_date: YYYY-MM-DD (defaults to today)

    Returns:
        Total spent, transaction count, average per transaction,
        first/last dates, and monthly breakdown.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNo
start_dateNo
search_termYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely behavioral detail beyond that: the search is a case-insensitive partial match on transaction descriptions, and the date window defaults to the trailing 12 months when omitted.

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 with the core purpose, then structured Args/Returns sections. Slightly padded by the example-question sentence, but every block (scope, matching mechanism, parameters, return shape) earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema present, the description compensates by enumerating the return shape (total spent, transaction count, average, first/last dates, monthly breakdown). Combined with full parameter documentation and the matching mechanism, nothing needed to invoke or interpret the call is missing.

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%, so the description carries the full burden and does so: it explains search_term as a merchant name/description matched case-insensitively, gives the YYYY-MM-DD format for both date params, and supplies the default behavior for each.

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 with explicit scope: 'Get total spending at a specific merchant or matching a description.' The merchant-scoped framing distinguishes it from broader siblings like get_spending_summary and get_category_trend, so an agent can route without opening a 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 example questions ('how much have I spent at Amazon/Starbucks?') give clear context for when this tool applies. However, it names no alternatives or exclusions — nothing tells the agent why to pick this over get_spending_summary or list_transactions for the same question.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources