Skip to main content

Function: applyLastToolCacheControl()

applyLastToolCacheControl<T>(tools, ttl?): T | null | undefined

Defined in: packages/core/src/prompt-cache.ts:175

Stamp the last always-loaded tool when the plan is on and no tool already carries a stamp. Does not mutate tools — returns a shallow copy only when a stamp is added.

Type Parameters

T

T extends Record<string, unknown>

Parameters

tools

T | null | undefined

ttl?

AnthropicCacheTtl

Returns

T | null | undefined