transfer_create
Create transfers between assets to manage money movement in your financial accounts. Specify source, destination, amount, and date to record asset transfers.
Instructions
Transfers money between two assets.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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:612-634 (handler)The core handler function that implements the transfer_create tool. Validates input using TransferCreateInputSchema, calls the Money Manager API /moveAsset endpoint with POST request, and returns a TransferOperationResponse.export async function handleTransferCreate( httpClient: HttpClient, input: unknown, ): Promise<TransferOperationResponse> { const validated = TransferCreateInputSchema.parse(input); const response = await httpClient.post<ApiOperationResponse>("/moveAsset", { 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: response.transferId || response.id, message: response.message, }; }
- src/schemas/index.ts:291-302 (schema)Zod schema for input validation of the transfer_create tool parameters, including required fields like moveDate, asset IDs/names, and amount.export const TransferCreateInputSchema = z.object({ moveDate: DateSchema, fromAssetId: AssetIdSchema, fromAssetName: NonEmptyString, toAssetId: AssetIdSchema, toAssetName: NonEmptyString, moveMoney: PositiveNumber, moneyContent: z.string().optional(), mbDetailContent: z.string().optional(), }); export type TransferCreateInput = z.infer<typeof TransferCreateInputSchema>;
- src/index.ts:352-378 (registration)MCP tool registration definition for transfer_create, including name, description, and JSON Schema for input validation exposed to MCP clients.name: "transfer_create", description: "Transfers money between two assets.", inputSchema: { type: "object" as const, properties: { 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: [ "moveDate", "fromAssetId", "fromAssetName", "toAssetId", "toAssetName", "moveMoney", ], }, },
- src/tools/handlers.ts:818-818 (registration)Internal registry mapping the 'transfer_create' tool name to its handler function within the toolHandlers object.transfer_create: handleTransferCreate,
- src/schemas/index.ts:400-400 (schema)Registration of the TransferCreateInputSchema in the central ToolSchemas registry used for runtime validation.transfer_create: TransferCreateInputSchema,