Skip to content

feat(eval): query_logs tool selection on hosted-shaped platform - #100

Draft
jordienr wants to merge 3 commits into
fix/claude-code-mcp-tool-endpointfrom
claude/log-tool-selection-eval
Draft

feat(eval): query_logs tool selection on hosted-shaped platform#100
jordienr wants to merge 3 commits into
fix/claude-code-mcp-tool-endpointfrom
claude/log-tool-selection-eval

Conversation

@jordienr

@jordienr jordienr commented Jul 21, 2026

Copy link
Copy Markdown
Member

What

One MCP-mode eval verifying the agent successfully uses query_logs to investigate edge function logs on a hosted-shaped platform-lite fixture:

  • investigate-logs-002-query-logs-tool-selection — asserts query_logs was called (and get_logs was not), scored deterministically on ctx.toolCalls[].endpoint.

Why

Review feedback on supabase/mcp#333 (Rodriguespn): "curious if the agent will correctly call query_logs when working with the hosted version ... we should have an eval scenario." That PR now hides get_logs from tools/list whenever the platform implements queryLogs (registration-driven, not description-driven), so this exercises query_logs end-to-end on the fixture where it's the only logs tool listed.

Dropped: the self-hosted arm

The original version of this PR also had investigate-logs-003-tool-selection-self-hosted, asserting the agent uses get_logs (not query_logs) on a self-hosted-shaped platform. That scenario is untestable through this harness and has been removed:

supabaseMcpServer() (packages/core/src/index.ts) always spawns npx @supabase/mcp-server-supabase@<version> --api-url <backend>, which always constructs its platform via createSupabaseApiPlatform() (packages/mcp-server-supabase/src/platform/api-platform.ts). That implementation defines queryLogs unconditionally — it doesn't vary by --api-url, including when pointed at platform-lite. The actual self-hosted/CLI behavior (get_logs-only) comes from a different, external SupabasePlatform implementation (the CLI's own adapter) that this harness never spawns. There's no way to make the spawned server lack queryLogs from evals today.

That registration behavior is already covered by supabase/mcp's own unit tests (server.test.ts: "debugging tools show get_logs when the platform does not implement query_logs"; debugging-tools.test.ts). If we want a real evals-level self-hosted check in the future, @supabase/mcp-server-supabase would need some way to force a queryLogs-less platform for testing (e.g. a flag or a local-stack-shaped runtime), which is out of scope here.

Still blocked — not runnable yet

query_logs only exists in unmerged supabase/mcp#333. MCP_SERVER_VERSION here is pinned to a version without it, so this eval can't pass until:

  1. feat!: add query_logs tool for custom log queries mcp#333 merges and a new @supabase/mcp-server-supabase version ships query_logs, and
  2. MCP_SERVER_VERSION is bumped to that version in packages/core/src/index.ts.

Validated with pnpm eval:dry (loads, parses, plans as mode=tools runtime=platform-lite). Not executed — needs the version bump above.

…hosted)

Two MCP-mode evals asserting description-driven log tool selection:
- hosted project -> query_logs
- self-hosted project -> get_logs

From supabase/mcp#333 review feedback (Rodriguespn). Blocked on query_logs
shipping in a released @supabase/mcp-server-supabase version and bumping
MCP_SERVER_VERSION in this repo; not runnable until then.
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
evals Ignored Ignored Preview Aug 6, 2026 4:51pm

Request Review

@Rodriguespn Rodriguespn added the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Aug 5, 2026
@Rodriguespn Rodriguespn removed the run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes label Aug 5, 2026
The self-hosted scenario assumed the evals harness could simulate a
platform without ClickHouse-backed query_logs support, but
supabaseMcpServer() always spawns @supabase/mcp-server-supabase against
api-platform.ts, which implements queryLogs unconditionally regardless of
--api-url. There is no way to exercise the get_logs-only arm through this
harness; that behavior is already covered by supabase/mcp's own unit tests
(server.test.ts, debugging-tools.test.ts).

Keep and rename the hosted scenario, since query_logs is now the only
listed logs tool on the platform-lite fixture (get_logs is hidden), so this
verifies query_logs works end-to-end rather than a two-tool choice.
@jordienr jordienr changed the title feat(eval): log tool selection — query_logs (hosted) vs get_logs (self-hosted) feat(eval): query_logs tool selection on hosted-shaped platform Aug 6, 2026
@Rodriguespn
Rodriguespn changed the base branch from main to fix/claude-code-mcp-tool-endpoint August 7, 2026 14:13
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.

2 participants