Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,11 @@ TODO.md

# Integration test outputs
test/integration/*.out
test/integration/*.log
test/integration/*.log

# MCP server binary
mcp-monarch
cmd/mcp-server/mcp-monarch

# Test files
test_*.go
13 changes: 13 additions & 0 deletions cmd/mcp-server/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,21 @@ type BudgetEntry struct {
Percentage float64 `json:"percentage" jsonschema:"Percentage of budget spent"`
}

type GoalEntry struct {
ID string `json:"id" jsonschema:"Goal ID"`
Name string `json:"name" jsonschema:"Goal name"`
CurrentBalance float64 `json:"currentBalance" jsonschema:"Current balance toward goal"`
TargetBalance float64 `json:"targetBalance" jsonschema:"Target balance for goal"`
Type string `json:"type" jsonschema:"Goal type"`
PaceType string `json:"paceType,omitempty" jsonschema:"Pace status (on_track, behind, etc.)"`
OriginAccount string `json:"originAccount,omitempty" jsonschema:"Origin account name"`
DestinationAccount string `json:"destinationAccount,omitempty" jsonschema:"Destination account name"`
}

type GetBudgetOutput struct {
Month string `json:"month" jsonschema:"Month of the budget data"`
Budgets []BudgetEntry `json:"budgets" jsonschema:"List of budget entries for each category"`
Goals []GoalEntry `json:"goals,omitempty" jsonschema:"List of goals associated with this budget"`
}

func (t *monarchTools) GetBudget(ctx context.Context, req *mcp.CallToolRequest, input GetBudgetInput) (*mcp.CallToolResult, GetBudgetOutput, error) {
Expand Down Expand Up @@ -72,6 +84,7 @@ func (t *monarchTools) GetBudget(ctx context.Context, req *mcp.CallToolRequest,
return nil, GetBudgetOutput{
Month: input.Month,
Budgets: entries,
Goals: nil, // Goals not currently supported in budget query
}, nil
}

Expand Down
Loading