Preview adding a tileset to a map
tiled_add_tileset_to_mapValidates an external tileset, assigns its GID range to a Tiled map, and returns an expiring change set without modifying project assets. Supports pending tileset creation via change set ID.
Instructions
Validates one project-local external atlas TSJ, assigns its GID range after all current ranges, and returns an expiring map change set without modifying project assets. With createChangeSetId, a pending tileset-create change set's replayed prospective content stands in for a TSJ that does not exist yet; the attachment pins that prospective revision, so it applies after the create commits or atomically with it in one transaction.
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": {
"mapPath": "<mapPath>",
"tilesetPath": "<tilesetPath>",
"expectedMapRevision": "<expectedMapRevision>",
"expectedDependencyRevisions": "<expectedDependencyRevisions>"
},
"name": "tiled_add_tileset_to_map"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| tilesetPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| createChangeSetId | No | ||
| expectedMapRevision | Yes | SHA-256 revision returned by a read or preview | |
| expectedTilesetRevision | No | SHA-256 revision returned by a read or preview | |
| expectedDependencyRevisions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |