MetaEngine
v1.7.0Code generation in 12 languages across MCP tools, including Dart Dio for OpenAPI.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
generate_code Generate Multi-Language Code
Generate source files from a structured type graph for TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust. Use explicit templateRefs to link target-language customCode to generated types and imports. For compact field maps and repeated patterns, use generate_from_recipe. # MetaEngine MCP — generation guide MetaEngine generates source files from structured type definitions and target-language code. Type and model generation supports TypeScript, Python, Go, C#, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust. ## Choose a tool - `generate_from_recipe`: compact p…
load_spec_from_file Load Code Spec from File
Read an existing generate_code JSON payload from a local file and run the same generation flow. Use generate_from_recipe for compact field maps and reusable JSON templates. outputPath, skipExisting, and dryRun arguments override values in the file.
| Parameter | Type | Description |
|---|---|---|
specFilePath * | string | Path to the JSON spec file (absolute or relative to current directory) |
dryRun | boolean | Preview mode - returns generated code without writing files. Overrides dryRun in spec file if provided. |
outputPath | string | Output directory path where files will be written. Overrides outputPath in spec file if provided. |
skipExisting | boolean | Skip writing files that already exist. Overrides skipExisting in spec file if provided. |
generate_from_recipe Generate from a JSON Recipe
Expand a compact, versioned JSON recipe locally into the existing generation payload, then generate through the MetaEngine API. Use field maps, explicit type references, and named templates with parameter rows to describe repeated structures. Target-language customCode and templateRefs retain the existing type graph and import resolution. Recipe expansion executes no scripts. Supply exactly one of recipe or recipeFilePath. Validation and expansion finish before any API request or generated-file write.
| Parameter | Type | Description |
|---|---|---|
dryRun | boolean | Return generated source without writing files; hosted generation still occurs. |
outputPath | string | Output directory override, relative to the MCP server working directory. |
recipe | object | Version 1 recipe. Compact properties: {id: 'string', 'note?': 'string', owner: {ref: 'user'}}. Definitions use id (defaults to name) or native typeIdentifier. Other native spec fields, including custo… |
recipeFilePath | string | Local recipe JSON file. Relative input paths resolve against this file's directory. |
skipExisting | boolean | Skip existing files; defaults to true. |
metaengine_initialize Get Documentation & Patterns
Returns essential MetaEngine patterns and documentation resources. This helper tool provides AI assistants with critical MetaEngine concepts: - The fundamental principle of generating related types in ONE call - Properties vs customCode distinction - Template references and type referencing patterns - Language-specific best practices Returns links to comprehensive documentation with patterns and examples. Call this when you need guidance or are generating code for the first time.
| Parameter | Type | Description |
|---|---|---|
language | string | Optional: The primary language you'll be generating code for. If specified, returns language-specific patterns. |
generate_openapi Generate HTTP Client from OpenAPI
Generate HTTP clients from OpenAPI specifications for 11 frameworks: Angular, React, TypeScript Fetch, Go net/http, Java Spring, Python httpx, C# HttpClient, Kotlin Ktor, Rust Reqwest, Swift URLSession, and Dart Dio. Provide an inline OpenAPI spec (YAML/JSON) or a URL, choose a framework, and get fully typed, production-ready HTTP client code with models, services, and error handling.
generate_graphql Generate HTTP Client from GraphQL
Generates a fully typed HTTP client from a GraphQL SDL schema. Supports Angular, React, TypeScript Fetch, Go, Java Spring, C#, Kotlin, Python, Rust, and Swift. Enable `fragments` to emit reusable named GraphQL fragments for object-type selections.
generate_protobuf Generate HTTP Client from Protobuf
Generates a fully typed HTTP client from Protocol Buffers (.proto) definitions. Supports Angular, React, TypeScript Fetch, Go, Java Spring, C#, Kotlin, Python, Rust, and Swift.
| Parameter | Type | Description |
|---|---|---|
framework * | string | Target framework for code generation |
protoSource * | string | Protocol Buffers (.proto) definition content |
angularOptions | object | Angular-specific options |
basicAuth | object | Basic authentication configuration |
bearerAuth | object | Bearer authentication configuration |
csharpOptions | object | C#-specific options |
customHeaders | array | Custom HTTP headers |
documentation | boolean | Generate documentation comments from proto comments |
dryRun | boolean | Preview mode - returns generated code without writing files to disk |
errorHandling | object | Error handling configuration |
fetchOptions | object | TypeScript Fetch-specific options |
goOptions | object | Go-specific options |
javaSpringOptions | object | Java Spring-specific options |
kotlinOptions | object | Kotlin-specific options |
optionsObjectThreshold | number | Min params before grouping into options object |
outputPath | string | Output directory path where files will be written |
pythonOptions | object | Python httpx-specific options |
reactOptions | object | React-specific options |
retries | object | Retry configuration |
rustOptions | object | Rust-specific options |
skipExisting | boolean | Skip writing files that already exist |
swiftOptions | object | Swift-specific options |
timeout | object | Timeout configuration |
generate_sql Generate Models from SQL DDL
Generates typed model classes from SQL DDL (CREATE TABLE statements). Supports TypeScript, C#, Go, Python, Java, Kotlin, Groovy, Scala, Swift, PHP, and Rust.
| Parameter | Type | Description |
|---|---|---|
ddlSource * | string | SQL DDL source code (CREATE TABLE statements) |
language * | string | Target programming language |
csharpOptions | object | C#-specific options |
dryRun | boolean | Preview mode - returns generated code without writing files to disk |
generateInterfaces | boolean | Emit interface-style output (interface/protocol/trait) instead of the default modern-idiomatic concrete shape (record/data class/case class/struct). |
generateNavigationProperties | boolean | Generate navigation properties for foreign key relationships |
generateValidationAnnotations | boolean | Generate validation annotations from column constraints |
goOptions | object | Go-specific options |
groovyOptions | object | Groovy-specific options |
initializeProperties | boolean | Initialize model properties with default values |
javaOptions | object | Java-specific options |
jsonAs | string | How JSON columns are typed: e.g. 'string' (raw), 'object' (parsed). Language-specific defaults apply if omitted. |
kotlinOptions | object | Kotlin-specific options |
outputPath | string | Output directory path where files will be written |
phpOptions | object | PHP-specific options |
precisionSafeDecimals | boolean | Emit decimal/numeric columns as precision-safe types (e.g. string in JS) instead of float, preserving full precision. |
pythonOptions | object | Python-specific options |
rustOptions | object | Rust-specific options |
scalaOptions | object | Scala-specific options |
schemaPrefix | string | Prepend the SQL schema name to generated type names (e.g. 'Auth_User' instead of 'User'). |
singularTypeNames | boolean | Singularize plural table names when emitting type names (e.g. table 'users' becomes type 'User'). |
skipExisting | boolean | Skip writing files that already exist |