#1911·kubeshark

Add MCP tool to query currently-targeted workloads

Author: alongirCreated Apr 17, 2026Updated Apr 26, 2026
Labelsproduct

Description

Add a new MCP tool that returns the set of workloads currently being targeted (captured) by Kubeshark. Hub already exposes an API for this — the MCP tool should wrap that API and surface the list to agents.

Why Is This Needed?

Agents frequently query MCP for API calls (L7 traffic) against specific workloads. When no results come back, the response is ambiguous: it may mean (a) no matching traffic occurred, or (b) the workloads in question are not currently being captured at all. Without a way to distinguish these cases, MCP produces false negatives that mislead agents and users.

By exposing the currently-targeted workload list as a dedicated MCP tool, agents can verify coverage before issuing a traffic query. If a workload isn't targeted, the agent can adjust its query or surface the coverage gap to the user instead of reporting a false "no API calls" result.

Additional Context

  • Hub already exposes an API that returns the currently-targeted workloads; the MCP tool should delegate to it rather than re-implementing the lookup.
  • Agents should be guided (via tool description / system prompt) to consult this tool before running traffic queries that depend on workload targeting.

Impacted Repositories

  • kubeshark