Skip to main content
Glama

update_expense

Modify draft expense details including amount, date, payment mode, and description to correct errors or update information before submission.

Instructions

    Update an existing expense (only if in draft state).

    Args:
        expense_id: ID of expense to update
        name: New name (optional)
        total_amount: New amount (optional)
        description: New description (optional)
        date_expense: New date in YYYY-MM-DD format (optional)
        payment_mode: Payment mode - "company" (paid by company) or "employee" (paid by employee) (optional)
        currency: ISO currency code (e.g., "EUR", "USD") (optional)
        analytic_account_id: Analytic account ID for cost distribution (optional)

    Returns:
        Update confirmation
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expense_idYes
nameNo
total_amountNo
descriptionNo
date_expenseNo
payment_modeNo
currencyNo
analytic_account_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a mutation operation ('Update') and specifies the draft-state constraint, which is valuable behavioral context. However, it doesn't mention permission requirements, whether the update is reversible, rate limits, or what happens to unchanged fields. The description adds some behavioral value but leaves significant gaps.

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 well-structured with a clear purpose statement followed by organized parameter documentation. Every sentence earns its place by providing essential information. It could be slightly more concise by combining some parameter explanations, but the structure is logical and front-loaded with the most important constraint.

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 complexity of an 8-parameter mutation tool with no annotations, the description does well by explaining all parameters and the draft-state constraint. The presence of an output schema means the description doesn't need to detail return values. However, for a mutation tool, it could better address behavioral aspects like error conditions or permission requirements to be fully complete.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by providing detailed parameter documentation. Each parameter is clearly explained with examples (e.g., date format 'YYYY-MM-DD', currency codes 'EUR/USD', payment mode options), optional status indications, and semantic meaning beyond what the bare schema provides. This adds substantial value beyond the minimal schema.

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 specific action ('Update an existing expense') and resource ('expense'), with the important constraint 'only if in draft state' that distinguishes it from sibling tools like 'delete_expense' or 'submit_expense_report'. This provides precise differentiation from other expense-related operations.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool ('only if in draft state'), which implicitly suggests when not to use it (when expense is not in draft). However, it doesn't explicitly mention alternatives like 'create_expense' for new expenses or 'delete_expense' for removal, nor does it specify prerequisites like checking expense status first.

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/industream/mcp-odoo'

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