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:
Dale Seo 2026-07-08 14:03:33 -04:00 • committed by GitHub
commit f4ff56b81d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 969 additions and 255 deletions

View file

@ -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()
})
}

View file

@ -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(),
)])),

View file

@ -113,8 +113,7 @@ impl ServerHandler for SamplingDemoServer {
.unwrap(),
),
)],
meta: None,
next_cursor: None,
..Default::default()
})
}
}