ClaudeHowSupport Us

The text-editor tool's type and name fields don't match

What the error is telling you

The text-editor tool is declared with two fields that both have to describe the same tool version — a type and a name — and a request gets rejected when they don't actually match. It's easy to end up in this state without noticing, because both fields look like configuration boilerplate that rarely needs to change once it's copied from a working example, right up until the version it references gets updated in only one of the two places.

How the mismatch actually happens

The most common way this occurs is upgrading example code from one source without checking whether it upgraded both fields consistently — a type value bumped to reference a newer tool revision while the name field, copied from an older snippet, still refers to the version that value went with. The API doesn't try to guess which one you meant; a type and name that don't correspond to the same declared version is rejected as invalid rather than resolved in either field's favour.

The fix

Treat type and name as a single unit that gets copied and updated together, never independently. When you pick up example code for the text-editor tool, use it as originally paired rather than merging the type from one source with the name from another — a "newer type, older name" combination (or the reverse) is exactly the shape of mismatch this error catches. If you maintain your own reference snippet for this tool internally, keep it as one block rather than two fields documented separately, so nobody updates half of it in isolation later.

If you're building or debugging a broader tool-use setup rather than this one tool specifically, using the text-editor tool correctly covers the rest of the surface, and Claude tool use, a working quickstart is the right starting point if this is your first tool-use integration.

Verified 2026-08-08 against ClaudeHow facts module (src/data/facts/) — see /about/#accuracy.