Skip to main content
Glama

host.state.insert

Insert one row (an object) or several (an array of objects) into a declared table. Each row is validated against the table's schema first -- a type mismatch fails the whole call with state_schema_violation and writes nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsYesOne row (an object) or several (an array of objects), each validated against the table's schema.
tableYesName of the declared table to insert into.
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 / rows / description
      Added value: +"One row (an object) or several (an array of objects), each validated against the table's schema."
    • addedInput schema / properties / table / description
      Added value: +"Name of the declared table to insert into."
  3. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations present, the description carries the safety burden and does well: it reveals that rows are validated before any write and that any type mismatch fails the whole call with state_schema_violation, writing nothing. It doesn't cover authentication or the success response, but the disclosed failure behavior is meaningful.

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 focused sentences; the first states the action and accepted shapes, the second the critical validation/atomicity caveat. No filler or redundant schema repetition.

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 4-parameter mutation with no annotations and no output schema, the description supplies the most decision-relevant behavioral facts: schema validation, all-or-nothing failure, and the error code, while optional auth params are already covered by schema descriptions. A success-return note would be nice but isn't essential for correct invocation.

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?

The input schema already describes all four parameters at 100% coverage; the description mainly restates that rows may be an object or array and that validation is against the table schema. It adds no new per-parameter meaning, so the baseline of 3 applies.

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 leads with a specific verb ('Insert') and resource ('declared table'), and it covers both single-object and array inputs. This makes it immediately distinguishable from sibling state tools like host.state.get, host.state.delete, host.state.query, and host.state.set.

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?

It clearly frames the call as inserting new rows into an already declared table, so an agent knows a table must exist first. It doesn't name alternatives or when-not-to-use cases, but for an insert primitive this context is sufficient.

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