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,
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Deletes' implies a destructive mutation, the description doesn't specify whether deletions are permanent/reversible, require specific permissions, have rate limits, or affect related data. For a destructive tool with zero annotation coverage, this leaves significant behavioral gaps.

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 wasted words. It's appropriately sized for a simple deletion tool and front-loads the essential information ('Deletes one or more transactions').

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 destructive mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address critical context like what happens after deletion (confirmation, error handling), whether deletions cascade to related records, or what permissions are required. The combination of destructive operation + minimal structured data demands more descriptive context.

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 schema description coverage is 100%, with the single parameter 'ids' clearly documented in the schema as 'Array of transaction IDs to delete'. The description adds no additional parameter semantics beyond what the schema already provides, so it meets the baseline for high schema coverage without adding value.

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 action ('Deletes') and resource ('one or more transactions'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'asset_delete' or explain what differentiates transaction deletion from asset deletion, which prevents a perfect score.

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 on when to use this tool versus alternatives like 'transaction_update' or 'asset_delete'. There's no mention of prerequisites, consequences, or appropriate contexts for deletion versus other operations on transactions or related resources.

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