Module types

Module types 

Source
Expand description

Types for code generation.

Defines the data structures used during code generation from MCP tool schemas to executable TypeScript or Rust code.

§Examples

use mcp_execution_codegen::{GeneratedCode, GeneratedFile};

let file = GeneratedFile {
    path: "tools/sendMessage.ts".to_string(),
    content: "export function sendMessage() {}".to_string(),
};

let code = GeneratedCode {
    files: vec![file],
};

assert_eq!(code.files.len(), 1);

Structs§

GeneratedCode
Result of code generation containing all generated files.
GeneratedFile
A single generated file with path and content.
TemplateContext
Template context for code generation.
ToolDefinition
Definition of a single MCP tool for code generation.