pub struct McpServing {
pub methods: Vec<String>,
pub tools: bool,
pub resources: bool,
pub prompts: bool,
pub notifications: bool,
}Expand description
What the server serves of the protocol, and what it does not.
use majordomus_cli::capability::builtin::mcp::McpServing;
let s: McpServing = serde_json::from_value(serde_json::json!({
"methods": ["initialize", "tools/call"], "tools": true, "resources": true,
"prompts": false, "notifications": false,
})).unwrap();
// what is not served is stated, so a client does not learn it from a refusal
assert!(s.tools && !s.prompts && !s.notifications);
assert!(!s.methods.iter().any(|m| m.starts_with("prompts/")));Fields§
§methods: Vec<String>The methods a request may name. Anything else is answered -32601.
tools: boolTools: every capability that declares one.
resources: boolResources: every capability that declares one, and every object of the layer.
prompts: boolPrompts. Not served: the repository’s prompt assets are resources, because a prompt served unrendered would read as finished.
notifications: boolSubscriptions and list-change notifications. Not served: this server sends nothing unasked.
Trait Implementations§
Source§impl Clone for McpServing
impl Clone for McpServing
Source§fn clone(&self) -> McpServing
fn clone(&self) -> McpServing
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpServing
impl Debug for McpServing
Source§impl<'de> Deserialize<'de> for McpServing
impl<'de> Deserialize<'de> for McpServing
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for McpServing
Source§impl JsonSchema for McpServing
impl JsonSchema for McpServing
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for McpServing
impl PartialEq for McpServing
Source§fn eq(&self, other: &McpServing) -> bool
fn eq(&self, other: &McpServing) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for McpServing
impl Serialize for McpServing
impl StructuralPartialEq for McpServing
Auto Trait Implementations§
impl Freeze for McpServing
impl RefUnwindSafe for McpServing
impl Send for McpServing
impl Sync for McpServing
impl Unpin for McpServing
impl UnsafeUnpin for McpServing
impl UnwindSafe for McpServing
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.