Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

transaction_update

Modify existing financial transactions to correct details, update amounts, or adjust categories for accurate personal finance tracking.

Instructions

Updates an existing transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTransaction ID
mbDateYesTransaction date (YYYY-MM-DD)
assetIdYesAsset/Account ID
payTypeYesPayment type name
mcidYesCategory ID
mbCategoryYesCategory name
mbCashYesAmount
inOutCodeYesTransaction type code
inOutTypeYesTransaction type name
mcscidNoOptional: Subcategory ID
subCategoryNoOptional: Subcategory name
mbContentNoOptional: Description
mbDetailContentNoOptional: Detailed notes

Implementation Reference

  • The core handler function that implements the transaction_update tool. It validates the input schema, makes a POST request to the Money Manager '/update' API endpoint with the transaction details, and returns a standardized operation response.
    export async function handleTransactionUpdate(
      httpClient: HttpClient,
      input: unknown,
    ): Promise<TransactionOperationResponse> {
      const validated = TransactionUpdateInputSchema.parse(input);
    
      const response = await httpClient.post<ApiOperationResponse>("/update", {
        id: validated.id,
        mbDate: validated.mbDate,
        assetId: validated.assetId,
        payType: validated.payType,
        mcid: validated.mcid,
        mbCategory: validated.mbCategory,
        mbCash: validated.mbCash,
        inOutCode: validated.inOutCode,
        inOutType: validated.inOutType,
        mcscid: validated.mcscid || "",
        subCategory: validated.subCategory || "",
        mbContent: validated.mbContent || "",
        mbDetailContent: validated.mbDetailContent || "",
      });
    
      return {
        success: response.success !== false && response.result !== "fail",
        transactionId: validated.id,
        message: response.message,
      };
    }
  • Zod input validation schema for the transaction_update tool, defining all required fields like id, date, asset, category, amount, and type codes.
    export const TransactionUpdateInputSchema = z.object({
      id: TransactionIdSchema,
      mbDate: DateSchema,
      assetId: AssetIdSchema,
      payType: NonEmptyString,
      mcid: CategoryIdSchema,
      mbCategory: NonEmptyString,
      mbCash: PositiveNumber,
      inOutCode: ExtendedInOutCodeSchema,
      inOutType: NonEmptyString,
      mcscid: z.string().optional(),
      subCategory: z.string().optional(),
      mbContent: z.string().optional(),
      mbDetailContent: z.string().optional(),
    });
    
    export type TransactionUpdateInput = z.infer<
      typeof TransactionUpdateInputSchema
    >;
  • Central registry mapping 'transaction_update' tool name to its handleTransactionUpdate handler function, used by executeToolHandler to dispatch calls.
    export const toolHandlers = {
      // Initialization
      init_get_data: handleInitGetData,
    
      // Transactions
      transaction_list: handleTransactionList,
      transaction_create: handleTransactionCreate,
      transaction_update: handleTransactionUpdate,
      transaction_delete: handleTransactionDelete,
    
      // Summary
      summary_get_period: handleSummaryGetPeriod,
      summary_export_excel: handleSummaryExportExcel,
    
      // Assets
      asset_list: handleAssetList,
      asset_create: handleAssetCreate,
      asset_update: handleAssetUpdate,
      asset_delete: handleAssetDelete,
    
      // Credit Cards
      card_list: handleCardList,
      card_create: handleCardCreate,
      card_update: handleCardUpdate,
    
      // Transfers
      transfer_create: handleTransferCreate,
      transfer_update: handleTransferUpdate,
    
      // Dashboard
      dashboard_get_overview: handleDashboardGetOverview,
      dashboard_get_asset_chart: handleDashboardGetAssetChart,
    
      // Backup
      backup_download: handleBackupDownload,
      backup_restore: handleBackupRestore,
    } as const;
  • src/index.ts:116-157 (registration)
    MCP protocol tool registration definition, including the tool name, description, and JSON Schema for input validation exposed to MCP clients.
    {
      name: "transaction_update",
      description: "Updates an existing transaction.",
      inputSchema: {
        type: "object" as const,
        properties: {
          id: { type: "string", description: "Transaction ID" },
          mbDate: {
            type: "string",
            description: "Transaction date (YYYY-MM-DD)",
          },
          assetId: { type: "string", description: "Asset/Account ID" },
          payType: { type: "string", description: "Payment type name" },
          mcid: { type: "string", description: "Category ID" },
          mbCategory: { type: "string", description: "Category name" },
          mbCash: { type: "number", description: "Amount" },
          inOutCode: { type: "string", description: "Transaction type code" },
          inOutType: { type: "string", description: "Transaction type name" },
          mcscid: { type: "string", description: "Optional: Subcategory ID" },
          subCategory: {
            type: "string",
            description: "Optional: Subcategory name",
          },
          mbContent: { type: "string", description: "Optional: Description" },
          mbDetailContent: {
            type: "string",
            description: "Optional: Detailed notes",
          },
        },
        required: [
          "id",
          "mbDate",
          "assetId",
          "payType",
          "mcid",
          "mbCategory",
          "mbCash",
          "inOutCode",
          "inOutType",
        ],
      },
    },
  • TypeScript type definition for TransactionUpdateInput, providing type safety for the input structure used in handlers and schemas.
    export interface TransactionUpdateInput {
      id: string;
      mbDate: string;
      assetId: string;
      payType: string;
      mcid: string;
      mbCategory: string;
      mbCash: number;
      inOutCode: string;
      inOutType: string;
      mcscid?: string;
      subCategory?: string;
      mbContent?: string;
      mbDetailContent?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states 'Updates an existing transaction,' implying a mutation operation, but doesn't specify required permissions, whether changes are reversible, error handling (e.g., for invalid IDs), or response format. This is inadequate for a tool with significant mutation potential.

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 is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized for the tool's complexity, though it could benefit from more detail given the lack of annotations and output schema.

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

Completeness2/5

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

For a mutation tool with 13 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like side effects, error conditions, or return values, leaving significant gaps for the agent to infer. More context is needed given the tool's complexity.

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

Parameters3/5

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

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional meaning beyond the schema's parameter descriptions (e.g., it doesn't explain relationships between fields like mcid and mbCategory). Baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Updates an existing transaction' clearly states the action (update) and resource (transaction), but it's generic and doesn't differentiate from sibling tools like transaction_create or transaction_delete beyond the verb. It's not misleading but lacks specificity about what aspects of a transaction can be updated.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like transaction_create or transaction_delete. The description doesn't mention prerequisites (e.g., needing an existing transaction ID) or contextual factors (e.g., use for modifying details vs. creating new ones). This leaves the agent with minimal direction.

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/shahlaukik/money-manager-mcp'

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