Skip to content

feat(mcp): rate_entry MCP tool — in-session interactive knowledge feedback without CLI #820

@magicpro97

Description

@magicpro97

User Story

As an AI agent that just used a knowledge entry to solve a problem, I want to call sk rate_entry via MCP to mark the entry as helpful or misleading, so future briefings benefit from feedback inline.

Background

query-session.py has --feedback good|bad|neutral writing to search_feedback. briefing.py reads search_feedback in _apply_feedback_bias_to_knowledge() for ±0.15 reranking. But there is no rate_entry MCP tool — agents cannot close the feedback loop inline.

Acceptance Criteria

  • Add rate_entry tool to mcp-server.py TOOLS list with schema: {entry_id: integer, verdict: enum[good,bad,neutral], note?: string}
  • note field (max 500 chars) stored in new note column on search_feedback (migration)
  • briefing MCP tool response includes per-entry rate_hint for top-3 entries (togglable via include_rate_hints: bool, default false)
  • Tests in test_fixes.py

Complexity: S | Impact: H

Files: mcp-server.py, migrate.py, test_fixes.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions