-
Notifications
You must be signed in to change notification settings - Fork 1
MCP Tools
Matt Lucas edited this page Jun 24, 2026
·
1 revision
Lantern exposes four core MCP (Model Context Protocol) tools for agents to interact with the runtime.
Agent reports its current status to the orchestrator.
-
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
{
"session": "myproject-1",
"role": "ai",
"status": "complete",
"summary": "Code review completed for pull request #42",
"validation": "5 files reviewed, 3 findings reported"
}Agent sends a message to another agent role.
-
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
{
"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"
}Agent queries the current state of all team members.
-
session(string, required) — Session ID -
role(string, required) — Querying agent role (optional; can query all) -
include_history(boolean, optional) — Include historical status (default: false)
{
"session": "myproject-1",
"role": "orchestrator"
}{
"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"
}
]
}Agent fetches its initialization instructions from the orchestrator.
-
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
{
"session": "myproject-1",
"role": "ai",
"agent": "claude",
"repo_id": "myproject",
"temporal_namespace": "default"
}{
"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"
}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