Two fixes ago, update_article — one of the tools in this repo's MCP server — got hardened twice. The first time, because it took a bare integer article_id, PUT whatever fields you gave it straight to the DEV.to API, and if the id was wrong it would silently overwrite a live published post with nothing left behind to prove it happened. That fix added a fetch-before-write step and a JSONL audit log. The second time, because the diff the log recorded was a hardcoded {title, published} pair regardless of what you actually changed — a body_markdown-only edit showed up in the log as "nothing changed," which was worse than not logging at all.

Both fixes made the function more careful about what it writes and how it records the write. Neither one asked whether the function should write anything at all.

Here's the signature:

def update_article(article_id: int, title: str = None, body_markdown: str = None, published: bool = None) -> dict:

before = _dev(f"/articles/{article_id}")