edit_package_swift
Directly edit the Package.swift manifest of the active Swift package, enabling changes not supported by other SPM tools. Optionally creates a backup before overwriting.
Instructions
Directly edit the Package.swift file of the active SPM project. This is useful for making changes that aren't supported by the other SPM tools.
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": {
"content": "<content>"
},
"name": "edit_package_swift"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The new content for the Package.swift file | |
| packagePath | No | Optional path to the Package.swift file. If not provided, uses the active project's Package.swift. | |
| createBackup | No | Whether to create a backup of the original file (default: true) |