Dev.to
7/19/2026

My AI Commit Script and My MCP Tool Run the Exact Same Code. Only One of Them Is Agentic.
Short summary
The author compares a 20-line git commit script and an equivalent MCP tool that call the exact same Claude CLI under the hood. The only meaningful difference is the @mcp.tool() decorator, which publishes a JSON Schema interface that agents can discover and reason about without executing the function. A script is a black box reachable only by humans who memorized its invocation; a tool is agentic because its interface contract is machine-readable, typed, and discoverable before any call is made.
- •Same Claude CLI call, different interface: MCP decorator publishes a schema agents can discover
- •Scripts are black boxes with human-oriented failure modes (print + exit code); MCP tools have typed contracts
- •Agentic = machine-readable interface contract, not just 'an LLM is involved'
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



