Skip to content

MCP Tools

Matt Lucas edited this page Jun 24, 2026 · 1 revision

MCP Tools

Lantern exposes four core MCP (Model Context Protocol) tools for agents to interact with the runtime.

devorch_report_status

Agent reports its current status to the orchestrator.

Parameters

  • session (string, required) — Session ID
  • role (string, required) — Agent role (e.g., "ai", "dat", "sec")
  • status (enum, required) — One of:
    • ack — Acknowledged receipt of task
    • complete — Completed task successfully
    • blocked — Blocked on a dependency or missing info
    • failed — Task execution failed
    • degraded — System is degraded but operating
    • recovered — Recovered from degraded state
  • summary (string, optional) — Brief status message
  • validation (string, optional) — Evidence or details (test results, error logs)
  • next_action (string, optional) — Recommended next step

Example

{
  "session": "myproject-1",
  "role": "ai",
  "status": "complete",
  "summary": "Code review completed for pull request #42",
  "validation": "5 files reviewed, 3 findings reported"
}

devorch_peer_message

Agent sends a message to another agent role.

Parameters

  • session (string, required) — Session ID
  • from_role (string, required) — Sender role
  • to_role (string, required) — Recipient role
  • message (string, required) — Message content
  • task_id (string, optional) — Related task ID
  • requested_action (string, optional) — Specific action requested

Example

{
  "session": "myproject-1",
  "from_role": "ai",
  "to_role": "sec",
  "message": "API endpoint implements OAuth. Please review security.",
  "requested_action": "Verify token validation and rate limiting"
}

devorch_query_team_state

Agent queries the current state of all team members.

Parameters

  • session (string, required) — Session ID
  • role (string, required) — Querying agent role (optional; can query all)
  • include_history (boolean, optional) — Include historical status (default: false)

Example Request

{
  "session": "myproject-1",
  "role": "orchestrator"
}

Example Response

{
  "agents": [
    {
      "role": "orchestrator",
      "status": "active",
      "last_seen": "2026-06-23T12:34:56Z"
    },
    {
      "role": "ai",
      "status": "idle",
      "last_seen": "2026-06-23T12:33:10Z"
    },
    {
      "role": "dat",
      "status": "busy",
      "last_seen": "2026-06-23T12:34:45Z"
    }
  ]
}

devorch_get_setup_instructions

Agent fetches its initialization instructions from the orchestrator.

Parameters

  • session (string, required) — Session ID
  • role (string, required) — Agent role
  • agent (string, required) — Agent CLI family (e.g., "claude", "codex")
  • repo_id (string, optional) — Repository identifier
  • temporal_namespace (string, optional) — Temporal namespace

Example Request

{
  "session": "myproject-1",
  "role": "ai",
  "agent": "claude",
  "repo_id": "myproject",
  "temporal_namespace": "default"
}

Example Response

{
  "instructions": "You are the AI specialist for session myproject-1. Your role is code review and architecture feedback. Use your domain skill and expertise...",
  "status": "ok"
}

Error Handling

All MCP tools return an error object on failure:

{
  "error": "Session not found",
  "status": "error"
}

Common errors:

  • Session not found — Invalid session ID
  • Agent not found — Role not active in the session
  • Invalid status — Unrecognized status value
  • Permission denied — Agent lacks permission for the operation

Clone this wiki locally