Skip to main content
Glama

add_file_to_project

Add a file to the active Xcode project by specifying its path, optional group, and target name.

Instructions

Adds a file to the active Xcode project.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupNoGroup path within the project to add the file to (e.g., 'MyApp/Models'). If not provided, will add to the root group.
filePathYesPath to the file to add to the project
targetNameNoName of the target to add the file to. If not provided, will try to add to the first target.
createGroupsNoWhether to create intermediate groups if they don't exist (default: true)
Behavior2/5

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

No annotations are present, so the description must carry the transparency burden. It only says 'adds a file', but does not disclose that this modifies the Xcode project file, what happens if the file already exists, or whether the file is copied or referenced. The createGroups default is hidden in the schema, not described.

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?

The description is a single, concise sentence with no filler or redundancy. It is front-loaded with the verb and object, making it easy to scan.

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

Completeness2/5

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

Despite having 4 parameters and no output schema, the description provides minimal context. It omits important details such as return behavior, side effects on the project file, and how optional parameters affect the outcome. With no annotations or output schema, the description leaves significant gaps.

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 coverage is 100%, so the schema already documents all parameters with descriptions. The tool description adds no extra parameter semantics beyond the schema, which is the baseline expectation. A score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the verb 'adds' and the object 'a file to the active Xcode project', which distinguishes it from sibling tools like add_project_to_workspace. It lacks explicit differentiation from all siblings, but the core purpose is unambiguous.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites (e.g., active Xcode project), when to prefer add_file_to_project over write_file or create_directory, or any exclusions. The context is implied but not explicit.

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