Skip to main content
Glama

Update working state

update_state
Destructive

Create or replace a scoped working-state record for resuming a task, next action, or blocker.

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
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.

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

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