Skip to main content
Glama

write_database_object

Idempotent

Serialize a GFF JSON document into a compressed blob and store it in a campaign database to persist creatures, items, or other objects.

Instructions

Serialize a GFF JSON document into a compressed blob and store it in a campaign database. Use for persisting creatures, items, or other objects.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "database": "<database>",
      "varname": "<varname>",
      "data": "<data>"
    },
    "name": "write_database_object"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYesGFF document as JSON string
varnameYesVariable name for the db table row
databaseYesDatabase filename (e.g. 'mymodule' or 'mymodule.sqlite3')
playeridNoPlayer ID (default: empty string)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.1

TDQS

A3.5/5.0
Behavior3/5

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

The idempotentHint annotation already signals repeat-call safety, and the description adds genuine behavioral detail by disclosing the serialization into a compressed blob, which is a format transformation the schema does not reveal. However, it does not say whether an existing row with the same varname is overwritten, what errors look like, or what is returned, leaving the mutation semantics partially opaque.

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 tight sentences with zero filler: the operation is stated first and the usage hint follows. Nothing is repeated and nothing needs to be trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With four fully documented parameters and no output schema, the core call is answerable, and the compression detail covers the non-obvious transformation. Still missing is what happens to an existing entry under the same varname and whether any result is returned, which matters for a persistence tool despite the idempotent hint.

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 all four parameters (data, varname, database, playerid) are already documented inline. The description adds only that the data is a GFF document subject to serialization/compression, which is marginal beyond the schema's "GFF document as JSON string" note, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific two-step operation (serialize a GFF JSON document, then store it in a campaign database) and identifies the resource precisely. It is distinguishable from the read_database_object sibling by the explicit write/store framing, though it never names that sibling to reinforce the contrast.

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?

"Use for persisting creatures, items, or other objects" gives a usage context, but it is close to restating the obvious for a write tool and offers no exclusions or named alternatives. An agent gets a hint about applicable content types but no guidance on when to prefer this over write_script or other write paths.

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

Deploy Server

Other Tools