Skip to main content
Glama

rr_set_agent_context

Store a JSON object under a namespace and key with optional expiry. Use it to persist structured context data for inventory management workflows.

Instructions

Store a bounded JSON object under a namespace and key. The value must be a JSON object (max 16 KiB), must not contain secrets or raw PII, and ttl_seconds is optional and capped at 90 days. The namespace must be granted to this key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesEntry key within the namespace (max 200 chars)
valueYesJSON object value (max 16 KiB, no secrets or PII)
namespaceYesAllowlisted context namespace
scope_refNoOptional descriptive scope label (max 200 chars, non-secret)
ttl_secondsNoOptional expiry in seconds (max 7776000 = 90 days)
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals constraints (max 16 KiB, no secrets/PII, TTL cap, namespace grant) but does not specify overwrite behavior, atomicity, or response structure. Some important behavioral traits are missing.

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 concise with two sentences, front-loading the main purpose and key constraints. Every sentence adds value without redundancy.

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?

Given the lack of output schema and the tool's complexity (5 parameters, 3 required), the description covers essential constraints and usage. It misses details like overwrite behavior and expected return value, but for a store operation, this is nearly complete.

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 description coverage is 100%, so baseline is 3. The description adds the context that 'namespace must be granted to this key,' which slightly enhances the schema. However, most parameter constraints are already in the schema, so the added value is minimal.

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 purpose: storing a bounded JSON object under a namespace and key. It uses specific verbs and resources ('Store a bounded JSON object'), and distinguishes from sibling tools like rr_get_agent_context and rr_delete_agent_context.

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

Usage Guidelines3/5

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

The description implies when to use the tool (for storing JSON objects) but does not explicitly contrast with sibling tools or provide guidance on when not to use it. It mentions constraints but no alternatives or exclusions.

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/ReplenishRadar/MCP'

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