Skip to main content
Glama

context_save

Idempotent

Store temporary working state under a key with optional expiration, overwriting existing values. Scoped per app identity and backed by SOIL storage, eliminating Postgres dependencies.

Instructions

Save ephemeral working state under key, optionally expiring after ttl_seconds (0 = never). Overwrites an existing key. Per-identity — scoped to your app_id. Backed by the SOIL store, so no Postgres is required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueYes
app_idYes
ttl_secondsNo
Behavior5/5

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

The description goes well beyond annotations by explicitly disclosing overwrite behavior, expiration semantics, per-identity scoping, and the SOIL storage backend. This provides genuine behavioral transparency. It does not contradict the annotations: idempotentHint=true aligns with 'Overwrites an existing key', and readOnlyHint=false aligns with the mutation action.

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

Conciseness5/5

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

Three tight sentences, each earning its place. The core action is front-loaded, then the critical overwrite and expiry behaviors, then scoping and backend details. No filler or repetition.

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

Completeness4/5

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

Given the absence of an output schema, the description does not explain return values, but for a simple save operation this is a minor gap. It adequately covers storage backend, scoping, expiry, and overwrite behavior. It could mention how to retrieve the saved state, but context_get is a sibling and reasonably obvious.

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

Parameters4/5

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

Schema description coverage is 0%, so the description carries the explanatory burden. It adds semantics for `key` (the storage key), `ttl_seconds` ('0 = never'), and `app_id` (scoping context). `value` is only implied as 'working state', which is adequate but could be more explicit.

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 description states a specific verb and resource: 'Save ephemeral working state under `key`'. It also distinguishes this tool from sibling storage tools by noting 'Per-identity — scoped to your app_id' and 'Backed by the SOIL store', making its role among context_* and store_* siblings clear.

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 clearly communicates the use case: saving ephemeral, per-identity working state with optional expiry. The note 'no Postgres is required' provides useful placement guidance. However, it does not explicitly name alternatives like context_get or context_expire, nor state when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/willow-memory/willow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server