Skip to main content
Glama
askMohan

Expense Tracker MCP

by askMohan

Expense Tracker MCP

A FastMCP server that stores expenses in SQLite. The database is created as expenses.db beside main.py by default.

Tools

  • add_expense(amount, expense_type, expense_date, description=None) adds an expense and returns the stored row.

  • remove_expense(expense_id) removes an expense by ID and returns the deleted row.

  • list_expenses(expense_type=None, start_date=None, end_date=None) lists expenses and returns their count and total. Type matching is case-insensitive, and both date boundaries are inclusive.

Dates use ISO YYYY-MM-DD format. To store the database somewhere else, set the EXPENSE_DB_PATH environment variable before starting the server.

Related MCP server: Expense Tracker MCP Server

Resources

  • expense://types exposes expense_types.json as application/json. It contains the supported expense_type values and the corresponding sub_expense_types that an MCP client or LLM can use when categorizing an expense.

Run

uv run main.py

Available Tools

3 tools
add_expenseC

Add an expense.

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesPositive expense amount.
descriptionNoOptional note about the expense.
expense_dateYesDate the expense occurred, in YYYY-MM-DD format.
expense_typeYesCategory such as food, travel, rent, or utilities.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so the description carries the full burden of behavioral disclosure. 'Add an expense' only restates the operation and does not mention persistence, validation, id generation, side effects, or failure behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three words with no filler and is maximally front-loaded. It is concise and easy to parse, though it is arguably too sparse to fully compensate for missing behavioral and usage context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The schema covers all parameters and an output schema exists, so the agent has the operational essentials. However, the description itself provides no behavioral or usage context, leaving the overall tool definition acceptable but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema fully documents amount, description, expense_date, and expense_type. The description adds no additional parameter context, but the structured schema already provides the necessary meaning, so a baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('Add') and resource ('expense'), and the sibling names remove_expense and list_expenses make it easy to distinguish. It is terse but not tautological, and the core operation is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus remove_expense or list_expenses. There are no conditions, exclusions, or alternative-routing hints; the agent is left to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_expensesA

List expenses, optionally filtered by type and an inclusive date range.

ParametersJSON Schema
NameRequiredDescriptionDefault
end_dateNoOptional inclusive upper date bound in YYYY-MM-DD format.
start_dateNoOptional inclusive lower date bound in YYYY-MM-DD format.
expense_typeNoExact expense category, matched case-insensitively.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description bears the full burden of behavioral disclosure. The verb 'List' implies a read-only operation with no side effects, and 'optionally filtered' suggests that omitting filters returns all expenses, which is useful behavioral context. Yet it does not disclose details like pagination, sorting, or whether deleted expenses are excluded, leaving some behavioral aspects unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that front-loads the primary action and resource, then adds the optional filter qualifier. Every word earns its place, and there is no redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity, 100% schema description coverage, and the presence of an output schema, the description is nearly complete. It explains the core function and optional filters. A minor gap is that it does not explicitly state the default behavior when no filters are provided, though 'optionally filtered' strongly implies returning all expenses, so the omission is negligible.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description mentions filtering by type and date range, which maps cleanly to the three parameters, but it does not add meaningful information beyond what the schema already documents, such as inclusive date bounds or case-insensitive expense_type matching.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and the resource 'expenses', making it immediately obvious what the tool does. The optional filter clause (by type and inclusive date range) adds useful scope. The verb 'list' naturally distinguishes it from the sibling tools add_expense and remove_expense.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage: call this tool when you need to view expenses, with optional filters. However, it does not explicitly state when to use this tool instead of add_expense or remove_expense, nor does it provide any exclusions or alternative scenarios. The usage context is clear from the verb but not explicitly spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

remove_expenseA

Remove one expense by its integer ID and return the removed expense.

ParametersJSON Schema
NameRequiredDescriptionDefault
expense_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the behavioral disclosure burden. It does convey that this is a destructive action and that the removed expense is returned. It does not disclose irreversibility, behavior for nonexistent IDs, or any side effects, which are notable gaps for a deletion operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It conveys the operation, target, criterion, and return value in eleven words, making it easy to scan and act on.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter destructive tool with an output schema present, the description covers the operation, target identification, and return value. It doesn't explicitly address not-found handling or whether the delete is permanent, but the overall simplicity and existing output schema keep it sufficiently complete for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only exposes an integer property named expense_id, so the description's statement 'by its integer ID' clarifies that the parameter identifies the specific expense to remove. This adds meaningful semantic context beyond the bare schema for the tool's sole parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Remove'), a specific resource ('expense'), the selection criterion ('by its integer ID'), and the result ('return the removed expense'). This clearly distinguishes it from the sibling tools, which add or list expenses.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: when an existing expense needs to be removed by ID. However, the description offers no explicit when-to-use versus when-not-to-use guidance or references to the sibling tools, so an agent must infer the boundary between this and add_expense or list_expenses.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedadd_expense
    • First observedlist_expenses
    • First observedremove_expense

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

Each tool serves a clearly distinct operation: adding, removing, or listing expenses. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern: add_expense, remove_expense, list_expenses. The minor singular/plural variation is natural and does not harm consistency.

Tool Count5/5

Three tools is a reasonable, focused set for a simple expense tracker. Each tool covers a necessary core action without unnecessary bloat.

Completeness3/5

The server covers create, read/delete, and list operations, but lacks an update_expense tool, which is a notable gap for expense tracking since correcting a mistaken amount or category requires delete-and-recreate.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    C
    quality
    D
    maintenance
    Enables personal expense management with SQLite storage, allowing users to add, update, delete, list, and summarize expenses by category through natural language interactions.
    5
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables tracking and managing personal expenses through a local SQLite database. Supports adding, editing, deleting, listing, and summarizing expenses by category, as well as managing credit accounts.
    6
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to manage expenses with category support, including adding expenses with date, amount, category, and notes, using SQLite for persistence.
    -