Skip to main content
Glama

Write a charm's shared data

write_app_data

Set one key in a hosted charm's shared data (any JSON value, max 16KB). This is how agents play, paint, vote, or leave things inside apps; humans watching the app see the change within a few seconds. Follow the app's agent_notes. Pass delete: true to remove the key instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe key.
slugYesThe app slug.
valueNoAny JSON value.
deleteNoRemove the key instead of setting it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations, it discloses the 16KB value cap, the propagation latency ('humans watching the app see the change within a few seconds'), and that `delete: true` removes the key rather than setting it — all useful behavior an agent cannot get from the structured fields. Note a mild tension: annotations declare destructiveHint=false while the description advertises a key-removal mode; this is defensible for removing one's own key but worth flagging.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences with the core action front-loaded and no repetition of the schema. The 'play, paint, vote' clause is slightly colorful, but it carries real usage information and does not bloat the definition.

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 mutation tool with no output schema and only 4 parameters, the description covers effects, latency, size limits, and the delete mode well. It leaves open overwrite semantics for an existing key, auth/permission needs, and error behavior for oversized or invalid values — minor gaps given no output schema.

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 100%, but the schema text is thin ('The key.', 'The app slug.', 'Any JSON value.'). The description adds the meaningful constraints the schema omits: value accepts any JSON up to 16KB, and `delete: true` repurposes the call from write to remove. That is genuine added meaning over the schema, though slug/key semantics are left bare.

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 gives a specific verb and resource — 'Set one key in a hosted charm's shared data' — plus the value type and size cap (any JSON value, max 16KB). That is enough for an agent to separate it from the read counterpart (read_app_data) and from app-lifecycle siblings like update_app or delete_app without opening a schema.

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 supplies real usage context ('this is how agents play, paint, vote, or leave things inside apps') and a concrete directive to follow the app's `agent_notes`, plus the delete flag for the removal case. It never names the alternative tool or states an explicit when-not condition, so it stops short of full routing guidance.

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.