Skip to main content
Glama

host.state.set

Write one key in this tenant's key-value state namespace; value may be any JSON value. Overrun of the plan's state_bytes_max quota fails with state_quota_exceeded and writes nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesKey to write in this tenant's key-value state namespace.
valueYesAny JSON value to store under key.
end_userNo"self" for the caller's own verified end-user identity, an explicit subject (only when this call carries no end-user identity of its own), or omit/null for the tenant-wide value.
tenant_keyNoThe key `signup` returned. Required only when this connection carries no Authorization: Bearer header -- when both are present, the header wins.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / end_user
      Added value: +{
      +  "description": "\"self\" for the caller's own verified end-user identity, an explicit subject (only when this call carries no end-user identity of its own), or omit/null for the tenant-wide value.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / key / description
      Added value: +"Key to write in this tenant's key-value state namespace."
    • addedInput schema / properties / value / description
      Added value: +"Any JSON value to store under key."
  3. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses the key failure mode and atomicity ('fails with state_quota_exceeded and writes nothing'), which goes beyond simply saying 'set a value'. It does not cover overwrite semantics or auth requirements, but the core side-effect behavior is well disclosed.

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?

Two sentences, front-loaded with the action and resource, followed by the failure behavior. No filler or 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?

For a single-key write tool with full schema coverage, the description provides the core semantics and the important quota/atomicity edge case. It is only slightly incomplete in not explaining when to prefer sibling tools or what a successful call returns, especially since no output schema exists to fill that gap.

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 the schema already documents all four parameters. The description mostly reinforces the schema's tenant-scoped key-value framing and adds no additional parameter-level meaning.

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 opens with a specific verb and resource: 'Write one key in this tenant's key-value state namespace'. The scope is clear—single key, tenant-scoped, any JSON value—and the action is easily distinguished from sibling state tools like get, delete, query, and list.

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?

Usage is only implied: the description states this tool writes one key, but it never names alternatives or says when not to use it. An agent must infer from the sibling list that host.state.get, host.state.delete, or host.state.insert cover other operations.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources