ADR-0012: One send_feedback virtual tool, one $mcp_feedback event
- Status: Accepted
- Date: 2026-09-09
Context
Server owners need a generic way to collect feedback from agents. An agent experiences the whole session — every tool call, every retry, every moment of confusion — and that perspective never reaches the server owner: a capability gap produces no tool call at all, a confusing schema produces a workaround, and a helpful tool produces silence. The SDK's only feedback affordance was the get_more_tools virtual tool (ADR-0002), which covers exactly one category (missing capabilities) and whose name promises tool retrieval it does not deliver.
The MCP spec offers no feedback primitive (2026-07-28 core: logging, isError, OTel trace context; an opt-in feedback capability is only community proposal modelcontextprotocol#2369), so a tool call remains the only agent-initiated channel.
Decision
Add a new send_feedback virtual tool behind a new collectFeedback option, emitting a new $mcp_feedback event. reportMissing / get_more_tools / $mcp_missing_capability stay exactly as they are — existing consumers depend on them.
- One tool, honest strings.
feedback_type(missing_capability|issue|praise|other) routes the report; a capability the agent needed that no tool provides is the first category the description lists ("a capability you needed that no tool provides, a tool that failed or misled you, or something that worked well"). The description and the acknowledgement both say the tool records feedback and adds no tools. - One event. Every call emits
$mcp_feedbackwith$mcp_feedback_typeas a property. Split routing (missing-capability reports into the existing$mcp_missing_capability) was rejected: one tool emitting two events is surprising, "all feedback" queries must union anyway, agent misclassification would contaminate the flagship event, and property filters give the same query power.$mcp_missing_capabilityremains exclusively theget_more_toolsevent. - Host-extensible schema.
extraPropertiesmerges plain JSON-Schema fragments into the advertised input schema; declared extras are captured as$mcp_feedback_<key>through the standard sanitize/bound pipeline, undeclared arguments reach only the handler'sraw. Reserved keys (core fields,type/toolwhose prefixed property would collide, SDK-injected arguments) fail at configuration time. - A real backend is a handler away. By default the tool is virtual (analytics event + acknowledgement). On the
instrument()path,onFeedbackroutes reports to the host's own backend and can replace the reply. On the custom-dispatcher path the host is the handler:prepareToolCall().isFeedback/feedbackReport,captureFeedback(),sendFeedbackResult(). - Same virtual-tool mechanics as ADR-0002. Appended via
tools/list, detected by resolved name + not-advertised-by-the-app, fail-open on real-tool name collisions, ownership resolved statically for stateless instances,llm_model/conversation_idinterplay unchanged, and the globalcontextparameter is not injected (the report's summary/details carry the intent).
Consequences
- Free-text feedback fields are agent-narrated, so they get the
$mcp_intenttreatment (sanitize, structured-PII redaction, length bound) before capture;event.propertiesbypasses the event-level pipeline, so this happens at build time infeedback.ts. send_feedbackcovers whatreportMissingcovers. New integrations should enable onlycollectFeedback; consumers of$mcp_missing_capabilitysee onlyget_more_toolsreports and must additionally read$mcp_feedbackwith$mcp_feedback_type = "missing_capability"once servers adopt the new tool.- Dashboards must treat
$mcp_feedbackseparately from$mcp_tool_call, the same rule ADR-0002 set for$mcp_missing_capability. - A later revisit of
get_more_tools(or its deprecation) is deliberately out of scope here.
References
- ADR-0002 (tools/list analytics affordances)
- modelcontextprotocol/modelcontextprotocol discussion #2369 (opt-in client-experience feedback proposal)