kdeps-tools-google_cache_create
v2.0.0Create a Google AI server-side cached content entry from a text system prompt. Returns the cache name (e.g. 'cachedContents/xyz123') for use in chat: googleCachedContent. Only available when GOOGLE_API_KEY is set.
set tools / shelf tools
LLM context: ~158 tokens when loaded (prompt or tool definition)
Where it runs
Part of the tools set, used in workflow and agent mode. What the model is told about each built-in tool: its description, usage notes and parameters. kdeps runs the tool itself.
- the agent loop builds the request
- the tool definitions are sent to the modeltools/google_cache_create
- the model calls a tool
- kdeps runs it
- the result goes back to the model
Loaded by: kdeps (agent loop), /update, /settings, kdeps run, kdeps install, kdeps list, kdeps uninstall, kdeps update
In the code: kdeps (agent loop)agent.RegisterBuiltinToolsagent.definedAs
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Pin a version with kdeps install tools/google_cache_create@<version>.
Contents
Create a Google AI server-side cached content entry from a text system prompt. Returns the cache name (e.g. 'cachedContents/xyz123') for use in chat: googleCachedContent. Only available when GOOGLE_API_KEY is set.
| Parameter | Type | Description |
|---|---|---|
| content * | string | Text to cache as a system prompt (must be >= 32K tokens for caching benefit) |
| model * | string | Gemini model name (e.g. 'gemini-2.5-flash') |
| ttl | string | Cache lifetime in seconds with an s suffix (e.g. '3600s' for an hour). Default: '3600s'default: 3600s |
HTTP call (declared in YAML, no Go code)
https://generativelanguage.googleapis.com/v1beta/cachedContentsOffered when set: GOOGLE_API_KEY
- Content-Type:
- application/json
- x-goog-api-key:
- {{.env.API_KEY}}
Body
{"model": {{json (print "models/" (trimPrefix .args.model "models/"))}}, "systemInstruction": {"parts": [{"text": {{json .args.content}}}]}, "ttl": {{json .args.ttl}}}
Result
{{.response.name}}
version: 2.0.0
description: 'Create a Google AI server-side cached content entry from a text system prompt. Returns the cache name (e.g. ''cachedContents/xyz123'') for use in chat: googleCachedContent. Only available when GOOGLE_API_KEY is set.'
parameters:
content:
type: string
description: Text to cache as a system prompt (must be >= 32K tokens for caching benefit)
required: true
model:
type: string
description: Gemini model name (e.g. 'gemini-2.5-flash')
required: true
ttl:
type: string
description: 'Cache lifetime in seconds with an s suffix (e.g. ''3600s'' for an hour). Default: ''3600s'''
default: 3600s
http:
env:
API_KEY: [GOOGLE_API_KEY] # the tool is listed only when this is set
method: POST
url: https://generativelanguage.googleapis.com/v1beta/cachedContents
headers:
Content-Type: application/json
x-goog-api-key: "{{.env.API_KEY}}"
# The API names models as models/<name>; a name given either way works.
body: '{"model": {{json (print "models/" (trimPrefix .args.model "models/"))}}, "systemInstruction": {"parts": [{"text": {{json .args.content}}}]}, "ttl": {{json .args.ttl}}}'
result: '{{.response.name}}'
Versions
| Version | Published | Status |
|---|---|---|
| 2.0.0 | 10/24/2026 | active |
| 1.0.0 | 10/11/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 2.0.0
- Published
- 10/11/2026