Skip to main content
Glama

Update working state

update_state
Destructive

Save or replace a scoped working-state record to resume a task, track the next action, or log a blocker. Updates a versioned state slot with optional TTL and structured fields, preserving other memories for continuity.

Instructions

Create or replace one scoped working-state record for resuming a task, next action, or blocker. Requires memory:write; it versions that state slot and refreshes its expiry without deleting other memories. Use remember for durable facts or record_event for history. Provide content or a structured state field; ttl_seconds=0 means no expiry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoScope containing the working-state slot; blank uses the token default.
bucketNoBucket containing the working-state slot; defaults to work.work
contentNoFree-form state body; otherwise provide at least one structured state field.
state_keyNoNormalized state slot; the same owner, bucket, scope, and key updates that slot.active_task
next_actionNoNext action; used to build the state body when content is blank.
ttl_secondsNoExpiry in seconds from 0 to 2592000; 0 means no expiry.
current_taskNoCurrent task; used to build the state body when content is blank.
metadata_jsonNoJSON object merged into the working-state metadata.{}
blocked_reasonNoBlocker; used to build the state body when content is blank.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed21 schema fields changedv0.4.179
    • changedInput schema / properties / blocked_reason / description
      Previous value: -"Short explanation of why the current work is blocked."New value: +"Blocker; used to build the state body when content is blank."
    • removedInput schema / properties / blocked_reason / title
      Removed value: -"Blocked Reason"
    • changedInput schema / properties / bucket / description
      Previous value: -"Memory bucket or namespace to read from or write to; use % only for tools that support wildcard reads."New value: +"Bucket containing the working-state slot; defaults to work."
    • removedInput schema / properties / bucket / title
      Removed value: -"Bucket"
    • changedInput schema / properties / content / description
      Previous value: -"Text body to save, such as a memory, TODO/action item, event note, or state summary."New value: +"Free-form state body; otherwise provide at least one structured state field."
    • removedInput schema / properties / content / title
      Removed value: -"Content"
    • changedInput schema / properties / current_task / description
      Previous value: -"Current task or work item to persist for later resume."New value: +"Current task; used to build the state body when content is blank."
    • removedInput schema / properties / current_task / title
      Removed value: -"Current Task"
    • changedInput schema / properties / metadata_json / description
      Previous value: -"Optional JSON object string with extra metadata for the operation."New value: +"JSON object merged into the working-state metadata."
    • removedInput schema / properties / metadata_json / title
      Removed value: -"Metadata Json"
    • changedInput schema / properties / next_action / description
      Previous value: -"Next action to persist so future turns can resume the work."New value: +"Next action; used to build the state body when content is blank."
    • removedInput schema / properties / next_action / title
      Removed value: -"Next Action"
    • changedInput schema / properties / scope / description
      Previous value: -"Optional scope that narrows memory access; leave blank for the token default."New value: +"Scope containing the working-state slot; blank uses the token default."
    • removedInput schema / properties / scope / title
      Removed value: -"Scope"
    • changedInput schema / properties / state_key / description
      Previous value: -"Working-state key to save, snapshot, or restore, such as active_task."New value: +"Normalized state slot; the same owner, bucket, scope, and key updates that slot."
    • removedInput schema / properties / state_key / title
      Removed value: -"State Key"
    • changedInput schema / properties / ttl_seconds / description
      Previous value: -"Time-to-live in seconds for working state or restart snapshot records."New value: +"Expiry in seconds from 0 to 2592000; 0 means no expiry."
    • removedInput schema / properties / ttl_seconds / title
      Removed value: -"Ttl Seconds"
    • removedInput schema / title
      Removed value: -"update_stateArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"update_stateOutput"
  2. First observedv0.4.176

TDQS

A4.4/5.0
Behavior4/5

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

The description adds context beyond the annotations by noting the memory:write permission requirement, that it versions the state slot, refreshes expiry, and does not delete other memories. This complements the destructiveHint: true and readOnlyHint: false annotations without contradicting them.

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?

The description is four sentences long, each serving a distinct purpose: purpose, behavior, alternatives, and parameter guidance. It is front-loaded and contains no filler.

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?

The description covers the tool's purpose, usage guidance, side effects, and permission requirements. It does not mention return values, but the presence of an output schema mitigates the need. It is sufficiently complete for a mutation tool with rich schema annotations.

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?

With 100% schema description coverage, the schema already explains all parameters. The description adds minimal extra meaning by advising to 'Provide content or a structured state field,' which groups the parameters conceptually but does not go beyond the schema's detail.

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 explicitly states 'Create or replace one scoped working-state record' and gives the intended use (resuming a task, next action, blocker). It also names alternatives, clearly distinguishing it from sibling tools like remember and record_event.

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?

Provides explicit when-to-use guidance: 'Use remember for durable facts or record_event for history.' This tells the agent exactly when to prefer this tool over its alternatives.

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

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/yonro/memory-os-cli'

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