Skip to content

feat(log-service): split diagnostic timeline into telemetry-service - #118

Merged
prdai merged 10 commits into
mainfrom
feat/issue-95-log-service
Nov 17, 2026
Merged

prdai merged 10 commits into
mainfrom
feat/issue-95-log-service

Conversation

@prdai

@prdai prdai commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

what changed

  • Add a Tools (MCP) section to the playground configuration: enter an existing MCP server URL plus an optional Authorization header, discover its tools, and select the ones to send.
  • Send selected tools in all three playground formats: Chat Completions (tools), Responses (tools), and Anthropic Messages (tools). The chat route also forwards tool_choice.
  • Render tool calls in the transcript as their arguments stream, with a Run action that invokes the tool through the gateway and shows the result. Completed calls and results are replayed in the next request in each format.
  • Add /internal/playground/mcp/tools and /internal/playground/mcp/call, backed by a small Streamable HTTP MCP client (initialize, tools/list, tools/call).

why

The playground forwards tools on the public paths already, but the UI had no way to attach or run them. Issue #1780.

MCP has no registry or relay in the gateway after the cloud-agent split, so the playground connects to an existing server by URL instead of inventing one.

verification

  • uv run pytest -q tests/unit/servers/test_playground_mcp.py tests/unit/servers/test_playground_access.py passes (29 tests).
  • uv run pytest -q tests/unit/servers tests/unit/test_internal_api_reachable.py passes except the known order-dependent deep-health suites; those pass in isolation.
  • Playground frontend suites: 111 tests pass. tsc -p tsconfig.generated.json --noEmit and eslint on the playground directory are clean.
  • Manually exercised the full flow in a local example stack with a local Streamable HTTP MCP server: connected the server, discovered two tools, selected get_weather, the upstream emitted a tool call, Run executed it, and the result was replayed on the next turn.
  • Not verified: a live deployment and a real remote MCP server. Full npm test has 48 failures in unrelated localStorage/IndexedDB suites (CreateBatchView, Users*), not touched here.

screenshots and recording

Dark console: the tool call arrives with its streamed arguments, before it runs.

Tool call with Run

The result after Run, and the next turn replaying that result:

Tool result

Follow-up using the tool result

Light console, same flow:

MCP tools in the light console

Recording: clear, send, tool call, Run, result.

playground-mcp-demo.mp4

The demo uses a local example deployment whose deterministic upstream emits a get_weather tool call, and a local MCP server exposing get_weather and search_docs.

notes

  • The MCP URL is caller-supplied and the proxy is open to the internal role, so it can reach private and loopback hosts. Cloud metadata endpoints are refused, including names that resolve to them. An allowlist for arbitrary private hosts is a follow-up.
  • Legacy HTTP+SSE MCP transport (pre-Streamable HTTP) is not supported.
  • Tool names are sent under a wire-safe alias; the real MCP name is restored for tools/call.

@prdai
prdai marked this pull request as ready for review November 17, 2026 02:55
@prdai
prdai merged commit 97194cb into main Nov 17, 2026
38 checks passed
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