ExMCP.DSL.CodeGenerator (ex_mcp v0.9.0)

View Source

Code generation for the ExMCP.Server DSL.

This module handles all the macro code generation for servers using the DSL, including:

  • Import statements and aliases
  • Module attribute setup
  • Capability detection functions
  • GenServer callbacks
  • Transport handling
  • Helper functions

This module centralizes all code generation logic that was previously spread across the ExMCP.Server module.

Summary

Functions

Generates all the code for a server using the DSL.

Generates all function definitions for DSL servers.

Generates import statements and aliases needed by DSL servers.

Generates module attribute setup for DSL servers.

Functions

generate(opts \\ [])

Generates all the code for a server using the DSL.

Options

  • :server_info - Server information map with name and version

generate_functions()

Generates all function definitions for DSL servers.

generate_imports()

Generates import statements and aliases needed by DSL servers.

generate_setup(opts)

Generates module attribute setup for DSL servers.