Repository navigation
Conversation
A tool that asks a 2026-07-28 client for input returns an input_required round, and the client retries the call with the answers. Both were recorded as successful $mcp_tool_call events, so one confirmed call counted twice. The round now emits $mcp_input_required with the tool name, the round's duration and each request's method, as the sdk-specs MCP analytics spec asks. The retry stays the tool call. PostHog::MCP::Client#capture_input_required records a round for custom dispatchers, and PostHog::MCP.input_request_methods reads the methods off a tool's result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 of 26 tasks
5 of 6 tasks
posthog-ruby-sync Compliance ReportDate: 2026-11-25T15:51:03.866713+00:00 ✅ All Tests Passed!47/47 tests passed Capture Tests✅ 30/30 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
2026-07-28client for confirmation before it runs counts as two successful calls onPostHog::MCPservers.Changes
PostHog::MCP.instrumentsends$mcp_input_requiredfor each round, as the spec defines and the Go SDK does. It carries the tool name, duration and request methods only.PostHog::MCP.input_request_methods(result)reads the round's methods, andPostHog::MCP::Client#capture_input_requiredrecords them.2025-11-25with a session, themcpgem answers the round inside the request, so the call stays one$mcp_tool_call.$mcp_tool_call$mcp_input_required$mcp_tool_call$mcp_tool_callNote
Spec divergence: when the gem ends a
2025-11-25sequence itself (no session, round cap, shim turned off), the call stays a failed$mcp_tool_calltypedMCP::Server::RequestHandlerError, notinput_required. Only the error text tells it apart.Example event and custom dispatcher
{ "event": "$mcp_input_required", "properties": { "$mcp_tool_name": "delete_project", "$mcp_duration_ms": 3.2, "$mcp_input_request_methods": ["roots/list", "elicitation/create"], "$mcp_protocol_version": "2026-07-28", "$session_id": "ses_...", "$mcp_source": "posthog_mcp_analytics" } }💚 How did you test it?
2026-07-28round and retry, arequestState-only round, and the manual API. Turning off detection turns all three red.2025-11-25round the gem answers, which needs a session that can reach the client. Not run against a real MCP client.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
claude-opus-5-5). Skills:debugging-mcp-analytics,writing-pr-descriptions.More context for AI agents
events.mdxtable.ServerExtensionwraps the lambdahandle_requestreturns, which already holds the gem's legacy shim and round serialization, so the wrapper sees the serialized round hash.public_api_snapshot.txtgains the two methods and theINPUT_REQUIREDandINPUT_REQUEST_METHODSconstants.mcp1.7.0, not on 3.2 or 3.4.🤖 Generated with Claude Code