Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

transaction_create

Add income or expense transactions to track financial activity with date, amount, category, and account details.

Instructions

Creates a new income or expense transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mbDateYesTransaction date (YYYY-MM-DD)
assetIdYesAsset/Account ID
payTypeYesPayment type name
mcidYesCategory ID
mbCategoryYesCategory name
mbCashYesAmount
inOutCodeYes0=Income, 1=Expense
inOutTypeYesTransaction type name
mcscidNoOptional: Subcategory ID
subCategoryNoOptional: Subcategory name
mbContentNoOptional: Description
mbDetailContentNoOptional: Detailed notes

Implementation Reference

  • The main handler function that executes the transaction_create tool logic: validates input schema, posts to /create API endpoint, and returns operation response.
    /**
     * Handler for transaction_create tool
     * Creates a new income or expense transaction
     */
    export async function handleTransactionCreate(
      httpClient: HttpClient,
      input: unknown,
    ): Promise<TransactionOperationResponse> {
      const validated = TransactionCreateInputSchema.parse(input);
    
      const response = await httpClient.post<ApiOperationResponse>("/create", {
        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: response.id,
        message: response.message,
      };
    }
  • Zod input schema definition (TransactionCreateInputSchema) and type for validating transaction_create tool parameters.
    /**
     * Input schema for transaction_create tool
     */
    export const TransactionCreateInputSchema = z.object({
      mbDate: DateSchema,
      assetId: AssetIdSchema,
      payType: NonEmptyString,
      mcid: CategoryIdSchema,
      mbCategory: NonEmptyString,
      mbCash: PositiveNumber,
      inOutCode: InOutCodeSchema,
      inOutType: NonEmptyString,
      mcscid: z.string().optional(),
      subCategory: z.string().optional(),
      mbContent: z.string().optional(),
      mbDetailContent: z.string().optional(),
    });
    
    export type TransactionCreateInput = z.infer<
      typeof TransactionCreateInputSchema
    >;
  • Registration of the handleTransactionCreate handler in the toolHandlers map used to execute tools by name.
    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:72-115 (registration)
    MCP tool registration in TOOL_DEFINITIONS array, including name, description, and JSON input schema.
    {
      name: "transaction_create",
      description: "Creates a new income or expense transaction.",
      inputSchema: {
        type: "object" as const,
        properties: {
          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",
            enum: ["0", "1"],
            description: "0=Income, 1=Expense",
          },
          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: [
          "mbDate",
          "assetId",
          "payType",
          "mcid",
          "mbCategory",
          "mbCash",
          "inOutCode",
          "inOutType",
        ],
      },
    },
  • Schema registry (ToolSchemas) mapping tool names to their Zod schemas, including transaction_create.
    export const ToolSchemas = {
      // Initialization
      init_get_data: InitGetDataInputSchema,
    
      // Transactions
      transaction_list: TransactionListInputSchema,
      transaction_create: TransactionCreateInputSchema,
      transaction_update: TransactionUpdateInputSchema,
      transaction_delete: TransactionDeleteInputSchema,
    
      // Summary
      summary_get_period: SummaryGetPeriodInputSchema,
      summary_export_excel: SummaryExportExcelInputSchema,
    
      // Assets
      asset_list: AssetListInputSchema,
      asset_create: AssetCreateInputSchema,
      asset_update: AssetUpdateInputSchema,
      asset_delete: AssetDeleteInputSchema,
    
      // Credit Cards
      card_list: CardListInputSchema,
      card_create: CardCreateInputSchema,
      card_update: CardUpdateInputSchema,
    
      // Transfers
      transfer_create: TransferCreateInputSchema,
      transfer_update: TransferUpdateInputSchema,
    
      // Dashboard
      dashboard_get_overview: DashboardGetOverviewInputSchema,
      dashboard_get_asset_chart: DashboardGetAssetChartInputSchema,
    
      // Backup
      backup_download: BackupDownloadInputSchema,
      backup_restore: BackupRestoreInputSchema,
    } as const;
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. While 'Creates' implies a write/mutation operation, the description doesn't mention permission requirements, whether the operation is idempotent, what happens on validation errors, or what the response looks like. For a creation tool with 12 parameters, this leaves significant behavioral unknowns.

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 that immediately communicates the core purpose without unnecessary words. It's perfectly front-loaded with the essential information. Every word earns its place, making this an excellent example of conciseness.

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 creation tool with 12 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what happens after creation, what validation occurs, or what the return value contains. The agent must rely entirely on the parameter schema without understanding the broader transactional context or behavioral expectations.

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?

The input schema has 100% description coverage, providing clear documentation for all 12 parameters including enum values for 'inOutCode'. The description adds no parameter-specific information beyond what's already in the schema. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the verb ('Creates') and resource ('new income or expense transaction'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'transfer_create' or 'card_create' which also create financial records, leaving some ambiguity about when to choose this specific creation tool.

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?

The description provides no guidance about when to use this tool versus alternatives like 'transfer_create' or 'card_create'. There's no mention of prerequisites, constraints, or typical use cases. The agent must infer usage from the tool name alone, which is insufficient for optimal tool selection.

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