Skip to content

feat: add caller identity validation for comms_release_all MCP tool #64

Description

@jflowers

Context

The comms_release_all MCP tool (at internal/tools/comms/tools.go:227-242) currently accepts calls from any agent without caller identity validation. The forge-coordination skill states that only coordinators MAY call comms_release_all(), but this constraint is enforced only at the prompt level — any agent can invoke the tool at the MCP protocol layer.

Problem

Prompt-only access control is insufficient for safety-critical operations like releasing all file reservations. A worker agent that ignores or fails to parse the skill constraint could call comms_release_all() and release all reservations across all agents, causing data corruption or lost work.

Proposed Solution

Add caller identity validation to the comms_release_all tool handler:

  • Accept a caller_role or agent_name parameter
  • Validate the caller against the comms session registry
  • Reject calls from non-coordinator agents with an error response

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions