Skip to main content
Glama

file_operations

Destructive

Manage Unity project files by reading, writing, listing, and searching their contents. Supports scripts, shaders, configs, and more.

Instructions

Read, write, list, and search files within the Unity project.

Actions:

  • read: Read the contents of a file (scripts, shaders, configs, etc.)

  • write: Write/create a file in the project (auto-imports to AssetDatabase)

  • list: List files in a directory with optional pattern filtering

  • exists: Check if a file or directory exists

  • search: Search file contents for a text query (grep-like)

  • get_script_classes: Analyze a C# script to get its classes, methods, and fields

Paths can be absolute or relative to the project root. Examples:

  • "Assets/Scripts/MyScript.cs" (relative)

  • "Assets/Shaders/" (directory)

  • "ProjectSettings/ProjectSettings.asset" (project settings)

Security: All paths must be within the Unity project directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoFile or directory path (relative to project root or absolute). Examples: "Assets/Scripts/MyScript.cs", "Assets/"
queryNoSearch text for search action
actionYesFile operation to perform
contentNoFile content to write (required for write action)
patternNoFile name pattern for list action (e.g., "*.cs", "*.shader"). Default: "*.*"
extensionNoFile extension filter for search action (e.g., ".cs", ".shader"). Default: ".cs"
recursiveNoRecurse into subdirectories for list action. Default: false
Behavior4/5

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

Annotations indicate destructive and non-readOnly behavior. The description adds that write actions auto-import to AssetDatabase and enforces security constraints (all paths must be within project directory). No contradictions.

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?

Description is well-organized with a clear action list, path examples, and security note. It is concise yet informative, with no wasted words.

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?

Given the tool's complexity (7 parameters, no output schema), the description covers all actions and provides examples. It lacks return value details, but that is acceptable without an output schema.

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 baseline is 3. The description adds path examples but does not significantly enhance understanding beyond the schema's parameter descriptions.

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 the tool performs file operations (read, write, list, etc.) and distinguishes it from sibling tools by enumerating specific file-related actions. The verb+resource pairing is explicit.

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

Usage Guidelines4/5

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

The description provides path examples and a security note, giving users guidance on how to use the tool. While it does not explicitly state when to avoid it, the clarity of actions and context signals are sufficient.

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/joel-wehr/unity-mcp'

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