feat!: add MRTR model types (SEP-2322) (#915)
* feat!: add SEP-2322 MRTR model types * feat!: remove URLElicitationRequiredError (SEP-2322)
This commit is contained in:
parent
519577601d
commit
f4ff56b81d
3 changed files with 969 additions and 255 deletions
|
|
@ -252,8 +252,7 @@ impl ServerHandler for Counter {
|
|||
self._create_resource_text("str:////Users/to/some/path/", "cwd"),
|
||||
self._create_resource_text("memo://insights", "memo-name"),
|
||||
],
|
||||
next_cursor: None,
|
||||
meta: None,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -293,9 +292,8 @@ impl ServerHandler for Counter {
|
|||
_: RequestContext<RoleServer>,
|
||||
) -> Result<ListResourceTemplatesResult, McpError> {
|
||||
Ok(ListResourceTemplatesResult {
|
||||
next_cursor: None,
|
||||
resource_templates: Vec::new(),
|
||||
meta: None,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,18 +129,9 @@ impl ElicitationServer {
|
|||
)
|
||||
})?;
|
||||
match elicit_result {
|
||||
ElicitationAction::Accept => {
|
||||
// Mock notifying completion
|
||||
let _ = context
|
||||
.peer
|
||||
.notify_url_elicitation_completed(ElicitationResponseNotificationParam::new(
|
||||
"elicit_123",
|
||||
))
|
||||
.await;
|
||||
Ok(CallToolResult::success(vec![ContentBlock::text(
|
||||
"Elicitation via URL successful".to_string(),
|
||||
)]))
|
||||
}
|
||||
ElicitationAction::Accept => Ok(CallToolResult::success(vec![ContentBlock::text(
|
||||
"Elicitation via URL successful".to_string(),
|
||||
)])),
|
||||
ElicitationAction::Cancel => Ok(CallToolResult::success(vec![ContentBlock::text(
|
||||
"Elicitation via URL cancelled by user".to_string(),
|
||||
)])),
|
||||
|
|
|
|||
|
|
@ -113,8 +113,7 @@ impl ServerHandler for SamplingDemoServer {
|
|||
.unwrap(),
|
||||
),
|
||||
)],
|
||||
meta: None,
|
||||
next_cursor: None,
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue