swarm repositories / source
aboutsummaryrefslogtreecommitdiff
path: root/crates/phone-opus/src/mcp/catalog.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/phone-opus/src/mcp/catalog.rs')
-rw-r--r--crates/phone-opus/src/mcp/catalog.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/crates/phone-opus/src/mcp/catalog.rs b/crates/phone-opus/src/mcp/catalog.rs
index f3f0925..a4a1780 100644
--- a/crates/phone-opus/src/mcp/catalog.rs
+++ b/crates/phone-opus/src/mcp/catalog.rs
@@ -52,6 +52,12 @@ const TOOL_SPECS: &[ToolSpec] = &[
replay: ReplayContract::Convergent,
},
ToolSpec {
+ name: "consult_wait",
+ description: "Block until one background consult job finishes or a timeout elapses. When the job has finished, the final Claude response or failure is included.",
+ dispatch: DispatchTarget::Host,
+ replay: ReplayContract::Convergent,
+ },
+ ToolSpec {
name: "consult_jobs",
description: "List recent background consult jobs. Defaults to render=porcelain; use render=json for structured output.",
dispatch: DispatchTarget::Host,
@@ -123,6 +129,26 @@ fn tool_schema(name: &str) -> Value {
},
"required": ["job_id"]
})),
+ "consult_wait" => with_common_presentation(json!({
+ "type": "object",
+ "properties": {
+ "job_id": {
+ "type": "string",
+ "description": "Background consult job handle returned by consult with background=true."
+ },
+ "timeout_ms": {
+ "type": "integer",
+ "minimum": 0,
+ "description": "Maximum time to wait for completion before returning the current job state. Defaults to 1800000 (30 minutes)."
+ },
+ "poll_interval_ms": {
+ "type": "integer",
+ "minimum": 10,
+ "description": "Polling interval used while waiting. Defaults to 1000."
+ }
+ },
+ "required": ["job_id"]
+ })),
"consult_jobs" => with_common_presentation(json!({
"type": "object",
"properties": {