Skip to main content
Glama

apply_world_code_patch

Stage exact code replacements atomically. Each existing file needs its current SHA-256 hash, nonempty oldText matching exactly once, and newText. Include context for ambiguous matches. Use create:true only for a new file. Patches preserve unrelated source and invalidate earlier checks. This never saves or publishes a world. Interface assets and preview image can be attached here when approved generated images are ready.

Input Schema

NameRequiredDescriptionDefault
patchesYes
workspaceIdYes
codeWorkspaceIdYes
interfaceAssetsNo
previewImageUrlNo
expectedRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Discloses several behavioral traits beyond the annotations: atomic staging, required current SHA-256 hash, oldText matching exactly once, preservation of unrelated source, invalidation of earlier checks (optimistic concurrency), and the explicit non-persistence guarantee. The annotations only cover the safety profile (readOnly=false, destructive=false), so this description carries and adds substantial context.

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?

Front-loads the core action, then requirements, then the critical 'never saves or publishes' caveat, then the optional asset attachment. Dense but each sentence earns its place; the last sentence is slightly compressed and could be clearer about when attachment applies.

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 6-param, 0%-coverage, no-output-schema tool this covers the essential mechanics (atomicity, hash, match-once, non-persistence). It does not describe what a staged patch returns or how expectedRevision interacts with the invalidation it mentions, leaving a modest gap.

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?

With 0% schema description coverage the description must compensate, and it adds real meaning to the core patch fields ('current SHA-256 hash,' 'nonempty oldText matching exactly once,' 'create:true only for a new file') that the schema does not express. It leaves top-level workspaceId/codeWorkspaceId/expectedRevision and the interfaceAssets/previewImageUrl shapes largely unexplained, so compensation is partial.

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 ('Stage exact code replacements atomically') and explicitly carves out scope against the save/publish siblings with 'This never saves or publishes a world.' An agent can distinguish it from save_world_code_workspace and read_world_code_file 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?

Gives concrete conditions: 'Use create:true only for a new file,' 'Include context for ambiguous matches,' and attaches interface assets only 'when approved generated images are ready.' It implies the when-not (staging vs saving) but never explicitly names the alternative tool to use for persisting changes, 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.