Skip to main content
Glama
shahlaukik

Money Manager MCP Server

by shahlaukik

transaction_delete

Remove unwanted or incorrect financial transactions from your Money Manager records to maintain accurate personal finance tracking.

Instructions

Deletes one or more transactions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of transaction IDs to delete

Implementation Reference

  • The main handler function that validates input using TransactionDeleteInputSchema, formats transaction IDs for the Money Manager API, calls the /delete endpoint, and returns operation success status with deleted count.
    /** * Handler for transaction_delete tool * Deletes one or more transactions */ export async function handleTransactionDelete( httpClient: HttpClient, input: unknown, ): Promise<TransactionOperationResponse> { const validated = TransactionDeleteInputSchema.parse(input); // Format IDs as colon-separated string (API expects ":id1:id2:id3" format) const idsString = ":" + validated.ids.join(":"); const response = await httpClient.post<ApiOperationResponse>("/delete", { ids: idsString, }); return { success: response.success !== false && response.result !== "fail", deletedCount: validated.ids.length, message: response.message, }; }
  • Zod schema defining the input: an array of non-empty transaction ID strings, requiring at least one ID.
    /** * Input schema for transaction_delete tool */ export const TransactionDeleteInputSchema = z.object({ ids: z .array(TransactionIdSchema) .min(1, "At least one transaction ID is required"), }); export type TransactionDeleteInput = z.infer< typeof TransactionDeleteInputSchema >;
  • src/index.ts:158-172 (registration)
    MCP tool definition in TOOL_DEFINITIONS array, including name, description, and basic JSON schema for input validation in the protocol.
    { name: "transaction_delete", description: "Deletes one or more transactions.", inputSchema: { type: "object" as const, properties: { ids: { type: "array", items: { type: "string" }, description: "Array of transaction IDs to delete", }, }, required: ["ids"], }, },
  • Maps the 'transaction_delete' tool name to its handler function in the toolHandlers registry, used by executeToolHandler.
    transaction_delete: handleTransactionDelete,
  • Registers the input schema in ToolSchemas object for validation lookup by tool name.
    transaction_delete: TransactionDeleteInputSchema,

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