Skip to main content
Glama
JosueM1109

personal-finance-mcp

Get Recurring Transactions

get_recurring_transactions
Read-only

Retrieves recurring income and expense streams from linked bank accounts, breaking them into inflows and outflows for financial planning.

Instructions

Return recurring inflow and outflow streams across all linked Items.

Calls /accounts/get first per Item to collect account IDs (required by /transactions/recurring/get), then fetches recurring streams and shapes them into unified inflows/outflows lists.

Returns: {"inflows": [...], "outflows": [...], "warnings": [...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of get_recurring_transactions. Calls Plaid's /accounts/get per Item to collect account IDs, then fetches recurring streams via /transactions/recurring/get. Returns unified inflows/outflows lists with warnings for unhealthy Items or API errors.
    def _get_recurring_transactions_impl() -> dict:
        """Return recurring inflow and outflow streams across all linked Items.
    
        Calls /accounts/get first per Item to collect account IDs (required by
        /transactions/recurring/get), then fetches recurring streams and shapes
        them into unified inflows/outflows lists.
    
        Returns:
            {"inflows": [...], "outflows": [...], "warnings": [...]}
        """
        api = build_api()
        inflows: list[dict] = []
        outflows: list[dict] = []
        warnings: list[dict] = []
        for env_key, token, health in all_items(api):
            if health.status != "healthy":
                warnings.append(_warning_from_health(health))
                continue
            try:
                acct_resp = api.accounts_get(
                    AccountsGetRequest(access_token=token.reveal())
                ).to_dict()
                account_ids = [a["account_id"] for a in acct_resp.get("accounts", [])]
                resp = api.transactions_recurring_get(
                    TransactionsRecurringGetRequest(
                        access_token=token.reveal(),
                        account_ids=account_ids,
                    )
                ).to_dict()
                for stream in resp.get("inflow_streams", []) or []:
                    inflows.append(_shape_stream(stream, health.institution_name))
                for stream in resp.get("outflow_streams", []) or []:
                    outflows.append(_shape_stream(stream, health.institution_name))
            except ApiException as e:
                mapped = map_plaid_error(e, health.institution_name)["error"]
                warnings.append({"institution": health.institution_name, **mapped})
        return {"inflows": inflows, "outflows": outflows, "warnings": warnings}
  • server.py:247-250 (registration)
    Registration of the tool with FastMCP. Decorates _get_recurring_transactions_impl with name='get_recurring_transactions' and read-only hint annotation.
    get_recurring_transactions = mcp.tool(
        annotations={"readOnlyHint": True, "title": "Get Recurring Transactions"},
        name="get_recurring_transactions",
    )(_get_recurring_transactions_impl)
  • Helper function _shape_stream that transforms a raw Plaid recurring stream dict into a canonical shape (stream_id, description, merchant, average_amount, frequency, last_date, is_active, category, account_id, institution).
    def _shape_stream(stream: dict, institution: str | None) -> dict:
        avg_amount_obj = stream.get("average_amount") or {}
        pfc = stream.get("personal_finance_category") or {}
        return {
            "stream_id": stream.get("stream_id"),
            "description": stream.get("description"),
            "merchant": stream.get("merchant_name"),
            "average_amount": avg_amount_obj.get("amount"),
            "frequency": stream.get("frequency"),
            "last_date": str(stream.get("last_date")) if stream.get("last_date") else None,
            "is_active": stream.get("is_active"),
            "category": pfc.get("primary"),
            "account_id": stream.get("account_id"),
            "institution": institution,
        }
  • Import of Plaid's TransactionsRecurringGetRequest model used in the handler.
    from plaid.model.transactions_recurring_get_request import TransactionsRecurringGetRequest
Behavior4/5

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

The description discloses internal behavior (calling /accounts/get first) and output shaping, adding value beyond annotations which only indicate readOnlyHint. No contradictions.

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 concise with three sentences and a return block, each sentence earning its place, front-loaded with the main purpose.

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

Completeness5/5

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

Given no parameters and an output schema exists, the description sufficiently covers the tool's behavior, internal API calls, and return shape, with no missing critical information.

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?

No parameters exist (0 params, 100% schema coverage). The description adds meaning by explaining the underlying process, which compensates for the lack of parameter details.

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 returns recurring inflow and outflow streams across all linked Items, with a specific verb and resource that distinguishes it from sibling tools like get_transactions.

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 implies usage for recurring transactions but does not explicitly state when to use this tool vs alternatives like get_transactions or list_accounts. No when-not guidance is provided.

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/JosueM1109/personal-finance-mcp'

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