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 history 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 handler function for the list_expenses tool, registered via @mcp.tool(). It retrieves expenses from the SQLite database within the given date range and returns them as a list of dictionaries.
    @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