fix: add optional reason parameter to all tools for MCP compatibility
All checks were successful
Build and Push Monarch MCP Docker Image / build (push) Successful in 10s

This commit is contained in:
Ben
2025-12-24 05:20:30 +00:00
parent 1210cbf6d2
commit 27ef7f0e1e
3 changed files with 20764 additions and 9 deletions

View File

@@ -39,7 +39,7 @@ def serialize_json(data: Any) -> str:
@mcp.tool()
async def get_accounts() -> str:
async def get_accounts(reason: Optional[str] = None) -> str:
"""Get all financial accounts from Monarch Money."""
try:
client = await get_authenticated_client()
@@ -112,7 +112,7 @@ async def get_transactions(
@mcp.tool()
async def get_budgets() -> str:
async def get_budgets(reason: Optional[str] = None) -> str:
"""Get current budget information."""
try:
client = await get_authenticated_client()
@@ -137,7 +137,7 @@ async def get_budgets() -> str:
@mcp.tool()
async def get_account_holdings(account_id: str) -> str:
async def get_account_holdings(account_id: str, reason: Optional[str] = None) -> str:
"""Get investment holdings for a specific account."""
try:
client = await get_authenticated_client()
@@ -150,7 +150,7 @@ async def get_account_holdings(account_id: str) -> str:
@mcp.tool()
async def refresh_accounts() -> str:
async def refresh_accounts(reason: Optional[str] = None) -> str:
"""Request a refresh of account data from financial institutions."""
try:
client = await get_authenticated_client()