Skip to main content
Glama
by wubbyweb
code_editing.mdโ€ข869 B
# Code Editing Guidelines ## apply_diff ```xml <apply_diff> <path>File path here</path> <diff> <<<<<<< SEARCH Original code ======= Updated code >>>>>>> REPLACE </diff> </apply_diff> ``` ### Required Parameters: - `path`: The file path to modify - `diff`: The diff block containing search and replace content ### Common Errors to Avoid: - Incomplete diff blocks (missing SEARCH or REPLACE markers) - Including literal diff markers in code examples - Nesting diff blocks inside other diff blocks - Using incorrect diff marker syntax - Including backticks inside diff blocks when showing code examples ### Best Practices: - Always verify the file exists before applying diffs - Ensure exact text matching for the search block - Use read_file first to confirm content before modifying - Keep diff blocks simple and focused on specific changes

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/wubbyweb/mcp-demo'

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