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§
- Generated
Code - Result of code generation containing all generated files.
- Generated
File - A single generated file with path and content.
- Template
Context - Template context for code generation.
- Tool
Definition - Definition of a single MCP tool for code generation.