Skip to main content
Glama
Omkar4141

Expense Tracker MCP Server

by Omkar4141

get_total

Calculate the total sum of all recorded expenses in the Expense Tracker MCP Server to monitor spending and manage budgets.

Instructions

Get total of all expenses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:60-67 (handler)
    Handler function for the get_total tool. It initializes the database connection if needed, executes a SQL query to sum all expense amounts, and returns the total as a float.
    @mcp.tool async def get_total() -> float: """Get total of all expenses""" await init_db() cursor = conn.cursor() cursor.execute('SELECT SUM(amount) as total FROM expenses') result = cursor.fetchone() return result['total'] or 0.0

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