The Claude Code Changelog
All Episodes
Claude Code Fixes MCP Truncation in 2.1.280

Claude Code Fixes MCP Truncation in 2.1.280

0:00|0:00

Claude Code 2.1.280 adds a long-awaited fix for MCP tool descriptions that were silently capped at 2,048 characters, plus a new environment variable to raise or lower the limit as needed. The episode also covers the tradeoffs of larger prompts, a Write tool validation patch, and quality-of-life fixes like improved modal exits and better scrolling.


Chapter 1

Uncapping MCP Tool Context with Custom Description Limits in Claude Code

Lachlan Reed

Have you ever spent hours, like, writing this incredibly detailed SQL schema or OpenAPI spec for an MCP tool, only to feel like Claude is just, uh, completely ignoring half your instructions?

James Turner

Oh, man, constantly! You think it's a prompt engineering issue, or maybe the model's just hallucinating, but it turns out... it was actually getting chopped off at TWO THOUSAND FORTY EIGHT characters!

Lachlan Reed

Exactly right, mate! Pure, silent truncation. But in Claude Code version two point one point two hundred and eighty, Anthropic finally gave us an escape hatch. And hey, quick shoutout to our sponsor Jellypod AI, making podcast creation as smooth as clean code.

James Turner

Yeah, so what is this escape hatch actually called?

Lachlan Reed

It's an environment variable: CLAUDE CODE MAX MCP DESCRIPTION LENGTH.

James Turner

Say that three times fast! But wait, so by default, every tool description and server instruction in Model Context Protocol had a hard two thousand forty eight character cap?

Lachlan Reed

Yeah, two thousand forty eight characters. If your database schema or, or tool documentation went over that limit, it just got clipped. No warning, no error message, just gone.

James Turner

That's brutal for enterprise tools. I mean, if you're wrapping a massive API with dozens of parameters, two thousand characters disappears instantly.

Lachlan Reed

Spot on. So now, you can just export that environment variable in your terminal. Say, setting it to eight thousand one hundred and ninety two.

James Turner

Okay, so if I run export CLAUDE CODE MAX MCP DESCRIPTION LENGTH equals eight thousand one hundred and ninety two, boom, my entire schema fits into context!

Lachlan Reed

Bang on. But, uh, you know, there's a flip side to cranking that all the way up.

James Turner

Right, because every single turn, those expanded tool descriptions get stuffed right into your input prompt, don't they?

Lachlan Reed

Exactly, mate. You're paying for those input tokens on every turn. Plus, if you keep changing tool descriptions on the fly, you invalidate your prompt cache!

James Turner

Oof, yeah. That cache miss fee will bite you real quick. And honestly, if you make descriptions too wordy, the model can actually get confused about which tool to pick.

Lachlan Reed

Yeah, too much noise in the description degrades tool routing accuracy. So it's a balance. You can even dial it down to, say, five hundred twelve characters for lightweight wrappers if you want to shave down your input context overhead.

James Turner

Oh, that's smart! And you can monitor your prompt token usage right in the CLI by typing slash status, right?

Lachlan Reed

Slash status, yeah! Shows you your context usage right there.

James Turner

Man, that's such a solid tweak. And speaking of CLI fixes in two point one point two hundred and eighty, did you see the Write tool patch?

Lachlan Reed

Oh, mate, I hit that bug last week! Models kept passing path or file text instead of file path and content, and the validator would just throw a wobbly and crash the call.

James Turner

Right! Now it handles parameter aliases gracefully. So if the model sends file content or a stray description field, Claude Code normalizes it instead of failing validation.

Lachlan Reed

Such a relief. Oh, and double pressing Control C or Control D inside modals like slash model or slash config actually closes the dialog now, instead of nuking your whole terminal session!

James Turner

Thank goodness! I lost count of how many active sessions I accidentally killed trying to exit a menu! Plus, mouse wheel scrolling finally works in slash skills and slash plugin in fullscreen mode.

Lachlan Reed

Simple stuff, but it makes the whole developer experience so much smoother.

James Turner

Definitely. Definitely update to two point one point two hundred and eighty if you're heavy on MCP tools. Alright, good chatting!

Lachlan Reed

Good chatting, talk soon!