Skip to main content
Glama
Sudhanvaha

Expense Tracker MCP Server

by Sudhanvaha

list_expenses

Retrieve all recorded expenses between specified start and end dates to review spending patterns and track financial activity over time.

Instructions

list all expenses within an inclusive date range

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYes
end_dateYes

Implementation Reference

  • main.py:48-60 (handler)
    The @mcp.tool() decorator registers the list_expenses function as an MCP tool. The handler queries the SQLite expenses table for records between start_date and end_date (inclusive), formats them as a list of dictionaries, and returns them.
    @mcp.tool()
    def list_expenses(start_date, end_date):
        """list all expenses within an inclusive date range"""
        with sqlite3.connect(DB_PATH) as c:
            cur = c.execute(
                """SELECT * from expenses 
                   where date between ? and ? 
                   order by id asc""",
                (start_date, end_date)
            )
            cols = [d[0] for d in cur.description]
            return [dict(zip(cols, r)) for r in cur.fetchall()]
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it's a list operation (implying read-only) and specifies date-range filtering, but doesn't mention pagination, sorting, authentication requirements, rate limits, error conditions, or what the return format looks like. For a list tool with zero annotation coverage, this leaves significant behavioral gaps.

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?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action ('list all expenses') followed by the key constraint ('within an inclusive date range'). Every word serves a purpose.

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

Completeness2/5

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

Given no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't explain what an 'expense' object contains, how results are structured, whether there are limits on date ranges, or how to handle large result sets. For a list tool with two required parameters, more context is needed for effective use.

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

Parameters2/5

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

Schema description coverage is 0% (parameters have only titles), so the description must compensate. It mentions 'inclusive date range' which implies the two parameters are date boundaries, but doesn't specify date format (ISO, timestamp, etc.), timezone handling, or whether dates are inclusive/exclusive. The description adds minimal semantic context beyond what's inferable from parameter names.

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?

The description clearly states the verb 'list' and resource 'expenses', specifying the scope as 'within an inclusive date range'. It distinguishes from siblings like 'add_expense' (create) and 'update' (modify), but doesn't explicitly differentiate from 'summarize' which might also involve expense data. The purpose is specific and unambiguous.

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?

The description provides no guidance on when to use this tool versus alternatives like 'summarize' (which might provide aggregated data) or other siblings. It doesn't mention prerequisites, exclusions, or typical use cases. The agent must infer usage from the tool name and description alone.

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/Sudhanvaha/expense-tracker-mcp-server'

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