Skip to main content
Glama
Omkar4141

Expense Tracker MCP Server

by Omkar4141

get_all_expenses

Retrieve all recorded expenses from the Expense Tracker MCP Server to view spending history and manage financial records.

Instructions

Get all expenses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:70-70 (registration)
    Registers the get_all_expenses tool using the @mcp.tool decorator in FastMCP.
    @mcp.tool
  • main.py:71-76 (handler)
    The main handler function for the get_all_expenses tool. It initializes the database if needed, queries all expenses from the SQLite database ordered by date descending, and returns them as a list of dictionaries.
    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()]

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