Skip to main content

Module metadata

Module metadata 

Source
Expand description

Structured sidecar metadata describing a server’s generated tools.

mcp-execution-codegen emits a _meta.json file alongside the generated TypeScript tool files for each server. mcp-execution-skill (and mcp-execution-server) read that file back to build SKILL.md and runtime tool listings, instead of re-parsing the generated .ts source.

This module is the shared wire contract between the two sides: the producer (codegen) and the consumer (skill/server) both depend on mcp-execution-core, so the schema lives here rather than in either crate directly.

§Examples

use mcp_execution_core::metadata::{ServerMetadata, ToolMetadata, METADATA_SCHEMA_VERSION};

let meta = ServerMetadata {
    schema_version: METADATA_SCHEMA_VERSION,
    server_id: "github".to_string(),
    server_name: "GitHub".to_string(),
    server_version: "1.0.0".to_string(),
    tools: vec![ToolMetadata {
        name: "create_issue".to_string(),
        typescript_name: "createIssue".to_string(),
        category: Some("issues".to_string()),
        keywords: vec!["create".to_string(), "issue".to_string()],
        description: Some("Creates a new issue".to_string()),
        parameters: vec![],
    }],
};

let json = serde_json::to_string_pretty(&meta).unwrap();
let round_tripped: ServerMetadata = serde_json::from_str(&json).unwrap();
assert_eq!(round_tripped, meta);

Structs§

ParameterMetadata
Structured metadata for a single tool parameter.
ServerMetadata
Structured sidecar describing one server’s generated tools.
ToolMetadata
Structured metadata for a single generated tool.

Constants§

METADATA_FILE_NAME
Filename of the sidecar metadata file emitted alongside generated tool files.
METADATA_SCHEMA_VERSION
Current schema version of the _meta.json sidecar format.