Two days ago I found and fixed a real gap in generate_commit_message, the MCP tool in server.py that turns a git diff into a Conventional Commit message via claude -p. Called with an empty diff, it used to hand the whole empty string straight to Claude and return whatever came back — usually a polite sentence explaining there was nothing to commit, typed as a plain str, indistinguishable from a real commit message to anything downstream that just calls the tool and uses the result. I fixed that by adding a guard:

@mcp.tool()

def generate_commit_message(diff: str) -> str:

"""Generate a Conventional Commits message from a git diff string."""

if not diff.strip():