Skip to main content
Glama
PK-SANGAMESWAR

Expense Tracker MCP Server

add_credit

Increase available funds in your Expense Tracker account to manage spending and maintain accurate financial records.

Instructions

Add credit to the user's account. By default updates 'default' user. Returns new credit amount.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYes
user_nameNodefault

Implementation Reference

  • main.py:150-166 (handler)
    The add_credit function is decorated with @mcp.tool() and handles adding credit to a user's account in the database.
    @mcp.tool()
    def add_credit(amount, user_name="default"):
        """
        Add credit to the user's account. By default updates 'default' user.
        Returns new credit amount.
        """
        try:
            with sqlite3.connect(DB_PATH) as conn:
                cursor = conn.cursor()
                # ensure user exists
                cursor.execute("INSERT OR IGNORE INTO users (name, credit) VALUES (?, ?)", (user_name, 0.0))
                cursor.execute("UPDATE users SET credit = credit + ? WHERE name = ?", (float(amount), user_name))
                cursor.execute("SELECT credit FROM users WHERE name = ?", (user_name,))
                new_credit = cursor.fetchone()[0]
                return {"status": "ok", "credit": new_credit}
        except Exception as e:
            return {"status": "error", "error": str(e)}
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool 'Adds credit' (implying a mutation/write operation) and mentions it 'Returns new credit amount', but lacks critical details like whether this requires authentication, has rate limits, affects other data, or what happens on errors. The description is too minimal for a mutation tool.

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 extremely concise—two sentences with zero wasted words. It's front-loaded with the core purpose and efficiently covers default behavior and return value. Every sentence earns its place.

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

Completeness2/5

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

For a mutation tool with 2 parameters (0% schema coverage), no annotations, and no output schema, the description is inadequate. It doesn't explain the return format beyond 'new credit amount', error conditions, side effects, or how it integrates with sibling tools. The agent lacks sufficient context to use this tool safely and effectively.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter documentation. The description only implies 'amount' is required (by mentioning adding credit) and that 'user_name' defaults to 'default', but doesn't explain what 'amount' represents (e.g., currency, units) or valid values for 'user_name'. It adds minimal semantic value beyond the bare schema.

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 clearly states the action ('Add credit') and target ('to the user's account'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'add_expense', which could cause confusion about when to use each.

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?

The description mentions 'By default updates 'default' user', which provides some context about default behavior, but offers no guidance on when to use this tool versus alternatives like 'add_expense' or other financial tools. There's no mention of prerequisites, constraints, or typical use cases.

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

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/PK-SANGAMESWAR/mcp-expense-tracker'

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