fsguard-mcp
fsguard-mcp
一个文件系统 + git MCP 服务器,将每个操作都限制在允许的目录树内,基于符号链接解析后的路径包含,而不是字符串前缀匹配。
为什么会有这个项目
Anthropic 的官方文件系统和 git MCP 服务器(@modelcontextprotocol/server-filesystem,属于 modelcontextprotocol/servers 仓库,89.7k★)在十个月内,两个服务器之间出现了五个人口限制功能的 CVE,而这个模式仍然还在持续:
CVE-2025-53109 / CVE-2025-53110(文件系统,CVSS 8.4/7.3)——“允许目录”检查用的朴素地是
startsWith()前缀匹配,结果被符号链接以及仅仅共享字符串前缀的兄弟目录绕过(例如允许的/home/user-safe会把/home/user-safe-evil),造成文件系统级的读/写,并且有一条已记录的 RCE 路径。CVE-2025-68143 / CVE-2025-68144 / CVE-2025-68145(git)——
git_init接受任意的未校验路径;git_diff/git_checkout直接把用户可控的参数带给了git命令暂存(参数注入);而--repository约束模式其实并没有真正校验repo_path仍留在受限目录里。CVE-2026-27735(git,,在本项目开始前约 4 个月发布)——通过 GitPython 的
repo.index.add()实现的git_add,对../风格路径没有强制限定在工作区边界以内,于是能暂存并泄露仓库之外的受贿文件。已记录的 RCE 链:在可写目录里先
git_init→ 写入恶意.git/config(含clean过滤器) → 再配合.gitattributes应用该过滤器 → 然后git_add触发这个过滤器 → 任意 shell 被任意执行。
每一个修复的方法都是在那一个函数上缝上一个弦/前缀(string/prefix)检查。没有人把边界的使命挪到一个新的工具不可能忘记去调用的位置上——这正是第四个 CVE 在前三个被宣布“修复”后四个月还能落地同一个系统上的原因。
Related MCP server: Secure Local Workspace MCP
fsguard-mcp 有不同的地方
唯一的安全原语,处处复用。 每个工具——无论是文件系统还是 git——在执行任何操作之前,都先通过同一个
ConfinedRoot(见confined_path.py)来解析它的目标路径。不会出现“某个新工具忘了加路径检查”的情况。基于符号链接解析和组件比较的包含,不是字符串匹配。 一个路径只有在其完全解析后的真实路径(每个符号链接都跟随)作为根目录自身真实路径的真实子路径时,才算是在根内。这个安全依赖解析后的
Path.is_relative_to()来实现——绝不会用字符串给出的startsWith()。仅此一条就关闭了 CVE-2025-53109/53110 的具体失败模式:当根被解析为/allowed后,/allowed-evil不可能通过包含判断,因为比较的是路径的组件,不是字符串的前缀。**为了让内容做事,绝不把请求转成
git。 git 操作体现在全经过dulwich——一个纯 Python git 实现,它不派生子进程,也从不从用户可控内容构建 argv(任何内容关注操作都不会),并且更难能可贵的是,它根本不会执行 clean/smudge 过滤器——这正好是 RCE 链所依赖的。因此这里没有参数注入风险面,因为没有一份 argv 会被递给外部进程去读取/写入文件内容知识点。(dulwich确实仍然会通过subprocess.call()运行存在的pre-commit/commit-msg/post-commithooks——那是真实的进程执行,但和内容过滤无关。git_commit始终传no_verify=True来全部跳过它们,而没有依赖“夹心”代码恰好不会被执行。)写操作会同时校验父目录,不只是原本就存在的目标文件。 这补上的缺陷是:目标还不存在时(于是“该路径能否解析进出根内”查的是不存在的路径,不可做 symlink 解析),但它的父目录本身却是一条指到根目外部的符号链接。在任何“哪边父”之前,不存在的路径段会先做纯词法形式的目录 () 归一——将
.、..作为纯路径代数做折叠,至于这些东西是不是真的磁盘上不存在。之前的一个本版本里:先提供了输入的合法性(包含检查)再做归一化,然后在 Windows 上虽然省过了路规自己的 tests(因为 Windows 路径 API 会替你把..直接规范化),在 Linux/macOS 则是可绕过的。现在修复的是,并已有针对该情况的专属测试——这也是这项目为什么看到窗外“我的机器上测试全绿”,会投以真正的怀疑。.git/config不能将操作重定向到目录根之外。 dulwich 会尊重仓库自己的core.worktree配置,而 commit 每个 git 操作每次都会从路径字符串内部重新打开Repo。换句话说,调用者可以写一个core.worktree指向任何位置的.git/config,之后所有的 git 工具都会静默地作用在受约束根之外——而这不会被“这一条路径”的校验发现(那这个检查只看限定到的仓库路径,永远不看 dulwich 已经默默把整个仓库挪到了哪里)。这个问题正是本仓库自己的第二轮安全审查中发现的一个真实攻击原语:只用这个服务器自身暴露出来的工具,就能完成读取、尤其是数据夹带。严重度比它要修掉的 CVE。可现在每个 git 工具都会直接拒绝配置里写有core.worktree的仓库,并且各自再次确认它真正实际打开的Repo所报告的工作路径,就是当时已校验的那个确认路径。UNC 路径与跨驱动资质路径,在任何网络或磁盘触碰之前,就被拒掉。 例如解析
\\host\share\...在 Windows 上会真的尝试 SMB 连接——Windows 还会让这个连接以服务器进程的身份进行认证,这就是“用 UNC 路径强制执行 NTLM 认证”凭据窃取手段的价值;除此之外,如果目标主机不可达,服务器还会阻塞进这段完整连接超时的时间段。现在,凡是与受限根、不同驱动ven /不同目标 host 相对的候选,超出任何文件系统/网络索引时,都先会用成本很低的字符串比较淘汰掉。同时,NTFS 设备数据流(例如file.txt:hidden)也会被安排为拒绝排除——它们不会出现在目录列表里(不可见),却能绕过同一个路径字符串直接读写,而且可以伪造成某个只需要上下取消——Files.
工具
工具 | 说明 | |
| 读取文本文件 | |
| 创建或覆盖一个文本文件 | |
| 列出目录 | 列出条目 |
| 递归查找符合 glob 模式的文件 | |
| 移动 / 重命名文件 | |
| 初始化一个 git 仓库 | |
| 显示已暂存 / 未暂存 / 未跟踪的文件 | |
| 暂存文件 | |
| 提交已经暂存的更改 | |
| 显示差异 | |
| 显示提交历史 |
配置方式
pip install fsguard-mcp
export FSGUARD_ROOT="/path/to/the/one/directory/tree/this/server/may/touch"
fsguard-mcpFSGUARD_ROOT 是必填的——没有默认值,服务器也绝不偷懒自己猜一个。把 MCP 客户端指向 fsguard-mcp 指令,并在其环境变量配置里设置 FSGUARD_ROOT'。
测试
pip install -e ".[dev]"
pytest tests/ -v全部 68 个测试都是会自足(真实临时目录、通过的符号链接、真实 git 仓库),进一步不需要任何外部服务。
已知的限制
保证参与了存在后,然后进行一致性时间;也就是说两次操作之间有一个内在的启 TX 时间差(TOCTOU,time-of-check-to-time-of-use)。如果一辆有写权限的进程能写入受限根自身目录树,它原则上就可能在这个间隙里抓换 symlink(它是人类在内审中用一个可以工作的 PoC 验证过的)。真要在根的部分封死这类问题,只能 OS 级的原语(如 Linux 的 openat2(RESOLVE_BENEATH) 或真实的 mount 名字容器),而不是用可读的可移植 Python 脚本。所以本项目的承诺是“包含逻辑正确,每次使用前立即检查”,并不是“针对一个已经能在里面写内容的并发攻击者还不可侵”。
现状
v0.1.0,已 live 在 PyPI。68 个测试通过(是 unit 级,并且真实在 disk 上创建 symlink /创建仓库——并不是进程逻辑断字)。在首版的第一次 commit 之前通过了对付式的安全审查;两轮都找到真实可用的加载绕过(其中之一是在 POSIX 经过尚不存在的路径中构造 .. 逃逸,还有上文说到的 core.worktree 重定向,等等更小的发现)。现在它们都已修复——直接针对报告的攻击路径写的测试回归——,还对新发布 package 重新做了一次干净 pip install,并重新验证过。
许可证
MIT
Available Tools
11 toolsfs_listA
List the entries of a directory, each tagged file or directory.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal that entries are tagged by type, which is useful, but it omits details such as whether hidden files are included, whether the listing is recursive, or any read-only guarantee. For a simple list operation this is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that conveys the core action and output format without any fluff. It is front-loaded and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no complex schema, no output schema), the description covers the essential behavior and output type. It does not explain error handling or edge cases, but for a listing operation this is sufficient. The lack of annotations and output schema raises the bar, yet the description still provides enough for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not elaborate on the 'path' parameter beyond its presence in the schema. However, the parameter is self-explanatory and has a default, so the lack of extra explanation is not a major gap. The description adds no semantic detail but the situation is simple enough that this is acceptable.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'List' and the resource 'entries of a directory', and specifies that each entry is tagged as file or directory. This distinguishes it unambiguously from siblings like fs_read (read file content), fs_write, and fs_search, making the tool's purpose immediately understandable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. It does not mention scenarios where it is preferred (e.g., exploring a directory before reading a file) or when a different tool like fs_search would be more appropriate. The description lacks any routing or exclusionary context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fs_moveA
Move or rename a file/directory. Both source and destination must resolve within FSGUARD_ROOT. If destination already exists as a file, it is overwritten. If destination already exists as a directory, the call fails instead of moving source inside it.
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | ||
| destination | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It covers key behaviors: the FSGUARD_ROOT constraint, overwriting behavior for existing destination files, and failure on existing destination directories. These are critical edge cases. It doesn't mention permissions, reversibility, or what happens if the source doesn't exist, but the provided details adequately outline the operation's behavior for typical use.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the purpose, and includes all necessary behavioral constraints without redundancy. Every sentence adds value—there is no filler or repetition. This is exemplary conciseness for a tool definition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (move/rename with edge cases), the schema has no descriptions, no output schema, and no annotations, the description covers the essential aspects: the root constraint, overwrite behavior, and directory failure. It omits minor details like behavior when source is missing or return value expectations, but the absence of an output schema reduces the need to describe returns. Overall, it is adequately complete for an agent to call the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no per-parameter descriptions), so the description must compensate. It adds meaning by explaining both parameters must resolve within FSGUARD_ROOT and describes destination behavior. However, it does not explicitly define source as the current path and destination as the target path, nor does it specify path format (absolute vs relative). The added semantics are helpful but not fully comprehensive for a 0% coverage case.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb+resource combination: 'Move or rename a file/directory.' This immediately distinguishes it from siblings like fs_read, fs_write, fs_list, and fs_search, which cover other file operations. No ambiguity remains about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool (moving/renaming within FSGUARD_ROOT) and includes specific edge-case behaviors (overwrite on existing file, failure on existing directory). However, it does not explicitly mention alternatives or when not to use it, which would push it to a 5. The guidance is sufficient for an agent to decide this is the right operation among file tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fs_readA
Read a text file's contents. path is relative to FSGUARD_ROOT.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden. It correctly implies a read-only operation (no side effects) and adds the key detail that paths are relative to FSGUARD_ROOT. However, it does not disclose error handling, file encoding, or limitation to text files only, which are relevant for safe invocation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of two short sentences with no unnecessary words. The critical scoping detail (path relative to FSGUARD_ROOT) is front-loaded in the second sentence, ensuring the agent reads it.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read operation with one parameter and no output schema, the description is largely sufficient: it states the tool's function and the key path constraint. Minor gaps (such as return format and error behavior) are not critical given the simplicity, but a bit more detail could improve completeness relative to an agent's expectations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does so by explaining the crucial semantic of the path parameter: relative to FSGUARD_ROOT. This adds significant meaning beyond the bare schema, though it does not cover other potential constraints like allowed file types or size limits.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'read' and the resource 'text file contents', making the tool's purpose unambiguous. It also specifies that the path is relative to FSGUARD_ROOT, which differentiates it from sibling tools like fs_write, fs_list, fs_search, and fs_move.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage (reading file contents) but does not explicitly mention when to avoid this tool or provide alternatives. Unlike get_calls which names a sibling, here the sibling tool names are enough to infer differentiation, but no formal guidance is given. The intended context is clear from the verb 'read'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fs_searchA
Find files matching a glob pattern (e.g. '*.py') under path, recursively. Any match that resolves outside FSGUARD_ROOT — e.g. via a symlink — is silently excluded rather than reported.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | . | |
| pattern | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly discloses a critical behavior: 'Any match that resolves outside FSGUARD_ROOT — e.g. via a symlink — is silently excluded rather than reported.' This is non-obvious and crucial for an agent to know. It also mentions recursion. However, it does not describe the return format or error handling, which would be helpful but is not essential for a simple search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler. The first sentence front-loads the primary purpose with a concrete example; the second adds a relevant caveat about sandboxing. Every word earns its place, and the structure is efficient and scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity (2 params, no output schema), the description covers the essential context: recursion, glob matching, and the sandbox exclusion. It could explicitly state what the tool returns (e.g., a list of file paths) but that is inferable from 'Find files'. The non-obvious symlink behavior is disclosed, which is the most important missing context. Overall adequate for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains the 'path' parameter as the base directory ('under path') and 'pattern' as a glob pattern with an example ('*.py'). This adds meaning to both parameters beyond the bare schema definitions. It could be more explicit about the path default and relative vs absolute paths, but the core semantics are clear.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Find files matching a glob pattern under path, recursively.' This specifies the verb (find), resource (files), and the pattern-matching behavior, distinguishing it from siblings like fs_list (which presumably lists without pattern filtering) and fs_read (which reads content). No ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage (searching for files by pattern) but does not explicitly state when to prefer it over alternatives like fs_list or when not to use it. It does not mention any exclusions or competing tools, leaving the choice to inference. A clear 'use this instead of fs_list when filtering by pattern' would elevate this.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fs_writeA
Write (creating or overwriting) a text file. Parent directories are created as needed, but only within FSGUARD_ROOT.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that the operation overwrites existing content, creates parent directories as needed, and is restricted to FSGUARD_ROOT. This covers key side effects and constraints. It does not mention permissions, failure modes, or atomicity, but for a simple write operation the core behaviors are well disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no unnecessary words. It front-loads the primary action and immediately follows with important behavioral details. Every word adds value, making it an exemplar of efficient writing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter write tool, the description covers the essential behavior: creating/overwriting, parent directory creation, and the root restriction. It lacks details like return values or error handling, but those are not critical for an agent to invoke the tool correctly. Given the tool's simplicity, the description is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It clarifies that 'content' is text and 'path' can include nested directories (since parents are created) and must be within FSGUARD_ROOT. However, it does not explicitly define the format of 'path' (relative vs absolute) or provide examples. It adds some semantic value but is not fully explanatory.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Write'), the resource ('a text file'), and the behavior ('creating or overwriting'). It also notes the automatic creation of parent directories, which distinguishes it from a simple write. The sibling tools (read, list, search, move) are clearly distinct, so 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.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (for writing files), but does not explicitly state when not to use it or point to alternatives. There is no mention of exclusions or conditions, such as 'use fs_move to relocate files' or 'use fs_append for non-overwriting writes.' The intended usage is inferred from the verb and siblings, but not explicitly guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_commit_repoC
Commit staged changes. author must be 'Name '.
| Name | Required | Description | Default |
|---|---|---|---|
| author | Yes | ||
| message | Yes | ||
| repo_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the core action (commit) but omits side effects, such as whether it modifies the repository history, requires prior configuration (user.name/email), or how it handles empty commits. The author format hint is the only extra detail, which is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief, which is structurally good, but it sacrifices substance for brevity. It uses two short sentences and front-loads the purpose, but the content is so thin that it fails to earn its place as a useful guide. It is under-specified rather than efficient, so a 3 is appropriate.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that this is a mutating Git operation with no output schema and no annotations, the description should cover prerequisites (e.g., staged changes, existing repo, user config). It mentions 'staged changes' but omits what the commit will look like, error cases, and any required prior state. The description is incomplete for a tool in this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must clarify parameters, but it does not. Only the 'author' parameter is given a format hint ('Name <email>'), while 'repo_path' and 'message' are left entirely to the schema's title-only definitions. The description adds almost no value for parameter usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear action ('Commit staged changes') with a specific resource (the repository). It distinguishes itself from siblings like git_stage, git_diff_repo, and git_log_repo by focusing on committing, which is a distinct operation. No ambiguity about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by mentioning 'staged changes', suggesting it should be used after git_stage, but it does not explicitly state when to use this tool versus alternatives, nor does it mention any prerequisites or competing tools. The guideline is only implicit from the word 'staged'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_diff_repoC
Show the diff for a repo's working tree (or staged changes).
| Name | Required | Description | Default |
|---|---|---|---|
| staged | No | ||
| repo_path | No | . |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must fully disclose behavior. It doesn't state whether the operation is read-only, whether it modifies state, or what output to expect. It only says 'show the diff', leaving ambiguity about side effects and edge cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with zero wasted words. It states the action first and conveys the key distinction efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite being a simple tool, the description is incomplete: it doesn't specify the default behavior (staged=false means working tree), explain `repo_path`, or clarify that this is a read-only operation. With no annotations and low schema coverage, more context is needed for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description explains the `staged` distinction ('working tree or staged changes'), which adds meaning beyond the schema. However, it fails to mention `repo_path` at all, leaving its semantics unexplained. With 0% schema coverage, this partial compensation is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it 'Shows the diff for a repo's working tree (or staged changes)', using a specific verb and resource. It distinguishes from sibling tools like git_repo_status (status) and git_log_repo (history), though it doesn't name them explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. It doesn't mention exclusions, prerequisites, or situations where another sibling would be more appropriate. An agent must infer usage from the description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_init_repoA
Initialize a new git repository at repo_path (relative to FSGUARD_ROOT).
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It discloses that the tool mutates the filesystem by initializing a repository, but it does not mention side effects such as behavior when the path already exists, permissions needed, or failure modes. This is minimal beyond the obvious action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that immediately states the action and the key parameter nuance. There is zero redundancy, and the most important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with no output schema, the description covers the essential details: what it does and the path base. It could benefit from a note about idempotency or failure but is largely complete given its low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides no description for repo_path (0% coverage). The tool description compensates by clarifying that the path is relative to FSGUARD_ROOT, which is essential context. However, it does not elaborate on path format, existence requirements, or other constraints, so it only partially compensates for the lacking schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a clear verb ('Initialize') and a specific resource ('a new git repository at repo_path'), and adds the crucial context that the path is relative to FSGUARD_ROOT. This effectively distinguishes it from sibling git tools like git_repo_status or git_stage, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or exclusions are provided. The tool's name and description imply that it is for initializing a repository, while siblings handle other operations, but this is left to inference rather than stated clearly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_log_repoC
Show recent commit history.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | No | . | |
| max_entries | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must bear full responsibility for behavioral disclosure. It merely says 'Show', which implies a read-only operation, but it does not explicitly state that it is non-destructive, nor does it mention requirements like a valid Git repository, potential side effects, or any limitations on what 'recent' means.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely brief, which might be considered efficient, but it omits essential details. It is under-specified rather than appropriately concise—there is no front-loading of critical constraints, and the single sentence provides minimal value beyond the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool, a one-line description could be sufficient in a richer context, but here the schema and annotations are empty, and no output schema exists. The description fails to cover parameter semantics, expected behavior, or output format, leaving the agent with too little information to invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% (no descriptions in the input schema) and the description does not mention either parameter (repo_path or max_entries). The agent receives no guidance on what these parameters mean, their default values, or how they affect the output. The description fails to compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Show recent commit history.' This clearly conveys the tool's intent and is not a tautology. It does not explicitly differentiate from sibling tools like git_repo_status or git_diff_repo, but the resource is distinct enough for a capable agent to infer the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as git_repo_status or git_diff_repo. There is no mention of exclusions, prerequisites, or scenarios where this tool is preferred. The agent is left without contextual cues beyond the basic title.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_repo_statusB
Show staged, unstaged, and untracked files for a repo.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_path | No | . |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the burden of behavioral disclosure. It only says 'show', implying read-only, but does not explicitly state non-mutation, no side effects, or any constraints like requiring a valid git repository or permissions. No additional behavioral traits are revealed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with zero waste. It directly states the tool's output scope without filler. Every word contributes to understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple status tool, this is adequate but not complete. It tells what it shows but does not describe the return format, error behavior, or how repo_path is used (e.g., defaults to current directory). With no output schema, the agent lacks information about what to expect from the call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does not mention the repo_path parameter at all, nor its default behavior. While repo_path is self-explanatory from the name, the description adds no meaning beyond the schema, failing to compensate for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool shows staged, unstaged, and untracked files for a repo. This is specific and distinguishes it from siblings like git_diff_repo (differences) and git_log_repo (history). The verb 'show' and resource 'files' are unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No mention of when to use this tool versus alternatives. There is no guidance on when to prefer this over other git tools (e.g., git_diff_repo, git_stage) or any prerequisites like 'only use on a valid repo'. The description does not provide context for exclusion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
git_stageA
Stage files for commit. Every path is validated against FSGUARD_ROOT before being staged — a path that would escape the root fails the whole call, staging nothing.
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | ||
| repo_path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does this exceptionally well by revealing two critical behaviors: (1) every path is validated against FSGUARD_ROOT, and (2) a path escaping the root causes the entire call to fail, staging nothing. This goes far beyond what the schema provides and directly affects how an agent should reason about success/failure and safety.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, compact sentence that leads with the core purpose ('Stage files for commit') and immediately follows with the crucial safety behavior. There is zero filler, and the most important operational detail (path validation) is front-loaded. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with two parameters, no output schema, and no annotations, the description covers the purpose and a key safety behavior but omits essential operational details. It does not state what a successful staging returns, whether the repo_path must already be initialized (though sibling git_init_repo implies it may be), or how paths are interpreted (relative to repo_path?). While the safety note is valuable, the description leaves an agent guessing on parameter semantics and success indicators, so it is not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for its two parameters (repo_path and paths). The description does not explicitly explain these parameters beyond implying that 'paths' are files to stage and 'repo_path' is the repository location. It fails to clarify format (e.g., absolute vs relative paths), whether paths are relative to repo_path, or any constraints on repo_path. Given the low coverage, the description should have compensated with parameter details, but it does not.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Stage files for commit.' This is a specific verb ('stage') with a clear resource ('files for commit'), which distinguishes it from sibling Git tools like git_init_repo, git_repo_status, git_commit_repo, git_diff_repo, and git_log_repo. No ambiguity about what it does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: you stage files before committing. It does not explicitly mention when not to use it or alternative tools (e.g., 'use git_commit_repo to commit the staged files'), but the purpose is clear enough that an agent could infer its place in the workflow. It also highlights a critical constraint (path validation against FSGUARD_ROOT) that acts as guidance for safe usage, though it does not name alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v0.1.0- First observed
fs_list - First observed
fs_move - First observed
fs_read - First observed
fs_search - First observed
fs_write - First observed
git_commit_repo - First observed
git_diff_repo - First observed
git_init_repo - First observed
git_log_repo - First observed
git_repo_status - First observed
git_stage
TDQS
Scored across 11 tools
Each tool targets a distinct operation: file read, write, list, search, move; git init, status, stage, commit, diff, log. There is no overlap or ambiguity between tools, enabling reliable selection.
The naming follows a consistent fs_/git_ prefix pattern with action-oriented verbs. Minor deviation like 'git_repo_status' vs 'git_stage' (noun-verb vs verb-only) creates slight inconsistency but remains predictable.
11 tools cover file system and git operations without redundancy. The scope is well-balanced—enough to handle common workflows without overwhelming the agent.
The file system layer includes create, read, update, list, search, and move, but lacks a delete operation, which is a notable gap. Git coverage is solid for basic workflows but omits branch operations. Overall, a reasonable surface for the intended guarded-root use case.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Browse and manage files in your Moxt AI workspace from any MCP client.
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceExposes a secure, path-confined bridge to a local workspace and git remotes, enabling MCP clients to search, read, write, reset files, and perform git operations.-
- AlicenseAqualityBmaintenanceEnables ChatGPT and Codex to safely work with explicitly authorized local project folders through MCP, providing constrained file reading, searching, patch editing, Git inspection, and whitelisted tasks without exposing arbitrary shell, deletion, or deployment capabilities.17MIT
- AlicenseBqualityBmaintenanceEnables any MCP client to read, search, patch, and execute commands in a codebase, including interactive sessions and git operations, with permission modes and safety boundaries.18Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT or any MCP client to operate safely on a designated workspace by listing, reading, searching, writing, and trashing files, inspecting Git status/log/diff, and optionally running allowlisted executables without a shell.Apache 2.0