pub fn (d &Developer) @{function.name}_tool_handler(arguments map[string]Any) !mcp.ToolCallResult { @{decode_stmts} result := d.@{function.name}(@{function.params.map(it.name).join(',')}) or { return error_tool_call_result(err) } return mcp.ToolCallResult{ is_error: false content: result_to_mcp_tool_content[@{result.symbol()}](result) } }