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()]

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