274569bd79
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
1.1 KiB
C#
27 lines
1.1 KiB
C#
using System.ComponentModel;
|
|
using ModelContextProtocol.Server;
|
|
|
|
namespace MoneyMap.Mcp.Tools;
|
|
|
|
[McpServerToolType]
|
|
public static class DashboardTools
|
|
{
|
|
[McpServerTool(Name = "get_dashboard"), Description("Get dashboard overview: top spending categories, recent transactions, and aggregate stats.")]
|
|
public static async Task<string> GetDashboard(
|
|
[Description("Number of top categories to show (default 8)")] int? topCategoriesCount = null,
|
|
[Description("Number of recent transactions to show (default 20)")] int? recentTransactionsCount = null,
|
|
MoneyMapApiClient api = default!)
|
|
{
|
|
return await api.GetDashboardAsync(topCategoriesCount, recentTransactionsCount);
|
|
}
|
|
|
|
[McpServerTool(Name = "get_monthly_trend"), Description("Get month-over-month spending totals for trend analysis.")]
|
|
public static async Task<string> GetMonthlyTrend(
|
|
[Description("Number of months to include (default 6)")] int? months = null,
|
|
[Description("Filter to a specific category")] string? category = null,
|
|
MoneyMapApiClient api = default!)
|
|
{
|
|
return await api.GetMonthlyTrendAsync(months, category);
|
|
}
|
|
}
|