Skip to main content
Glama

Edit a world

world_apply

Applies a batch of ops (see world_schema) to a world document, in order. An op that cannot apply is rejected with its reason and changes nothing; if the result as a whole would not be a valid world, the whole batch rolls back and says why. Answers the edited document, what applied, what was rejected and the check of the result. Costs 1 unit.

Input Schema

NameRequiredDescriptionDefault
opsYesThe edits to apply in order, each an object with an op name; world_schema lists them. An op that cannot apply is rejected with the reason and the rest still apply.
worldYesThe world document, written inline as JSON.

Output Schema

NameRequiredDescriptionDefault
msNoMilliseconds the run took.
jobYesThe job id; the job tool reads it.
verbNoThe tool that made it.
filesNoFiles made, each with a name, type, size and a signed URL.
unitsNoUnits this call cost.
resultNoThe engine's own answer, a JSON document.
statusNoqueued when the job runs in the background.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / ops / description
      Added value: +"The edits to apply in order, each an object with an op name; world_schema lists them. An op that cannot apply is rejected with the reason and the rest still apply."
    • addedInput schema / properties / world / description
      Added value: +"The world document, written inline as JSON."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "files": {
      +      "description": "Files made, each with a name, type, size and a signed URL.",
      +      "items": {
      +        "additionalProperties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "job": {
      +      "description": "The job id; the job tool reads it.",
      +      "type": "string"
      +    },
      +    "ms": {
      +      "description": "Milliseconds the run took.",
      +      "type": "number"
      +    },
      +    "result": {
      +      "description": "The engine's own answer, a JSON document."
      +    },
      +    "status": {
      +      "description": "queued when the job runs in the background.",
      +      "type": "string"
      +    },
      +    "units": {
      +      "description": "Units this call cost.",
      +      "type": "number"
      +    },
      +    "verb": {
      +      "description": "The tool that made it.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "job"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only cover the safety profile (not read-only, not destructive, not idempotent). The description goes well beyond that by disclosing per-op rejection semantics, whole-batch rollback when the result would not be a valid world, the specific return contents (edited document, applied ops, rejected ops, result check), and a cost of 1 unit.

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?

Three sentences, tightly front-loaded with the core action and ordering guarantee, followed by failure semantics and returns. No filler; every clause carries information an agent needs before invoking.

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

Completeness5/5

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

For a batch mutation tool with nested op objects, the description covers atomicity, partial-failure behaviour, return payload and cost. Even though an output schema exists (so return values need not be detailed), restating them costs nothing and completes the picture.

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% and both parameters are documented there, including the 1–200 item bound and the op-object shape. The description adds only the in-order application semantics and the pointer to world_schema, which is roughly baseline value over the schema.

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?

States a specific verb and resource — 'Applies a batch of ops ... to a world document, in order' — and names the reference doc (world_schema) that enumerates the ops. The transactional framing (applied/rejected/rolled back) also distinguishes it from world_check, which only inspects, without the agent needing to open any schema.

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 implied rather than explicit: it points to world_schema for op names and implies this tool also returns a result check (so world_check is redundant). But it never states when to reach for world_apply versus world_check or world_starter, and names no alternative or exclusion condition.

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