Skip to main content
Glama
erniomaldo

agentcheckpoint

by erniomaldo

set_state

Atomically store a checkpoint with an optional version guard to ensure conflict-safe updates when multiple agents coordinate.

Instructions

Atomically write a checkpoint with optional version guard. Pass expected_version from a prior get_state call. expected_version=0 → create-only (fails if key exists). expected_version=N → update only if stored version matches (conflict-safe). Omit expected_version or pass -1 → unconditional write. Use force_set_state for simpler unconditional writes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesCheckpoint key
valueYesValue to store (must be JSON-encoded string)
expected_versionNoVersion guard: -1=unconditional, 0=create-only, N=versioned update
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains atomicity, version guard semantics, and conflict-safe behavior. The only minor gap is not explicitly stating what happens on version mismatch (e.g., fails vs. returns error), but it implies the write is conditional and conflict-safe, which is sufficient.

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 three sentences with zero filler. It front-loads the core function, then details the version guard parameter, and ends with the alternative tool. Every sentence earns its place, making it appropriately sized for the complexity.

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?

Given the tool has 3 parameters and no output schema, the description is highly complete. It covers the write semantics, version guard options, and when to use alternatives. It even mentions the recommended way to obtain expected_version from get_state, forming a complete usage context.

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?

The schema already documents all three parameters with 100% coverage, so the baseline is 3. The description adds value by explaining the expected_version semantics in detail (0=create-only, N=versioned update, omit/-1=unconditional) and clarifying that value must be a JSON-encoded string, which goes beyond the schema's brief description.

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 clearly states the tool's core function: 'Atomically write a checkpoint with optional version guard.' It uses a specific verb ('write') and resource ('checkpoint'), and distinguishes itself from sibling tools by mentioning force_set_state as an alternative for simpler writes. This makes the purpose unambiguous.

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?

The description provides explicit guidance on when to use this tool vs. alternatives: 'Use force_set_state for simpler unconditional writes.' It also explains the different expected_version modes (create-only, conditional update, unconditional), which tells the agent exactly in what scenarios 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/erniomaldo/agentcheckpoint'

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