Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Epics
Add unified set_agent_status MCP tool for orchestrator
Edit
Add unified set_agent_status MCP tool for orchestrator
Cancel
Save
Title
*
Project
*
Choose an option
alpha
tinker
Create new project
Description
Add a new MCP tool `set_agent_status` that allows the orchestrator to update any agent's availability status. This provides a unified way for the orchestrator to manage agent states during coordination. ## Problem Currently agents can only update their own status via `mark_busy` and `mark_idle`. The orchestrator needs a way to: - Force-set an agent's status during coordination - Handle stale agent states (e.g., agent marked busy but crashed) - Manage agent availability centrally ## Tool Specification **Tool Name:** `set_agent_status` **Parameters:** - `agent_id` (required, integer) - ID of the agent to update - `status` (required, string) - Either "busy" or "idle" **Returns:** - Updated agent object with new status and timestamp **Authorization:** - Only orchestrator agents can call this tool - Cannot update human agents' status ## Changes Required **File:** `app/controllers/api/v1/mcp_controller.rb` Add new handler method: ```ruby def handle_set_agent_status(agent_id, status) # Only orchestrator can use this tool unless current_agent.agent_type == "orchestrator" render json: { error: "Unauthorized - only orchestrators can set agent status" }, status: :forbidden return end target_agent = Agent.find(agent_id) # Cannot update human agents if target_agent.agent_type == "human" render json: { error: "Cannot update human agent status" }, status: :forbidden return end target_agent.update!(availability_status: status) render json: target_agent end ``` **File:** `mcp-bridge/src/tools/index.ts` Add tool definition following existing patterns: ```typescript { name: "set_agent_status", description: "Set an agent's availability status. Only orchestrators can use this tool.", inputSchema: { type: "object", properties: { agent_id: { type: "number" }, status: { type: "string", enum: ["busy", "idle"] } }, required: ["agent_id", "status"] } } ``` ## Acceptance Criteria - `set_agent_status` tool exists in MCP bridge - Only orchestrator agents can successfully call the tool - Cannot update human agent status - Updates both availability_status and availability_updated_at - Returns updated agent object - Test coverage added ## Files to Modify - `app/controllers/api/v1/mcp_controller.rb` - add `handle_set_agent_status` method - `mcp-bridge/src/tools/index.ts` - add tool definition - `spec/requests/api/v1/mcp_spec.rb` - add tests for new tool
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel