swift_package_build
Compile Swift packages using specified configurations, architectures, and targets directly within XcodeBuildMCP to streamline project builds.
Instructions
Builds a Swift Package with swift build
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"packagePath": "<packagePath>"
},
"name": "swift_package_build"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| architectures | No | Target architectures to build for | |
| configuration | No | Swift package configuration (debug, release) | |
| packagePath | Yes | Path to the Swift package root (Required) | |
| parseAsLibrary | No | Build as library instead of executable | |
| targetName | No | Optional target to build |