local_commit_msg
Draft a commit message from a diff using a local code model, optionally reading the diff file server-side so large changes stay out of Claude's context.
Instructions
PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need a commit message, not the literal content.
Drafts a commit message from a diff, with a local code model.
Pass 'path' to a diff file (e.g. the output of `git diff` dumped to a file) and it is read
server-side, so the full diff does NOT enter Claude's context. Alternatively pass 'diff' as
text. ALWAYS review the message before using it.
The language follows the recent commits of the git repo that holds the 'path' file (so dump
the diff inside the repo), unless LOCAL_DELEGATE_COMMIT_LANGUAGE is set.
Args:
diff: The diff as text (use this or 'path').
path: Path to a file with the diff (read server-side).
style: 'conventional' (Conventional Commits) or 'plain'.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "local_commit_msg"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | No | ||
| path | No | ||
| style | No | conventional |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |