274569bd79
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
751 B
C#
24 lines
751 B
C#
using System.ComponentModel;
|
|
using ModelContextProtocol.Server;
|
|
|
|
namespace MoneyMap.Mcp.Tools;
|
|
|
|
[McpServerToolType]
|
|
public static class AccountTools
|
|
{
|
|
[McpServerTool(Name = "list_accounts"), Description("List all accounts with transaction counts.")]
|
|
public static async Task<string> ListAccounts(
|
|
MoneyMapApiClient api = default!)
|
|
{
|
|
return await api.ListAccountsAsync();
|
|
}
|
|
|
|
[McpServerTool(Name = "list_cards"), Description("List all cards with account info and transaction counts.")]
|
|
public static async Task<string> ListCards(
|
|
[Description("Filter cards by account ID")] int? accountId = null,
|
|
MoneyMapApiClient api = default!)
|
|
{
|
|
return await api.ListCardsAsync(accountId);
|
|
}
|
|
}
|