Skip to main content
Glama

working_memory_set

Stores a transient project-scoped key-value entry that expires automatically after a set TTL, overwriting any existing key without error. Use it for debug flags or temporary task context that must not pollute long-term state.

Instructions

Store a transient key-value entry scoped to the current project. Expires automatically after ttl_seconds (default 86400s). Overwrites any existing entry with the same key without error. Use for debug flags, temporary task context, or values that must not pollute long-term state in update_state. Do not use for data that must survive a session restart, use update_state instead.

Input Schema

NameRequiredDescriptionDefault
keyYesUnique name for this transient entry, e.g. 'debug_flag' or 'active_config'.
valueYesValue to store. Any string including JSON.
ttl_secondsNoHow long the entry lives in seconds (1-604800, default 86400s). Longer-lived data belongs in update_state, not here.
project_pathNoAbsolute path to the project root. Defaults to current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.1.23
    • changedInput schema / properties / ttl_seconds / description
      Previous value: -"How long the entry lives in seconds. Omit to use the session default (86400s)."New value: +"How long the entry lives in seconds (1-604800, default 86400s). Longer-lived data belongs in update_state, not here."
    • addedInput schema / properties / ttl_seconds / maximum
      Added value: +604800
    • addedInput schema / properties / ttl_seconds / minimum
      Added value: +1
  2. Addedv1.1.17
  3. Removedv1.1.12
  4. Addedv1.0.7

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses auto-expiry, the default TTL, silent overwrite of an existing key, and project scoping. It stops short of saying what the call returns (no output schema exists) or how invalid/oversized input or expired-key reads behave, so the mutation/return contract is only partly covered.

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?

Four short sentences, front-loaded with purpose, then lifecycle, then overwrite behavior, then routing guidance. Every sentence carries distinct information and the sibling reference is placed at the end as a natural decision point.

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?

For a four-parameter write tool with no annotations and no output schema, this covers scope, expiry, overwrite, and alternatives, which is nearly everything needed to call it correctly. The remaining gap is the return value and failure modes (invalid TTL, expired key), which nothing else in the definition supplies.

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

Parameters3/5

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

Schema coverage is 100% and each parameter already documents its role, range, and default. The description only restates the TTL default and the overwrite-by-key semantics, adding little syntactic or format detail beyond what the schema provides.

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?

Names a specific verb and resource ('Store a transient key-value entry scoped to the current project') and immediately frames the lifecycle (TTL-based expiry) that distinguishes it from persistent siblings. The contrast with update_state and the persistence boundary makes it unmistakable versus working_memory_get/list.

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

Usage Guidelines5/5

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

Explicitly lists intended uses (debug flags, temporary task context, values that must not pollute long-term state) and an explicit exclusion ('Do not use for data that must survive a session restart, use update_state instead'). The alternative is named with the condition that selects it.

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