# swift_package_build

Build a Swift package using

Agent View of the PolicyLayer registry record for `swift_package_build`. HTML page: https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/swift-package-build

## Facts

- Tool: `swift_package_build`
- Server: XcodeBazelMCP (`xcodebazelmcp/xcodebazelmcp`) — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp.md
- Homepage: https://github.com/XcodeBazelMCP/XcodeBazelMCP
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "swift_package_build",
    "arguments": {}
  }
}
```

## Why swift_package_build is rated High

This tool invokes a Swift package build, which runs code compilation and linking operations. Build execution is a form of code execution with side effects on the file system (creating artifacts, intermediate files, etc.). While not immediately destructive, it can consume resources and potentially fail in ways that affect the build environment.

From the tool's own definition: "Tool name 'swift_package_build' indicates execution of build operations. Description states 'Build a Swift package using' which confirms it triggers a build process (compilation and linking of code)."

## Use case

AI agents invoke swift_package_build to trigger actions in XcodeBazelMCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches XcodeBazelMCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "swift_package_build": {
      "limits": [
        {
          "counter": "swift_package_build_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on XcodeBazelMCP (124)

- `bazel_ios_agent_debug_log_clear` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-agent-debug-log-clear.md
- `bazel_ios_clean` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-clean.md
- `bazel_ios_device_uninstall_app` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-uninstall-app.md
- `bazel_ios_device_unpair` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-unpair.md
- `bazel_ios_erase_simulator` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-erase-simulator.md
- `bazel_ios_uninstall_app` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-uninstall-app.md
- `swift_package_clean` — Destructive — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/swift-package-clean.md
- `bazel_daemon_start` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-daemon-start.md
- `bazel_daemon_stop` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-daemon-stop.md
- `bazel_ios_agent_debug_repro` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-agent-debug-repro.md
- `bazel_ios_boot_simulator` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-boot-simulator.md
- `bazel_ios_build` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-build.md
- `bazel_ios_build_and_run` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-build-and-run.md
- `bazel_ios_device_build_and_run` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-build-and-run.md
- `bazel_ios_device_install_app` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-install-app.md
- `bazel_ios_device_launch_app` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-launch-app.md
- `bazel_ios_device_log_start` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-log-start.md
- `bazel_ios_device_log_stop` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-log-stop.md
- `bazel_ios_device_pair` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-pair.md
- `bazel_ios_device_stop_app` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-stop-app.md
- `bazel_ios_device_test` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-device-test.md
- `bazel_ios_discover_targets` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-discover-targets.md
- `bazel_ios_double_tap` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-double-tap.md
- `bazel_ios_drag` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-drag.md
- `bazel_ios_install_app` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-install-app.md
- `bazel_ios_key_press` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-key-press.md
- `bazel_ios_launch_app` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-launch-app.md
- `bazel_ios_lldb_attach` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-lldb-attach.md
- `bazel_ios_lldb_breakpoint` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-lldb-breakpoint.md
- `bazel_ios_lldb_command` — Execute — https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp/bazel-ios-lldb-command.md
- …and 94 more: https://policylayer.com/tools/xcodebazelmcp-xcodebazelmcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=xcodebazelmcp-xcodebazelmcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/xcodebazelmcp-xcodebazelmcp
