You edit one tool description between two requests. What happens to the cache?
Why D is the answer
The entire cache is invalidated
Tools sit at the start of the prefix, so changing a name, description or parameter invalidates the whole cache. Keep tool definitions stable and in a fixed order.
In detail
- Tools sit at the very start of the prefix.
- Changing a name, description or parameter therefore invalidates everything.
- Keep definitions stable, and in a fixed order.
- Group tool changes into planned releases.
Use case
An illustrative scenario, not a real incident.
A developer tweaks one tool description to fix a typo. The next requests all miss the cache. It is a one-off cost, but frequent edits would cancel the savings.
See it in different ways
flowchart LR A["Tools"] --> B["System"] B --> C["Messages"] C --> D["New user turn"]
flowchart LR A["Tools"] --> B["System"] B --> C["Messages"] C --> D["Variable content last"]
flowchart TD
Q{"What changed?"}
Q -->|"Tools"| A0["Whole cache"]
Q -->|"System"| A1["System and messages"]
Q -->|"Messages"| A2["Only later messages"]Key point: Tools sit first, so a change there resets everything.
Why the other options are wrong
- A. Only the message cache is lost
- The loss starts at the tools, so more than messages is lost.
- B. Only the system cache is lost
- The system cache comes after tools, so messages are lost as well.
- C. Nothing, because tools are not cached
- Tools are part of the prefix.

