gemini_createCache
Generates cached content resources for compatible Gemini models to reduce latency and costs for frequently reused prompts. Returns metadata detailing the created cache for efficient reuse.
Instructions
Creates a cached content resource for a compatible Gemini model. Caching can reduce latency and costs for prompts that are reused often. NOTE: Caching is only supported for specific models (e.g., gemini-1.5-flash, gemini-1.5-pro). Returns metadata about the created cache.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
contents | Yes | Required. The content to cache, matching the SDK's Content structure (an array of Parts). | |
displayName | No | Optional. A human-readable name for the cache. | |
model | No | Optional. The name/ID of the model compatible with caching (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used. | |
systemInstruction | No | Optional. System instructions to associate with the cache. | |
ttl | No | Optional. Time-to-live for the cache as a duration string (e.g., '3600s' for 1 hour). Max 48 hours. |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from MCP Gemini Server
Related Tools
- @bsmi021/mcp-gemini-server
- @bsmi021/mcp-gemini-server
- @bsmi021/mcp-gemini-server
- @bsmi021/mcp-gemini-server
- @bsmi021/mcp-gemini-server