Skip to main content
Glama

init_swift_package

Set up a new Swift Package Manager project in the current directory when a Package.swift is absent. Configure package type, name, and test framework to begin.

Instructions

Initializes a new Swift Package Manager project in the current directory. Use this tool first if your project doesn't have a Package.swift file yet and you want to start using Swift packages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the package (defaults to directory name)
typeNoType of package to create (library, executable, tool, build-tool-plugin, command-plugin, macro, or empty)
enableTestsNoEnable test targets (default: true)
testingFrameworkNoTesting framework to use (xctest or swift-testing)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions initialization in the current directory and implies creation of Package.swift, but does not disclose potential side effects like overwriting existing files, whether the directory must be empty, or exactly what files are generated. For a straightforward init tool this is adequate but leaves some gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, first gives the core action, second gives usage guidance. No redundant information, front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple init tool with 4 optional parameters fully described in the schema, the description is complete enough: it states what it does, where, and when to use it. It doesn't cover edge cases like overwrite behavior, but the core information needed to select and invoke the tool is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and every parameter has a clear description, so the schema already communicates names, types, defaults, and enums. The description adds no parameter-specific information, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Initializes a new Swift Package Manager project in the current directory', with a specific verb (initializes), resource (Swift Package Manager project), and location (current directory). This distinguishes it from sibling tools like add_swift_package or create_xcode_project.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use this tool first if your project doesn't have a Package.swift file yet and you want to start using Swift packages', providing a clear condition for when to use it. This implies it is a prerequisite for other package operations and differentiates it from tools that modify existing packages.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/r-huijts/xcode-mcp-server'

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