Ready-to-use edit_file tool implementation using Morph’s fast apply API - just copy and paste into your Cursor workspace
edit_file
tool that you can paste directly into
Cursor, Windsurf, Cline, Continue, and other AI IDEsedit_file
tool. Many research papers have shown that having LLMs like Claude/Gemini do
code edits via normal JSON tool calls results in worse overall coding
performance due to constrained decoding. For the best coding performance, you
can use XML tags for your tool calls. See how
Cline
and
Cursor
use XML tags for all their tool calls.npm install openai
or npm install ai zod
export MORPH_API_KEY="your-api-key-here"