Skip to main content
Glama
askadvaith

MCP State Sidecar Server

by askadvaith

state_set

Set a key-value pair in a shared state store with optional TTL expiration and audit tracking. Supports any JSON-serializable value, overwriting existing entries.

Instructions

Set a key-value pair in the shared state store.

The value can be any JSON-serialisable type (dict, list, str, int, …). If ttl_seconds is provided, the entry will expire automatically after that many seconds. Existing entries are overwritten silently. If agent_id is provided, it is recorded in the audit history so the caller can be identified in history_log results.

Use a structured key prefix to avoid collisions in multi-workflow deployments, e.g. 'shared:my_namespace:my_key' or simply 'fact_1'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueYes
agent_idNo
ttl_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses key behaviors: JSON-serializable values, optional TTL expiration, silent overwrites, and audit logging via agent_id. It does not cover error conditions or rate limits, but for a set operation this 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 7 sentences, front-loaded with the core action, and each sentence adds value. No redundant or irrelevant information. The structure is clear and efficient.

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 presence of an output schema (return values documented elsewhere), the description covers the operation, parameters, behaviors, and naming advice. It is complete for an agent to understand how and when to invoke state_set.

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 coverage is 0%, so description must compensate. It explains three of four parameters: value (JSON-serializable), ttl_seconds (expiry), agent_id (audit). The key parameter is discussed only in terms of naming convention, not constraints, but overall adds value beyond bare schema.

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 action ('Set a key-value pair') and the resource ('shared state store'). It distinguishes from sibling tools like state_get (read), state_delete (delete), and state_list (list) by focusing on setting data.

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?

The description explains when to use the tool (for storing key-value pairs) and provides naming convention advice. It does not explicitly exclude scenarios or mention alternatives to set, but the sibling context implies distinct purposes.

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/askadvaith/MCP-State-Sidecar'

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