Skip to main content
Glama
mhajder

Ghostfolio MCP Server

by mhajder

Update Activity

update_activity
DestructiveIdempotent

Update an existing activity/transaction.

Instructions

Update an existing activity/transaction.

Ghostfolio's update endpoint replaces the whole activity record, so type, symbol, date, quantity, unitPrice, currency, dataSource and fee are required on every request even when they are not changing. Any left unset here (including tags, account_id and comment) are backfilled from the activity's current state with a GET before the PUT, so you only need to pass the fields you actually want to change. If a required field can't be backfilled (Ghostfolio redacts quantity and fee in restricted views), pass it explicitly. A restricted view also redacts comment, and Ghostfolio clears the comment whenever the update carries none, so in that case comment is required too (pass an empty string to clear it).

Ghostfolio identifies the asset by dataSource and symbol together, and the current currency belongs to that asset. So changing either symbol or data_source requires passing symbol, data_source and currency together; backfilling the rest from the old asset would attach the activity to the wrong asset profile or price it in the wrong currency. Ghostfolio ignores an asset change (without an error) when the resulting activity is a FEE, INTEREST or LIABILITY, or a BUY on the MANUAL data source; delete and re-create the activity instead.

The GET and PUT are separate requests, so an edit made to the same activity in between (e.g. in the Ghostfolio UI) is overwritten for every field not passed here.

Input Schema

NameRequiredDescriptionDefault
feeNoOptional new fee amount
dateNoOptional new date in ISO 8601 format (e.g. 2026-05-09T00:00:00.000Z)
tagsNoOptional new list of tag IDs (from get_tags) to replace this activity's tags. Omit to leave existing tags unchanged; pass an empty list to clear all tags.
typeNoOptional new type: BUY, SELL, DIVIDEND, INTEREST, FEE, LIABILITY
symbolNoOptional new ticker symbol. Changing the asset (symbol or data_source) requires symbol, data_source and currency together.
commentNoOptional new comment
currencyNoOptional new currency code
quantityNoOptional new number of shares/units
account_idNoOptional new account ID. Pass an empty string to detach the activity from its account.
unit_priceNoOptional new price per unit
activity_idYesThe unique ID of the activity to update
data_sourceNoOptional new data source (e.g., 'YAHOO', 'COINGECKO', 'MANUAL'). Changing it requires symbol and currency too.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.0

TDQS

A4.8/5.0
Behavior5/5

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

The annotations already mark this as destructive and idempotent, but the description adds substantial hidden behavior: the PUT replaces the whole record, unset fields are backfilled with a GET first, restricted views redact quantity/fee/comment, comments are cleared unless supplied, asset changes require symbol/data_source/currency together, and concurrent edits can be overwritten. These are exactly the beyond-annotation behaviors an agent needs to avoid incorrect updates.

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 front-loads the action and then spends each sentence on a non-obvious constraint such as replacement semantics, backfill behavior, restricted-view redaction, and ignored asset changes. The length is justified by 12 parameters and the tool's complex update behavior, with no filler.

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

Completeness5/5

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

With annotations, full parameter descriptions, and an output schema already present, the description covers the behavioral gaps an agent needs in order to call this tool correctly. Return-value details are appropriately left to the output schema.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds important cross-parameter meaning: unchanged required fields must still be passed or backfilled, tags/account_id/comment default to current state, comment may be required in restricted views, and symbol/data_source/currency must be changed together. This goes well beyond the individual schema descriptions.

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 opening sentence states a specific verb ('Update') and resource ('an existing activity/transaction'), which clearly distinguishes it from create_activity and delete_activity siblings. The replacement semantics are additional detail, but the core purpose 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 Guidelines4/5

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

It gives clear context for updating an existing activity and explicitly says to delete and re-create instead when an asset change would be silently ignored for FEE, INTEREST, LIABILITY, or MANUAL BUY activities. However, it does not provide broad routing guidance versus create_activity or delete_activity, so it stops short of a full 5.

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