Skip to main content
Glama

edit_txn

Update fields of an existing transaction by ID, with automatic price conversion to USD based on asset type and market.

Instructions

Update fields of an existing transaction by id. Only provided fields are changed.

When price is supplied it is converted to USD at the transaction date before storing. The native currency it is interpreted in depends on the (effective) asset type: for a stock it is the market's native currency (the new market if passed, else the existing one); for a non-stock asset it is the currency param (default USD).

Changing asset_type mirrors add_txn's fork: switching TO a non-stock type (crypto/commodity/real_estate/other) clears market to null (any market arg is ignored); switching TO 'stock' uses the supplied market (or keeps the existing one, defaulting to US).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
tickerNo
asset_typeNoAsset class: stock or crypto/commodity/real_estate/other. Switching to non-stock clears market.
dateNoYYYY-MM-DD
typeNo
sharesNo
priceNoPrice per share — native to the market (stock) or to `currency` (non-stock); stored converted to USD.
marketNoStock market (listing exchange)
currencyNoCurrency of `price` for a NON-stock asset (default USD). Ignored for stocks.
reasonNoWhy this trade? (free-form)
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses price conversion rules (to USD, dependent on asset type and market) and asset_type change side effects (clearing market). Missing details on idempotency, error handling, and return value.

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?

Three well-organized sentences: purpose, price behavior, asset_type behavior. No wasted words, but could be more concise by removing redundancy (e.g., 'only provided fields' repeated).

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?

Covers core update semantics and key behavioral traits. However, lacks return value information (no output schema), error conditions, and additional constraints for other parameters like date format validation or ticker requirements. Adequate for moderately complex tool but not fully comprehensive.

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?

Schema description coverage is 60%. Description adds significant detail for 'price' (conversion logic) and 'asset_type' (clearing behavior). For other params (date, type, shares, etc.), it relies on schema descriptions, which are adequate but not enhanced. Overall adds meaningful value beyond 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?

Clear verb 'update' and resource 'transaction' with scoping 'by id' and 'only provided fields changed'. Distinguishes from create/delete siblings.

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?

Implies usage for modifying existing transactions but lacks explicit when-to-use, when-not, or alternative tool references. Sibling context hints at create/delete, but no direct guidance.

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/evan-moon/firma'

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