Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

asset_create

Add new financial accounts or assets to track balances and organize personal finances in the Money Manager system.

Instructions

Creates a new asset/account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetGroupIdYesAsset group ID
assetGroupNameYesAsset group name
assetNameYesAsset name
assetMoneyYesInitial balance
linkAssetIdNoOptional: Linked asset ID
linkAssetNameNoOptional: Linked asset name

Implementation Reference

  • The main handler function for the asset_create tool. Validates input using AssetCreateInputSchema and makes a POST request to the /assetAdd API endpoint to create a new asset.
    /** * Handler for asset_create tool * Creates a new asset/account */ export async function handleAssetCreate( httpClient: HttpClient, input: unknown, ): Promise<AssetOperationResponse> { const validated = AssetCreateInputSchema.parse(input); const response = await httpClient.post<ApiOperationResponse>("/assetAdd", { assetGroupId: validated.assetGroupId, assetGroupName: validated.assetGroupName, assetName: validated.assetName, assetMoney: validated.assetMoney, linkAssetId: validated.linkAssetId || "", linkAssetName: validated.linkAssetName || "", }); return { success: response.success !== false && response.result !== "fail", assetId: response.assetId, message: response.message, }; }
  • Zod schema definition for validating input parameters of the asset_create tool, including assetGroupId, assetGroupName, assetName, assetMoney, and optional link fields.
    /** * Input schema for asset_create tool */ export const AssetCreateInputSchema = z.object({ assetGroupId: NonEmptyString, assetGroupName: NonEmptyString, assetName: NonEmptyString, assetMoney: z.number(), linkAssetId: z.string().optional(), linkAssetName: z.string().optional(), }); export type AssetCreateInput = z.infer<typeof AssetCreateInputSchema>;
  • src/index.ts:224-245 (registration)
    MCP tool registration in the TOOL_DEFINITIONS array, defining the name, description, and inputSchema for the asset_create tool.
    { name: "asset_create", description: "Creates a new asset/account.", inputSchema: { type: "object" as const, properties: { assetGroupId: { type: "string", description: "Asset group ID" }, assetGroupName: { type: "string", description: "Asset group name" }, assetName: { type: "string", description: "Asset name" }, assetMoney: { type: "number", description: "Initial balance" }, linkAssetId: { type: "string", description: "Optional: Linked asset ID", }, linkAssetName: { type: "string", description: "Optional: Linked asset name", }, }, required: ["assetGroupId", "assetGroupName", "assetName", "assetMoney"], }, },
  • Internal tool handler registry mapping 'asset_create' to the handleAssetCreate function.
    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;
  • TypeScript interface definition for AssetCreateInput used in conjunction with the Zod schema.
    */ export interface AssetCreateInput { assetGroupId: string; assetGroupName: string; assetName: string; assetMoney: number; linkAssetId?: string; linkAssetName?: string; }

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