Skip to main content
Glama
lllli223

codex-workspace-codegraph-mcp

by lllli223

应用 Codex 风格补丁

apply_patch
Destructive

Apply Add, Delete, Update, and Move file patches using Begin/End markers. Uses relative workspace paths, validates all changes, and rolls back on failure.

Instructions

应用以 *** Begin Patch / *** End Patch 包裹的 Add、Delete、Update、Move 文件补丁。路径只能相对工作区;所有操作先验证,失败时尝试回滚。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchYes
Behavior4/5

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

Annotations already convey the destructive profile (destructiveHint=true, readOnlyHint=false), and the description adds genuinely useful behavior beyond that: all operations are validated before applying, rollback is attempted on failure, and paths are restricted to workspace-relative. This materially helps an agent anticipate failure semantics and safety boundaries.

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 compact sentences with zero filler: the first front-loads purpose and format, the second packs the critical constraints (path scoping, validation, rollback). Every clause earns its place.

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

Completeness3/5

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

The tool is simple on the surface (one required string parameter, no output schema, no nested objects), and the description covers the envelope, operations, path scope, and failure behavior. However, it omits the precise patch-entry grammar and what the tool returns on success, both of which an agent would need to invoke it reliably; the complexity of the patch format makes these omissions notable.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must carry the semantic burden, and it largely does: it defines the expected patch envelope, the four operation types, and the relative-path constraint. It stops short of specifying the exact per-entry syntax (e.g., how file paths and content blocks are delimited inside the patch), which an agent would still need to construct a valid patch.

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 names a specific verb (apply), a specific resource (Codex-style file patches), and pins the exact format wrappers ('*** Begin Patch / *** End Patch') plus the supported operations (Add, Delete, Update, Move). This clearly distinguishes it from single-operation siblings like write_file, edit_file, delete_path, and move_path.

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 given on when to choose apply_patch over its many file-operation siblings (write_file, edit_file, delete_path, move_path). The description states what the tool does but never says when it should be preferred, e.g., for batched multi-operation changes, nor what conditions would make an alternative more appropriate.

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/lllli223/codex-workspace-codegraph-mcp'

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