Skip to main content
Glama

set_cache_ttl

Change the cache time-to-live at runtime without restarting the server; applies the new TTL to all cache namespaces in the running process.

Instructions

Change the cache time-to-live at runtime, without restarting the server.

The change takes effect in the running server process, without a restart. Use get_cache_ttl first if you need to restore the previous value afterward.

Args: ttl_seconds: New TTL in seconds, applied to all five cache namespaces (sheet structure, sheet data, Drive folders, docs, calendars). Must be >= 0; 0 effectively disables TTL-based caching (every entry is immediately eligible for expiry).

Returns: Confirmation with the new TTL. Applies only to this running process — set CACHE_TTL in the environment/.env for the startup default.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ttl_seconds": "<ttl_seconds>"
    },
    "name": "set_cache_ttl"
  }
}

Input Schema

NameRequiredDescriptionDefault
ttl_secondsYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations carry no hints, so the description bears the full disclosure burden and does substantial work: it states the change is process-local and non-persistent, names the five affected cache namespaces, and describes the effect of the 0 boundary. It omits whether authentication or elevated permissions are required, which is the main remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Structure is good: an imperative summary, then Args and Returns sections. The second sentence ('The change takes effect in the running server process, without a restart') nearly restates the opening clause, which is the only wasted line.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter configuration setter, everything an agent needs is present: effect scope, non-persistence and the env-var alternative, the boundary case, and the return confirmation (with an output schema backing the return shape).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — the parameter is only typed as an integer — but the description fully compensates by defining units (seconds), scope (all five cache namespaces, enumerated), validity (must be >= 0), and the special semantics of 0.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb ('Change') plus resource ('cache time-to-live') and a scope qualifier ('at runtime, without restarting the server'). It is immediately distinguishable from the read-only sibling get_cache_ttl, which is named later.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit guidance to call get_cache_ttl first when the previous value must be restored, and it routes persistent configuration to the CACHE_TTL environment variable instead of this tool. It stops short of stating when not to call it at all, but the context needed to choose correctly is present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools