pub struct McpProjection {
pub server: McpServerIdentity,
pub protocol_versions: Vec<String>,
pub transports: Vec<McpTransportEntry>,
pub serving: McpServing,
pub tool_count: usize,
pub tools: Vec<McpToolEntry>,
pub effects: Vec<McpEffectCount>,
pub writers: Vec<String>,
pub resources: McpResourceSummary,
pub launcher_in_repository: bool,
pub clients: Vec<McpClient>,
pub findings: Vec<McpFinding>,
}Expand description
The MCP projection of this registry in this repository.
use majordomus_cli::capability::builtin::mcp::McpProjection;
let p: McpProjection = serde_json::from_value(serde_json::json!({
"server": { "name": "majordomus", "title": "Majordomus", "version": "0.14.0" },
"protocol_versions": ["2025-06-18"],
"transports": [{ "id": "stdio", "reached_by": "majordomus mcp", "attached": 0 }],
"serving": { "methods": ["initialize"], "tools": true, "resources": true, "prompts": false, "notifications": false },
"tool_count": 2,
"tools": [],
"effects": [{ "effect": "read", "tools": 1 }, { "effect": "repository_mutation", "tools": 1 }],
"writers": ["majordomus_plan_transition"],
"resources": { "builtin": 1, "objects": 0, "template": "majordomus://<kind>/<identity>" },
"launcher_in_repository": false,
"clients": [],
"findings": [],
})).unwrap();
// the count is of every tool, whatever the `effect` filter narrowed `tools` to
assert_eq!(p.tool_count, p.effects.iter().map(|e| e.tools).sum::<usize>());
assert!(p.tools.is_empty() && p.writers.len() == 1);Fields§
§server: McpServerIdentityWho answers initialize.
protocol_versions: Vec<String>The protocol versions accepted, newest first.
transports: Vec<McpTransportEntry>How a client reaches the server.
serving: McpServingWhat of the protocol is served.
tool_count: usizeHow many tools the registry projects, whatever the filter asked for.
tools: Vec<McpToolEntry>The tools asked for, in registry order.
effects: Vec<McpEffectCount>The tools counted by effect, every effect present.
writers: Vec<String>The tools that write the repository, by name. The initialize instructions name the
same ones.
resources: McpResourceSummaryThe resources.
launcher_in_repository: boolWhether this repository carries the launcher at bin/majordomus-mcp. Where it does
not, the installed command of the same name is what a configuration names.
clients: Vec<McpClient>The clients the distribution declares a configuration for, and where each stands.
findings: Vec<McpFinding>What a person should act on. Empty is nothing to do.
Trait Implementations§
Source§impl Clone for McpProjection
impl Clone for McpProjection
Source§fn clone(&self) -> McpProjection
fn clone(&self) -> McpProjection
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 McpProjection
impl Debug for McpProjection
Source§impl<'de> Deserialize<'de> for McpProjection
impl<'de> Deserialize<'de> for McpProjection
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 McpProjection
Source§impl JsonSchema for McpProjection
impl JsonSchema for McpProjection
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 McpProjection
impl PartialEq for McpProjection
Source§fn eq(&self, other: &McpProjection) -> bool
fn eq(&self, other: &McpProjection) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for McpProjection
impl Serialize for McpProjection
impl StructuralPartialEq for McpProjection
Auto Trait Implementations§
impl Freeze for McpProjection
impl RefUnwindSafe for McpProjection
impl Send for McpProjection
impl Sync for McpProjection
impl Unpin for McpProjection
impl UnsafeUnpin for McpProjection
impl UnwindSafe for McpProjection
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.