Dynamic Tool Loading
Dynamic loading should not break KV Cache: the full schema of a new tool is appended to the end of the context (the trajectory), the static prefix remains stable. Appending to the end does not invalidate the cache: causal attention means that the K and V of already cached tokens do not change. The schema is fixed in place on first appearance and then cached as normal history (not re-appended to the end every round). API level support: toolsearch + deferloading at OpenAI, tool_reference at Anthropic, BM25 search in Codex CLI. The “define tools only at the beginning” rule is no longer a hard rule.
Related: [Proactive Tool Discovery], KV Cache, [MCP Protocol]