transfer_update
Modify existing transfers in Money Manager by updating date, amount, accounts, or description. Creates a new transaction ID while preserving financial data accuracy.
Instructions
Modifies an existing transfer. WARNING: The server creates a new transfer with a NEW ID instead of updating in-place. The old ID will no longer exist after update. Use transaction_list to get the new ID if needed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Transfer transaction ID | |
| moveDate | Yes | Transfer date (YYYY-MM-DD) | |
| fromAssetId | Yes | Source asset ID | |
| fromAssetName | Yes | Source asset name | |
| toAssetId | Yes | Destination asset ID | |
| toAssetName | Yes | Destination asset name | |
| moveMoney | Yes | Transfer amount | |
| moneyContent | No | Optional: Description | |
| mbDetailContent | No | Optional: Detailed notes |
Implementation Reference
- src/tools/handlers.ts:644-672 (handler)Handler function that executes the transfer_update tool logic by validating input and calling the Money Manager /modifyMoveAsset API endpoint. Note the warning about the server creating a new transfer ID.export async function handleTransferUpdate( httpClient: HttpClient, input: unknown, ): Promise<TransferOperationResponse> { const validated = TransferUpdateInputSchema.parse(input); const response = await httpClient.post<ApiOperationResponse>( "/modifyMoveAsset", { id: validated.id, moveDate: validated.moveDate, fromAssetId: validated.fromAssetId, fromAssetName: validated.fromAssetName, toAssetId: validated.toAssetId, toAssetName: validated.toAssetName, moveMoney: validated.moveMoney, moneyContent: validated.moneyContent || "", mbDetailContent: validated.mbDetailContent || "", }, ); return { success: response.success !== false && response.result !== "fail", transferId: validated.id, message: response.message || "WARNING: The server creates a new transfer with a NEW ID. The provided ID is now invalid. Use transaction_list to get the new ID.", }; }
- src/schemas/index.ts:307-319 (schema)Zod schema defining the input parameters for the transfer_update tool, including required fields like id, dates, asset IDs, names, and amount.export const TransferUpdateInputSchema = z.object({ id: TransactionIdSchema, moveDate: DateSchema, fromAssetId: AssetIdSchema, fromAssetName: NonEmptyString, toAssetId: AssetIdSchema, toAssetName: NonEmptyString, moveMoney: PositiveNumber, moneyContent: z.string().optional(), mbDetailContent: z.string().optional(), }); export type TransferUpdateInput = z.infer<typeof TransferUpdateInputSchema>;
- src/tools/handlers.ts:819-819 (registration)Registration of the transfer_update handler in the toolHandlers object, mapping the tool name to its execution function.transfer_update: handleTransferUpdate,
- src/index.ts:379-409 (registration)MCP protocol tool definition registration in TOOL_DEFINITIONS array, including name, description, and JSON schema for input validation.{ name: "transfer_update", description: "Modifies an existing transfer. WARNING: The server creates a new transfer with a NEW ID instead of updating in-place. The old ID will no longer exist after update. Use transaction_list to get the new ID if needed.", inputSchema: { type: "object" as const, properties: { id: { type: "string", description: "Transfer transaction ID" }, moveDate: { type: "string", description: "Transfer date (YYYY-MM-DD)" }, fromAssetId: { type: "string", description: "Source asset ID" }, fromAssetName: { type: "string", description: "Source asset name" }, toAssetId: { type: "string", description: "Destination asset ID" }, toAssetName: { type: "string", description: "Destination asset name" }, moveMoney: { type: "number", description: "Transfer amount" }, moneyContent: { type: "string", description: "Optional: Description" }, mbDetailContent: { type: "string", description: "Optional: Detailed notes", }, }, required: [ "id", "moveDate", "fromAssetId", "fromAssetName", "toAssetId", "toAssetName", "moveMoney", ], }, },
- src/types/index.ts:399-401 (helper)TypeScript type definition for TransferUpdateInput, extending TransferCreateInput with an id field.export interface TransferUpdateInput extends TransferCreateInput { id: string; }