Skip to main content
Glama
Omkar4141

Expense Tracker MCP Server

by Omkar4141

get_all_expenses

Retrieve a complete list of all recorded expenses from the Expense Tracker database to review spending history and track financial data.

Instructions

Get all expenses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:70-76 (handler)
    This is the handler function for the 'get_all_expenses' tool. It is decorated with @mcp.tool, which registers it with the FastMCP server. The function initializes the database connection if necessary, executes a SQL query to select all expenses ordered by date descending, and returns them as a list of dictionaries.
    @mcp.tool async def get_all_expenses() -> List[Dict]: """Get all expenses""" await init_db() cursor = conn.cursor() cursor.execute('SELECT * FROM expenses ORDER BY date DESC') return [dict(row) for row in cursor.fetchall()]
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/Omkar4141/dbserver_mcp'

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