pub struct ServerMetadata {
pub schema_version: u32,
pub server_id: ServerId,
pub server_name: String,
pub server_version: String,
pub tools: Vec<ToolMetadata>,
}Expand description
Structured sidecar describing one server’s generated tools.
Serialized as _meta.json by mcp-execution-codegen and deserialized by
mcp-execution-skill / mcp-execution-server, replacing a fragile
regex-based re-parse of the generated TypeScript files.
§Examples
use mcp_execution_core::metadata::{ServerMetadata, METADATA_SCHEMA_VERSION};
use mcp_execution_core::ServerId;
let meta = ServerMetadata {
schema_version: METADATA_SCHEMA_VERSION,
server_id: ServerId::new("github").unwrap(),
server_name: "GitHub".to_string(),
server_version: "1.0.0".to_string(),
tools: vec![],
};
assert_eq!(meta.tools.len(), 0);Fields§
§schema_version: u32Schema version this sidecar was produced with.
Consumers should compare this against METADATA_SCHEMA_VERSION and
fail loudly on a mismatch rather than risk misinterpreting an
incompatible future shape.
server_id: ServerIdMCP server identifier (e.g. github).
ServerId’s derived Serialize/Deserialize round-trip through a plain JSON string
(single-field newtype structs serialize transparently), so this field’s on-the-wire
shape is unchanged from when it was a bare String.
server_name: StringHuman-readable server name.
server_version: StringServer version string, as reported by the MCP server.
tools: Vec<ToolMetadata>Metadata for every generated tool, in generation order.
Trait Implementations§
Source§impl Clone for ServerMetadata
impl Clone for ServerMetadata
Source§fn clone(&self) -> ServerMetadata
fn clone(&self) -> ServerMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more