Skip to content

Add budget creation tool #40

@RadCod3

Description

@RadCod3

Feature Request

Add a create_budget MCP tool to enable creating new budgets directly through LamPyrid, completing the budget management feature set.

Motivation

Currently, LamPyrid supports comprehensive budget management through 5 tools:

  • list_budgets: List all budgets with filtering
  • get_budget: Get budget details
  • get_budget_spending: Analyze budget spending
  • get_budget_summary: Comprehensive budget overview
  • get_available_budget: Query available budget amounts

However, users cannot create new budgets through LamPyrid - they must use the Firefly III web interface. Adding budget creation would enable:

  • Fully automated budget management workflows
  • Creating budgets as part of setup scripts or automations
  • Dynamic budget creation based on spending analysis
  • Complete budget lifecycle management within MCP

Proposed Implementation

Add a new create_budget tool to tools/budgets.py that supports:

Parameters:

  • name (required): Budget name
  • auto_budget_type (optional): Auto-budget type - "none", "fixed", "rollover", or "adjusted"
  • auto_budget_amount (optional): Amount for auto-budgeting
  • auto_budget_period (optional): Period for auto-budgeting - "daily", "weekly", "monthly", etc.
  • auto_budget_currency_code (optional): Currency code (default: EUR)
  • active (optional): Whether budget is active (default: true)
  • notes (optional): Additional notes

API Endpoint:

  • POST /v1/budgets (operationId: storeBudget from firefly-iii-6.4.14-v1.yaml:7602)

Example Usage

# Create a simple monthly budget
grocery_budget = await create_budget(
    name="Groceries",
    auto_budget_type="fixed",
    auto_budget_amount=600.0,
    auto_budget_period="monthly"
)

# Create a quarterly rollover budget
vacation_budget = await create_budget(
    name="Vacation Fund",
    auto_budget_type="rollover",
    auto_budget_amount=300.0,
    auto_budget_period="monthly",
    notes="Save for annual vacation"
)

Benefits

  • Completes budget management CRUD operations
  • Enables fully automated budget workflows
  • Maintains consistency with other tool domains (accounts, transactions all have create operations)
  • Supports advanced auto-budgeting features

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions