Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

card_create

Create a new credit card in Money Manager by specifying card details, linking payment assets, and setting balance and payment parameters for financial tracking.

Instructions

Creates a new credit card.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cardNameYesCredit card name
linkAssetIdYesLinked payment asset ID
linkAssetNameYesLinked payment asset name
notPayMoneyYesUnpaid balance (negative value)
jungsanDayNoOptional: Balance calculation day (1-31)
paymentDayNoOptional: Payment due day (1-31)

Implementation Reference

  • The handleCardCreate function implements the core logic for the card_create tool. It validates the input using CardCreateInputSchema, sends a POST request to the '/addAssetCard' endpoint with the card details, and returns a CardOperationResponse indicating success and the new card ID.
    /** * Handler for card_create tool * Creates a new credit card */ export async function handleCardCreate( httpClient: HttpClient, input: unknown, ): Promise<CardOperationResponse> { const validated = CardCreateInputSchema.parse(input); const response = await httpClient.post<ApiOperationResponse>( "/addAssetCard", { cardName: validated.cardName, linkAssetId: validated.linkAssetId, linkAssetName: validated.linkAssetName, notPayMoney: validated.notPayMoney, jungsanDay: validated.jungsanDay, paymentDay: validated.paymentDay, }, ); return { success: response.success !== false && response.result !== "fail", cardId: response.cardId || response.assetId, message: response.message, }; }
  • Zod schema defining the input parameters for the card_create tool, including validation rules for card name, linked asset, unpaid balance, and optional settlement/payment days. Also exports the inferred TypeScript type.
    /** * Input schema for card_create tool */ export const CardCreateInputSchema = z.object({ cardName: NonEmptyString, linkAssetId: AssetIdSchema, linkAssetName: NonEmptyString, notPayMoney: z.number(), jungsanDay: DayOfMonthSchema.optional(), paymentDay: DayOfMonthSchema.optional(), }); export type CardCreateInput = z.infer<typeof CardCreateInputSchema>;
  • src/index.ts:296-322 (registration)
    MCP tool registration in TOOL_DEFINITIONS array: defines the 'card_create' tool with name, description, and JSON schema for input validation, used by the MCP server's list_tools handler.
    { name: "card_create", description: "Creates a new credit card.", inputSchema: { type: "object" as const, properties: { cardName: { type: "string", description: "Credit card name" }, linkAssetId: { type: "string", description: "Linked payment asset ID" }, linkAssetName: { type: "string", description: "Linked payment asset name", }, notPayMoney: { type: "number", description: "Unpaid balance (negative value)", }, jungsanDay: { type: "number", description: "Optional: Balance calculation day (1-31)", }, paymentDay: { type: "number", description: "Optional: Payment due day (1-31)", }, }, required: ["cardName", "linkAssetId", "linkAssetName", "notPayMoney"], },
  • Internal registration mapping 'card_create' string key to the handleCardCreate handler function within the toolHandlers object, used by executeToolHandler to dispatch calls.
    card_list: handleCardList, card_create: handleCardCreate, card_update: handleCardUpdate,

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