Skip to content

fix(mcp): answer unknown service names with the services that exist - #341

Merged
vishr merged 1 commit into
mainfrom
fix/agent-service-input
Oct 18, 2026
Merged

vishr merged 1 commit into
mainfrom
fix/agent-service-input

Conversation

@vishr

@vishr vishr commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Summary

  • An investigation on the OpenTelemetry Demo asked get_service_performance for kafka, a messaging system rather than a span service. Every panel came back empty and chat showed an empty view.
  • Service-scoped tools (get_service_performance, get_service_dependencies, search_logs, inspect_trace) run exactly as before. Only when a service was given and every result is empty does the tool check whether the service is retained in the clamped window. An unknown name returns unknown_service with up to ten known services by traffic and, for a messaging system, database or peer, the services that use it.
  • Known services with no matching rows keep their empty results; dependency queries for uninstrumented peers keep returning their edges.

Verification

  • Regression tests for clamped windows, event-time-independent retention, bounded guidance (through ToolRegistry.Execute), and zero membership lookups on populated calls.
  • Cold benchmark (256 retained batches): valid service 146.46 ms baseline vs 146.41 ms; unknown path +149 ms.
  • go test and go test -race on internal/mcp, internal/agent, internal/panel; just docs-generate-check; two Codex adversarial reviews.
  • just check in the pre-push hook.

An investigation on the OpenTelemetry Demo asked get_service_performance
for "kafka", which is a messaging system, not a span service. All four
panels came back empty and chat showed an empty view, so the agent moved
on without the evidence it wanted.

Service-scoped tools still run exactly as before. Only when a service was
given and every result is empty does the tool check whether the service
is retained in the clamped window. An unknown name returns
unknown_service with up to ten known services by traffic and, when the
name is a messaging system, database or peer, the services that use it.
Known services with no matching rows keep their empty results.

Valid calls perform no membership lookup (measured at no added latency);
guidance is bounded so the in-process agent never truncates it.

Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
@vishr
vishr force-pushed the fix/agent-service-input branch from 159f6d3 to 6e6a19b Compare October 18, 2026 01:35
@vishr
vishr merged commit 53fcf7f into main Oct 18, 2026
16 checks passed
@vishr
vishr deleted the fix/agent-service-input branch October 18, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant