You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**`--bundles-channel`**, **`-c`**| Extension bundle release channel. Supported values are: `GA` (default), `Preview`, and `Experimental`. Only applicable for non-.NET projects. |
46
-
|**`--configuration-profile`**|**[preview]**Initialize a project with a host configuration profile. Currently supported: `mcp-custom-handler`. Using a configurationprofile may skip all other initialization steps. See [MCP configuration profile](#mcp-configuration-profile) for details. |
46
+
|**`--configuration-profile`**| Initialize a project with a host configuration profile. The `--configuration-profile` is currently in preview. For more information, see [Configuration profiles](#configuration-profiles). |
47
47
|**`--csx`**| Creates .NET functions as C# script, which is the version 1.x behavior. Valid only with `--worker-runtime dotnet`. |
48
48
|**`--docker`**| Creates a Dockerfile for a container using a base image that is based on the chosen `--worker-runtime`. Use this option when you plan to deploy a containerized function app. |
49
49
|**`--docker-only`**| Adds a Dockerfile to an existing project. Prompts for the worker-runtime if not specified or set in local.settings.json. Use this option when you plan to deploy a containerized function app and the project already exists. |
50
50
|**`--force`**| Initialize the project even when there are existing files in the project. This setting overwrites existing files with the same name. Other files in the project folder aren't affected. |
51
-
|**`--language`**| Initializes a language-specific project. Currently supported when `--worker-runtime` set to `node`. Options are `typescript` and `javascript`. You can also use `--worker-runtime javascript` or `--worker-runtime typescript`. |
51
+
|**`--language`**| Initializes a language-specific project. Currently supported when `--worker-runtime` set to `node`. Options are `typescript` and `javascript`. You can also use `--worker-runtime javascript` or `--worker-runtime typescript`. |
52
52
|**`--managed-dependencies`**| Installs managed dependencies. Currently, only the PowerShell worker runtime supports this functionality. |
53
53
|**`--model`**, **`-m`**| Sets the desired programming model for a target language when more than one model is available. Supported options are `V1` and `V2` for Python and `V3` and `V4` for Node.js. For more information, see the [Python developer guide](functions-reference-python.md#programming-model) and the [Node.js developer guide](functions-reference-node.md), respectively. |
54
54
|**`--no-bundle`**| Don't configure extension bundle in host.json. Only applicable for non-.NET projects. |
@@ -61,36 +61,16 @@ When you supply `<PROJECT_FOLDER>`, the project is created in a new folder with
61
61
> [!NOTE]
62
62
> When you use either `--docker` or `--docker-only` options, Core Tools automatically create the Dockerfile for C#, JavaScript, Python, and PowerShell functions. For Java functions, you must manually create the Dockerfile. For more information, see [Creating containerized function apps](functions-how-to-custom-container.md#creating-containerized-function-apps).
63
63
64
-
### MCP configuration profile
64
+
### Configuration profiles
65
65
66
66
> [!IMPORTANT]
67
-
> This feature is currently in preview and may change in future releases.
67
+
> Support for configuration profiles is currently in preview.
68
68
69
-
When you use `func init --configuration-profile mcp-custom-handler`, Core Tools creates a project preconfigured to run as an [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server using the Azure Functions custom handler. This profile:
69
+
When using the `--configuration-profile` option, a predefined set of project configurations and setting are created. When you specify a configuration profile, initialization might skip all other initialization steps.
70
70
71
-
- Configures the `host.json` with `"configurationProfile": "mcp-custom-handler"` and custom handler settings.
72
-
- Sets `MCP_EXTENSION_ENABLED` to `true` in `local.settings.json`.
73
-
74
-
This allows your function app to serve as an MCP tool server that AI agents and MCP clients can connect to.
75
-
76
-
## `func pack`
77
-
78
-
Packs an Azure Function App into a ZIP archive that's ready to deploy.
79
-
80
-
```command
81
-
func pack [FOLDER_PATH]
82
-
```
83
-
84
-
When you supply `FOLDER_PATH`, the specified folder is packed. Otherwise, the current directory is used.
85
-
86
-
The `func pack` action supports the following options:
|**`-o`**, **`--output`**| Specifies the file path where the packed ZIP archive will be created. |
91
-
|**`--no-build`**| Don't build the project before packaging. If you provide a directory as the first argument, the contents of that directory are packed as-is. |
92
-
|**`--build-native-deps`**| When packing a Python project, builds dependencies locally using a Docker container that matches the Azure environment. Creates a ZIP with all dependencies in `.python_packages`. |
93
-
|**`--skip-install`**| When packing a Node.js project, skips running `npm install` before packing. |
71
+
| Profile value | Description | Specific actions |
72
+
| ----- | ----- | ----- |
73
+
|`mcp-custom-handler`| Creates a project that uses [custom handlers](functions-custom-handlers.md) to host an [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server to which AI agents and other MCP clients can connect. | • Configures the `"configurationProfile": "mcp-custom-handler"` element in the `host.json` file with specific custom handler settings.<br/>• Sets `MCP_EXTENSION_ENABLED` to `true` in `local.settings.json`. |
94
74
95
75
## `func logs`
96
76
@@ -131,6 +111,25 @@ The `func new` action supports the following options:
131
111
132
112
To learn more, see [Create a function](functions-run-local.md#create-func).
133
113
114
+
## `func pack`
115
+
116
+
Creates a deployment package that contains your project code in a runnable state. Use this method when you need to manually create a deployment package for your app on your local computer outside of the `func azure functionapp publish` command. By default, `func pack` builds your project when needed.
117
+
118
+
```
119
+
func pack [<FOLDER_PATH>]
120
+
```
121
+
122
+
By default, `func pack` packages the current directory, and the output .zip file has the same name as the root folder of your project. Run `func pack` in the directory that contains your `host.json` project file. If you need to run `func pack` in another directory, you can set the path to the project root after the command, like `func pack ./myprojectroot`. If the specific .zip file already exists, it's first deleted and then replaced with an updated version.
|**`--output`**| Sets the path to the location where the deployment .zip package file is created. |
129
+
|**`--no-build`**| Project isn't built before packing. For C# apps, use only when you have already generated your binaries. For Node.js apps, both `npm install` and `npm run build` are skipped. |
130
+
|**`--skip-install`**| Skips running `npm install` when packing Node.js-based function app. Used to avoid overwriting custom npm modules. |
131
+
|**`--build-native-deps`**| Installs Python dependencies locally using an image that matches the environment used in Azure. When enabled, Core Tools starts a Docker container, builds the app inside that container, and creates a .zip file with all dependencies restored in `.python_packages`. Use this option when running on Windows to avoid potential library issues when deployed to Linux in Azure. |
0 commit comments