Skip to main content
Glama
Omkar4141

Expense Tracker MCP Server

by Omkar4141

get_total

Calculate total expenses from the Expense Tracker MCP Server to monitor spending and track financial overview.

Instructions

Get total of all expenses

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:60-67 (handler)
    The @mcp.tool decorator registers the get_total function as a tool. This async handler computes and returns the total sum of all expense amounts from the SQLite database.
    @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
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