Skip to main content
Glama
PengLx
by PengLx

Preview a native TMX write

tiled_preview_write_tmx
Read-only

Preview and write Tiled maps as TMX files, matching Tiled 1.12.2 byte-for-byte for restricted finite orthogonal maps with external tilesets and CSV tile layers.

Instructions

Serializes one restricted-profile project .tmj map to TMX bytes matching Tiled 1.12.2's own writer byte for byte — finite orthogonal maps, external tileset references, CSV tile layers, and top-level tile/object layers the serializer fully understands; embedded tilesets, image and group layers, custom properties, template instances, unknown members, and floats whose six-significant-digit rendering would lose precision all fail closed. Tileset references and GIDs carry verbatim, so the .tmx target must live in the source map's directory and must be a new file. Returns an expiring fileExport change set whose producer is the native serializer; apply re-serializes under the pinned source revision and fails closed unless the bytes exactly match the approved content hash. No Tiled CLI is involved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mapPathYesCanonical project-relative POSIX path; absolute paths and .. are forbidden
targetPathYesCanonical project-relative POSIX path; absolute paths and .. are forbidden
projectFilePathNoCanonical project-relative POSIX path; absolute paths and .. are forbidden
expectedMapRevisionYesSHA-256 revision returned by a read or preview

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description extensively discloses behavioral traits: returns an expiring fileExport change set, apply re-serializes under pinned revision, fails closed unless bytes match, and lists features that fail (embedded tilesets, group layers, custom properties, etc.). This goes well beyond the annotations (readOnlyHint, destructiveHint) which are minimal.

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?

The description is thorough but somewhat dense; every sentence adds value, though it could be slightly more streamlined. The structure is logical, starting with the main action then detailing constraints and return type.

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?

Given the tool's complexity (4 parameters, output schema, many constraints), the description covers all necessary aspects: what it does, input requirements, output type, failure conditions, and side effects. No gaps are apparent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the description adds significant meaning: it explains that targetPath must be a new file in the source map's directory, expectedMapRevision comes from a previous read or preview, and mentions the optional projectFilePath. This enriches the schema definitions.

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 precisely states it serializes a .tmj map to TMX bytes matching Tiled 1.12.2's writer, with specific constraints (finite orthogonal, external tilesets, CSV layers). It clearly distinguishes from siblings like tiled_preview_write_tsx and tiled_preview_write_tx by focusing on TMX output.

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?

The description implies usage for previewing TMX writes with specific format constraints, but does not explicitly provide when-to-use vs alternatives or mention conditions to avoid using it. For example, if the map has embedded tilesets, the tool fails closed, but this is not framed as a usage guideline.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PengLx/TiledMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server