feat(toolset): inherit feedback from MCP, add disable flag

Draft
WI
1h ago
+111-551

Summary

The StackOne MCP server now exposes submit_feedback as a global tool on every account (see unified-cloud-api PR #8507). This SDK no longer defines or injects its own feedback tool — it inherits submit_feedback straight from the MCP catalog and executes it through the same /actions/rpc path as every other tool (that PR teaches /actions/rpc to dispatch submit_feedback).

  • Removed createFeedbackTool + its unconditional injection in fetchTools, the src/feedback.ts REST tool (which POSTed to the now-removed /ai/tool-feedback), and its index.ts export.
  • Enabled by default on everything, disableable: fetchTools keeps submit_feedback available even when providers/actions filters are applied (those are connector-keyed and would otherwise drop it), collapses it to a single instance across multi-account fetches, and removes it only when { feedback: false } is passed.
  • Mock MCP server now registers submit_feedback unconditionally, mirroring production so tests exercise the real inherited-from-MCP path.

⚠️ Depends on

unified-cloud-api PR #8507 (global submit_feedback MCP tool + /actions/rpc dispatch). Draft until that merges — executing feedback will 404 until then.

Test plan

  • pnpm test — updated toolsets.test.ts; existing filter/multi-account tests now assert submit_feedback (renamed from the old injected tool_feedback), plus new tests: on-by-default, { feedback: false } disables, survives provider filter unless disabled, and appears exactly once across accounts. Deleted feedback.test.ts.
  • Kept as draft pending the server PR.

🤖 Generated with Claude Code


Summary by cubic

Inherit submit_feedback from MCP as a global tool and add an option to disable it. This removes the SDK’s custom feedback tool and routes feedback through /actions/rpc like any other tool.

  • Refactors

    • Removed createFeedbackTool, src/feedback.ts, its export, and src/feedback.test.ts.
    • fetchTools now keeps submit_feedback by default (even with providers/actions filters), collapses it to one instance across multi-account fetches, and drops it only with { feedback: false }.
    • Mock MCP server registers submit_feedback for every account to match production.
  • Migration

    • Requires a server that exposes global submit_feedback and dispatches it via /actions/rpc.
    • Update any references from tool_feedback to submit_feedback.
    • To opt out, call fetchTools({ feedback: false }).