Show the strategy of each catch in the dashboard
Add a Strategie column to the catch list (searchable, filterable) and a Strategien tab to the Top 10 card. The MCP top tool accepts strategies. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7d3e6f8842
commit
b7027e2a72
15 files changed
+83
-24
No files matched your search
@@ -62,8 +62,8 @@ public sealed class FlypaperTools(CatchQueries queries, IConnectionGovernor gove
|
||||
[McpServerTool(Name = "top", Title = "Top values", ReadOnly = true, Destructive = false, Idempotent = true, OpenWorld = false, UseStructuredContent = true)]
|
||||
[Description("Most frequent values among the catches of a time window, by number of catches. Rejected connections are not counted.")]
|
||||
public async Task<TopResult> Top(
|
||||
[Description("What to rank by: ips, countries, providers, targets or user_agents.")]
|
||||
[AllowedValues("ips", "countries", "providers", "targets", "user_agents")]
|
||||
[Description("What to rank by: ips, countries, providers, targets, strategies or user_agents.")]
|
||||
[AllowedValues("ips", "countries", "providers", "targets", "strategies", "user_agents")]
|
||||
string dimension,
|
||||
[Description(PeriodDescription)] string period = "24h",
|
||||
[Description("Number of entries, 1 to 500.")] int limit = 10,
|
||||
@@ -75,8 +75,9 @@ public sealed class FlypaperTools(CatchQueries queries, IConnectionGovernor gove
|
||||
"countries" => TopDimension.Countries,
|
||||
"providers" => TopDimension.Providers,
|
||||
"targets" => TopDimension.Targets,
|
||||
"strategies" => TopDimension.Strategies,
|
||||
"user_agents" => TopDimension.UserAgents,
|
||||
_ => throw new McpException("dimension must be one of ips, countries, providers, targets, user_agents.")
|
||||
_ => throw new McpException("dimension must be one of ips, countries, providers, targets, strategies, user_agents.")
|
||||
};
|
||||
|
||||
var items = await queries.TopAsync(parsed, Since(period), limit, ct);
|
||||
|
||||
Reference in new issue
Block a user