Skip to content

code_smart_diff

code_smart_diff takes the current git diff and passes it to an LLM, which returns a plain-language explanation of what changed and what the impact is — scoped to your specific question.

Requires GL_SMART_READ=true in the MCP server environment.

code_smart_diff(question="what changed in the parser?")
code_smart_diff(question="are there any breaking changes?", base="HEAD~3")
code_smart_diff(question="summarize the security implications")
ParameterTypeDefaultDescription
questionstringrequiredWhat you want to know about the changes
basestringHEAD~1Base ref to diff against
ApproachTokens
code_diff_context() — full diff + callers~4,000
code_smart_diff(question="breaking changes?")~200

80% token savings with a focused, opinionated answer.

  • Code review — understand the intent of a large diff quickly
  • Security audit — ask specifically about security implications
  • Release preparation — identify breaking changes before tagging
  • Requires GL_SMART_READ=true in the MCP server configuration
  • For raw diff + caller impact data, use code_diff_context instead
  • The LLM explanation is guided by your question — a precise question yields a precise answer