Skip to content

feat: implement plan_feedback MCP tool#401

Merged
neoneye merged 2 commits intomainfrom
feature/plan-feedback-tool
Mar 28, 2026
Merged

feat: implement plan_feedback MCP tool#401
neoneye merged 2 commits intomainfrom
feature/plan-feedback-tool

Conversation

@neoneye
Copy link
Copy Markdown
Member

@neoneye neoneye commented Mar 28, 2026

Summary

  • Implements the plan_feedback MCP tool from proposal docs: add proposal for MCP feedback tool #400 (127-mcp-feedback)
  • Allows MCP clients to submit structured feedback about plan quality, workflow friction, and the MCP interface
  • Fire-and-forget design: never blocks workflow, always returns success to caller (except validation errors)

Changes

  • New: database_api/model_feedback.pyFeedbackItem SQLAlchemy model (feedback_item table)
  • New: mcp_cloud/tests/test_plan_feedback_tool.py — 11 test cases covering validation, fire-and-forget, plan snapshot
  • Modified: mcp_cloud/tool_models.pyPlanFeedbackInput/PlanFeedbackOutput Pydantic models with 12 categories
  • Modified: mcp_cloud/schemas.pyToolDefinition entry for plan_feedback
  • Modified: mcp_cloud/handlers.pyhandle_plan_feedback() handler with plan state snapshotting
  • Modified: mcp_cloud/db_queries.py_create_feedback_sync() and _get_plan_snapshot_for_feedback_sync()
  • Modified: mcp_cloud/db_setup.py — model import, PlanFeedbackRequest, server instructions update
  • Modified: mcp_cloud/http_server.py — FastMCP wrapper function and tool registration
  • Modified: mcp_cloud/app.py — re-export facade updated
  • Modified: mcp_cloud/tests/test_tool_surface_consistency.py — annotations, schema, and exposure tests

Test plan

  • CI passes (tests require Docker/PostgreSQL)
  • test_plan_feedback_tool.py — 11 tests: valid feedback, all categories, validation errors, plan-not-found, fire-and-forget DB failure, plan snapshot capture
  • test_tool_surface_consistency.py — updated to verify plan_feedback annotations, schema, and server instructions
  • Manual: call plan_feedback via MCP Inspector with various categories

🤖 Generated with Claude Code

neoneye and others added 2 commits March 28, 2026 19:19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add the plan_feedback tool allowing MCP clients to submit structured
feedback about plan quality, workflow friction, and the MCP interface.

- New FeedbackItem model (feedback_item table) with inline plan state snapshot
- 12 feedback categories (sse_issue, plan_quality, suggestion, etc.)
- Fire-and-forget: always returns success even if DB write fails
- PLAN_NOT_FOUND error when plan_id is provided but invalid
- FastMCP HTTP wrapper and tool registration
- Tests for validation, fire-and-forget, plan snapshot capture
- Updated surface consistency tests and server instructions

Implements proposal 127-mcp-feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@neoneye neoneye merged commit f8ab48a into main Mar 28, 2026
3 checks passed
@neoneye neoneye deleted the feature/plan-feedback-tool branch March 28, 2026 20:41
neoneye added a commit that referenced this pull request Mar 28, 2026
Implemented as send_feedback MCP tool (PR #401, #402).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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