feat(task): add task support (SEP-1686) (#536)

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
jokemanfire 2025-12-22 22:01:00 +08:00 • committed by GitHub
commit 621c9f619e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,6 +40,7 @@ async fn main() -> Result<()> {
.call_tool(CallToolRequestParam {
name: "echo".into(),
arguments: Some(object!({ "message": "hi from rmcp" })),
task: None,
})
.await?;
tracing::info!("Tool result for echo: {tool_result:#?}");
@ -49,6 +50,7 @@ async fn main() -> Result<()> {
.call_tool(CallToolRequestParam {
name: "longRunningOperation".into(),
arguments: Some(object!({ "duration": 3, "steps": 1 })),
task: None,
})
.await?;
tracing::info!("Tool result for longRunningOperation: {tool_result:#?}");