Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

trigger_plaid_fetch

Fetch updated transactions from Plaid, with optional date range and account filter. Requests require a 60-second interval.

Instructions

Trigger a fetch of latest data from Plaid. Optionally scope the fetch to a date range and/or a specific Plaid account ID. Note: Plaid enforces a minimum 60-second delay between fetch requests; fetching may take up to 5 minutes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNoBeginning of the date range to fetch transactions for (YYYY-MM-DD). Required if end_date is set.
end_dateNoEnd of the date range to fetch transactions for (YYYY-MM-DD). Required if start_date is set.
idNoIf set, only fetch the specified Plaid account; otherwise all eligible accounts are fetched.

Implementation Reference

  • The async handler function that triggers a Plaid fetch. Builds query params (start_date, end_date, id) and POSTs to /plaid_accounts/fetch with query string. Returns success message or handles errors.
        async ({ start_date, end_date, id }) => {
            try {
                const params = new URLSearchParams();
                if (start_date) params.append("start_date", start_date);
                if (end_date) params.append("end_date", end_date);
                if (id !== undefined) params.append("id", String(id));
    
                const qs = params.toString();
                const response = await api.post(
                    `/plaid_accounts/fetch${qs ? `?${qs}` : ""}`,
                );
    
                if (!response.ok) {
                    return handleApiError(
                        response,
                        "Failed to trigger Plaid fetch",
                    );
                }
    
                return successResponse(
                    "Plaid fetch accepted. Fetching may take up to 5 minutes; query get_all_plaid_accounts to check plaid_last_successful_update / last_import.",
                );
            } catch (error) {
                return catchError(error, "Failed to trigger Plaid fetch");
            }
        },
    );
  • The input schema (Zod-based) for trigger_plaid_fetch, defining optional start_date (YYYY-MM-DD), end_date (YYYY-MM-DD), and id (number for a specific Plaid account).
    inputSchema: {
        start_date: z
            .string()
            .optional()
            .describe(
                "Beginning of the date range to fetch transactions for (YYYY-MM-DD). Required if end_date is set.",
            ),
        end_date: z
            .string()
            .optional()
            .describe(
                "End of the date range to fetch transactions for (YYYY-MM-DD). Required if start_date is set.",
            ),
        id: z.coerce
            .number()
            .optional()
            .describe(
                "If set, only fetch the specified Plaid account; otherwise all eligible accounts are fetched.",
            ),
    },
  • Registration of the tool named 'trigger_plaid_fetch' via server.registerTool() with description and annotations (openWorldHint).
    server.registerTool(
        "trigger_plaid_fetch",
  • src/index.ts:32-32 (registration)
    Top-level entry point that calls registerPlaidAccountTools(server) to register all Plaid account tools including trigger_plaid_fetch.
    registerPlaidAccountTools(server);
  • The api.post() helper used by the handler to make the HTTP POST request to the LunchMoney API.
    export const api = {
        get: (path: string) => apiRequest("GET", path),
        post: (path: string, body?: unknown) => apiRequest("POST", path, body),
        put: (path: string, body: unknown) => apiRequest("PUT", path, body),
        delete: (path: string, body?: unknown) => apiRequest("DELETE", path, body),
        upload: (path: string, formData: FormData) =>
            apiUpload("POST", path, formData),
    };
Behavior4/5

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

The description adds significant behavioral context beyond the openWorldHint annotation: it discloses the enforced 60-second minimum delay between fetch requests and the up-to-5-minute fetch time. This helps the agent manage expectations and avoid misuse. No contradictions with annotations.

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 two sentences with no wasted words. It front-loads the action and includes critical timing constraints efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks detail about what happens after the fetch (e.g., what data is updated, how to retrieve it) and does not mention failure cases or how the system reflects the fetched data. Given no output schema, more context on outcomes would be beneficial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description groups the parameters into a coherent scoping sentence ('Optionally scope the fetch to a date range and/or a specific Plaid account ID'), adding value beyond the individual schema descriptions. This aids understanding of how parameters work together.

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

Purpose5/5

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

The description clearly states the tool triggers a fetch of latest data from Plaid, and distinguishes it from sibling tools that are CRUD operations (e.g., get_transactions, create_category). It also specifies optional scoping to date range and account ID, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implicit guidance by noting the 60-second delay and fetch duration, but does not explicitly state when to use this tool versus alternatives. Since there are no other fetch tools, the context is partially clear but not fully explicit about best practices.

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/akutishevsky/lunchmoney-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server