Skip to main content
Glama

swift_package_run

Execute an executable target from a Swift Package using swift run. Specify the package path, executable name, arguments, build configuration, timeout, background execution, and parse-as-library flag.

Instructions

Runs an executable target from a Swift Package with swift run

Input Schema

NameRequiredDescriptionDefault
argumentsNoArguments to pass to the executable
backgroundNoRun in background and return immediately (default: false)
configurationNoBuild configuration: 'debug' (default) or 'release'
executableNameNoName of executable to run (defaults to package name)
packagePathYesPath to the Swift package root (Required)
parseAsLibraryNoAdd -parse-as-library flag for @main support (default: false)
timeoutNoTimeout in seconds (default: 30, max: 300)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "arguments": { "description": "Arguments to pass to the executable", "items": { "type": "string" }, "type": "array" }, "background": { "description": "Run in background and return immediately (default: false)", "type": "boolean" }, "configuration": { "description": "Build configuration: 'debug' (default) or 'release'", "enum": [ "debug", "release" ], "type": "string" }, "executableName": { "description": "Name of executable to run (defaults to package name)", "type": "string" }, "packagePath": { "description": "Path to the Swift package root (Required)", "type": "string" }, "parseAsLibrary": { "description": "Add -parse-as-library flag for @main support (default: false)", "type": "boolean" }, "timeout": { "description": "Timeout in seconds (default: 30, max: 300)", "type": "number" } }, "required": [ "packagePath" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SampsonKY/XcodeBuildMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server