Skip to content

feat: create_annotation MCP tool for agent-initiated annotations #70

@viv

Description

@viv

Summary

Add a create_annotation MCP tool so agents can proactively create annotations, enabling bidirectional communication through Review Loop.

Problem

Agents can only respond to reviewer annotations — they can't proactively flag issues. If an agent notices a problem while working (accessibility issue, broken link, inconsistent styling, related issue on another page), it has no way to communicate this back through Review Loop. The feedback loop is one-directional: reviewer → agent only.

Proposal

Add a create_annotation MCP tool with parameters:

  • pageUrl (required) — the page the annotation relates to
  • note (required) — the agent's observation or suggestion
  • type (optional, default "page_note") — "text", "element", or "page_note"
  • selectedText (optional, for text type) — the text being referenced
  • elementSelector (optional, for element type) — CSS selector or description of the element

Agent-created annotations should:

  • Appear in the reviewer's panel with a distinct visual indicator (e.g. a robot icon or "Agent" badge)
  • Have role: "agent" or similar field to distinguish from reviewer-created annotations
  • Follow the same status lifecycle (open → in_progress → addressed)

Key Constraints

  • Low implementation cost — the REST API already supports POST /annotations; this is primarily wiring the existing endpoint into an MCP tool
  • UI consideration — the reviewer panel needs to handle "surprise" annotations appearing during a session; the existing 2-second poll will pick these up, but consider a visual notification
  • Mental model — this inverts the core reviewer→agent flow; the tool description and documentation should make the intended use clear (flagging related issues, not creating busywork)
  • Consider whether agent-created annotations should default to a different status or have a distinct source field

Complexity

Low

Consensus

1/3 STRONG YES (Agent). 2/3 MAYBE (Reviewer, Product — supportive but flagged the mental model inversion as worth careful design).

Related

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