Skip to main content
Glama

sync_file

Copy a file between paths in the same session repository, with optional hash verification to confirm source integrity and track target changes.

Instructions

Copy a file from source to target within the same Direct session repo. Both paths must be inside the session repo_path. Returns before/after sha256 hashes and whether the target changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesDirect session ID
source_pathYesRelative path to source file within repo
target_pathYesRelative path to target file within repo
expected_source_sha256NoOptional: expected sha256 of source file
expected_target_sha256NoOptional: expected sha256 of target file before copy
Behavior3/5

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

With no annotations, the description must disclose behavior. It reveals constraints (paths inside repo), return values (hashes and changed flag), but does not specify overwrite behavior (whether target is overwritten) or creation of missing directories.

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, each providing essential information: the action and constraints in the first, the return value in the second. No unnecessary 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 no output schema, the description adequately explains the return value. Parameter descriptions are complete via schema. The tool is simple, and the description covers the key points. Slightly missing edge cases like file existence or overwrite behavior.

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 parameters are individually described. The description adds the overall constraint that both paths must be inside the session repo_path, which is somewhat redundant with the schema descriptions. No additional meaning beyond the schema.

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 verb 'Copy' and resource 'file' with specific scope: within the same Direct session repo. This distinguishes it from sibling tools like read_workspace_file (read-only) and get_diff (diff).

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 explicit guidance on when to use this tool versus alternatives. It does not mention when copying is appropriate or when other tools like merge_worktree or read_workspace_file should be used instead.

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/jiezeng2004-design/PatchWarden'

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