dcc-mcp-tiled 0.5.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. dcc_mcp_tiled-0.5.1/.gitignore +6 -0
  2. dcc_mcp_tiled-0.5.1/CHANGELOG.md +105 -0
  3. dcc_mcp_tiled-0.5.1/LICENSE +21 -0
  4. dcc_mcp_tiled-0.5.1/PKG-INFO +159 -0
  5. dcc_mcp_tiled-0.5.1/README.md +136 -0
  6. dcc_mcp_tiled-0.5.1/bridge/tiled-cli/dcc_mcp_tiled_driver.js +439 -0
  7. dcc_mcp_tiled-0.5.1/docs/architecture.md +53 -0
  8. dcc_mcp_tiled-0.5.1/docs/release-recovery.md +72 -0
  9. dcc_mcp_tiled-0.5.1/install.md +227 -0
  10. dcc_mcp_tiled-0.5.1/pyproject.toml +70 -0
  11. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/__init__.py +3 -0
  12. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/__version__.py +1 -0
  13. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/bridge.py +717 -0
  14. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/install.py +719 -0
  15. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/server.py +129 -0
  16. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skill_tools.py +18 -0
  17. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/SKILL.md +34 -0
  18. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/add_object_layer.py +8 -0
  19. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/add_tileset.py +8 -0
  20. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/convert_map.py +8 -0
  21. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/create_map.py +8 -0
  22. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/create_tileset.py +8 -0
  23. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/get_status.py +8 -0
  24. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/inspect_map.py +8 -0
  25. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/paint_tiles.py +8 -0
  26. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/validate_map.py +8 -0
  27. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/scripts/write_objects.py +8 -0
  28. dcc_mcp_tiled-0.5.1/src/dcc_mcp_tiled/skills/tiled-maps/tools.yaml +314 -0
  29. dcc_mcp_tiled-0.5.1/tests/live_tiled_smoke.py +212 -0
  30. dcc_mcp_tiled-0.5.1/tests/test_action_pin_guard.py +91 -0
  31. dcc_mcp_tiled-0.5.1/tests/test_bridge.py +232 -0
  32. dcc_mcp_tiled-0.5.1/tests/test_install.py +715 -0
  33. dcc_mcp_tiled-0.5.1/tests/test_release_assets.py +374 -0
  34. dcc_mcp_tiled-0.5.1/tests/test_release_identity.py +617 -0
  35. dcc_mcp_tiled-0.5.1/tests/test_release_please.py +25 -0
  36. dcc_mcp_tiled-0.5.1/tests/test_release_workflow.py +906 -0
  37. dcc_mcp_tiled-0.5.1/tests/test_server.py +12 -0
  38. dcc_mcp_tiled-0.5.1/tests/test_version_consistency.py +241 -0
  39. dcc_mcp_tiled-0.5.1/tests/test_workflow_artifact.py +206 -0
  40. dcc_mcp_tiled-0.5.1/tools/freeze_release_identity.py +42 -0
  41. dcc_mcp_tiled-0.5.1/tools/lint_skills.py +12 -0
  42. dcc_mcp_tiled-0.5.1/tools/release-build-requirements.in +3 -0
  43. dcc_mcp_tiled-0.5.1/tools/release-build-requirements.txt +491 -0
  44. dcc_mcp_tiled-0.5.1/tools/release-version-requirements.txt +2 -0
  45. dcc_mcp_tiled-0.5.1/tools/upload_release_assets.py +310 -0
  46. dcc_mcp_tiled-0.5.1/tools/verify_action_pins.py +95 -0
  47. dcc_mcp_tiled-0.5.1/tools/verify_package_artifacts.py +247 -0
  48. dcc_mcp_tiled-0.5.1/tools/verify_release_identity.py +405 -0
  49. dcc_mcp_tiled-0.5.1/tools/verify_release_workflow.py +1112 -0
  50. dcc_mcp_tiled-0.5.1/tools/verify_version_consistency.py +222 -0
  51. dcc_mcp_tiled-0.5.1/tools/verify_workflow_artifact.py +153 -0
@@ -0,0 +1,6 @@
1
+ .venv/
2
+ __pycache__/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ dist/
6
+ *.egg-info/
@@ -0,0 +1,105 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## [0.5.1](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.5.0...v0.5.1) (2026-09-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * attach recovery assets and reject duplicate release workflow keys ([b61b1a3](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/b61b1a3e9bb8b8eb584e0c6e90f6d93af9154124))
11
+ * bind the recovery artifact recapture to the run head commit ([4c3a9b0](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/4c3a9b01d8416b5f9aa001388e6aafb6e23e3155))
12
+ * reject duplicate release workflow keys and complete the recovery chain ([8b22ed4](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/8b22ed41b8dae633a81b321edc4e96e4c708ce86))
13
+
14
+ ## [0.5.0](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.4.2...v0.5.0) (2026-09-27)
15
+
16
+
17
+ ### Features
18
+
19
+ * add parameterized PyPI republish recovery channel ([0064764](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/00647647d1c165ac459b5b52c391ac756069be99))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * remove the duplicated recovery jobs from the release workflow ([2e40a33](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/2e40a33e72a561829c91a48be97861d54ab8c60c))
25
+
26
+ ## [0.4.2](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.4.1...v0.4.2) (2026-08-27)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * bind release package and artifact identity ([412475d](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/412475d37ecc64847396817a1f3582a339180bfc))
32
+ * harden release asset publication ([827a2f8](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/827a2f86f7a4ff8a6948e1a93aa9e390f56e349f))
33
+ * prevent release asset overwrites ([68ac05d](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/68ac05df5f56027f4e32dc6738ce0ea7eea7e6f4))
34
+ * reject nonportable release archive paths ([5003fd6](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/5003fd6dcfe2eb7fa9c3c1bee17724290c9e194a))
35
+ * revalidate release publication identity ([249edfa](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/249edfa3f6cd656e56446d1ec3507f59abb2a6c8))
36
+
37
+ ## [0.4.1](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.4.0...v0.4.1) (2026-08-25)
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * keep release versions synchronized ([e7fcada](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/e7fcada880520472eed54b1852c8f8c273bf7b6e))
43
+ * make release contract tests version agnostic ([a2b1069](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/a2b10690779af6756a98c54af4cebd115778bc94))
44
+
45
+ ## [0.4.0](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.3.0...v0.4.0) (2026-08-24)
46
+
47
+
48
+ ### Features
49
+
50
+ * add Tiled install verification ([#5](https://github.com/dcc-mcp/dcc-mcp-tiled/issues/5)) ([1f0cca7](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/1f0cca70d357d8f9ccd1d9d59600c7dc9de4a3c0))
51
+
52
+ ## [0.3.0](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.2.0...v0.3.0) (2026-08-12)
53
+
54
+
55
+ ### Features
56
+
57
+ - Replace the placeholder bridge with typed map, object, tileset, tile-painting,
58
+ validation, inspection, and conversion workflows backed by Tiled's official
59
+ command-line scripting API.
60
+ - Add a standalone DCC-MCP server with one bundled `tiled-maps` Skill and ten
61
+ typed tools.
62
+
63
+
64
+ ### Security
65
+
66
+ - Enforce allowed filesystem roots, bounded inputs and outputs, subprocess
67
+ cancellation and deadlines, overwrite opt-in, and atomic output replacement.
68
+ - Keep the bundled JavaScript driver fixed; callers cannot submit source code.
69
+
70
+
71
+ ### Testing
72
+
73
+ - Add unit, Skill-schema, packaging, Python 3.9/3.12, and pinned Tiled 1.12.2
74
+ native end-to-end release gates.
75
+
76
+
77
+ ### Features
78
+
79
+ * ship production-ready Tiled authoring ([#2](https://github.com/dcc-mcp/dcc-mcp-tiled/issues/2)) ([ccb9b28](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/ccb9b28a17420d9659ef92fd65f269e20536399e))
80
+
81
+ ## [0.2.0](https://github.com/dcc-mcp/dcc-mcp-tiled/compare/v0.1.0...v0.2.0) (2026-07-24)
82
+
83
+
84
+ ### Features
85
+
86
+ * add DCC MCP adapter ([fc4cb6b](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/fc4cb6b5cf82b19e700f5294d41c92328f52ee17))
87
+ * add GIMP MCP adapter ([4fcda51](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/4fcda51b29d551e59175a81fa4fafcea5d2e8252))
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * keep persistent GIMP bridge process alive ([441aa0c](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/441aa0c8d7a8c2bf3178457e931ec2835115061c))
93
+ * match GIMP plugin folder to module name ([63799cb](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/63799cbf1c60e53c7c56367b01b54d6290af76fb))
94
+ * use GIMP persistent procedure callback signature ([9489a4f](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/9489a4f452b5d0bd947a3108b761ba26b0256aff))
95
+ * verify GIMP AppImage checksum ([573314b](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/573314bc3bf1daf6e1e10ea722d03f66927a2eaa))
96
+
97
+
98
+ ### Documentation
99
+
100
+ * optimize workflow showcase ([4ba9018](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/4ba9018a13d6804dda3fcc3818b1dce1b95f78e3))
101
+ * redesign DCC-MCP brand visuals ([52de749](https://github.com/dcc-mcp/dcc-mcp-tiled/commit/52de74985ffbbd83ce0bc79cdafd70b0b585bf1d))
102
+
103
+ ## 0.1.0
104
+
105
+ - Initial Tiled session bridge and MCP adapter.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 loonghao
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,159 @@
1
+ Metadata-Version: 2.4
2
+ Name: dcc-mcp-tiled
3
+ Version: 0.5.1
4
+ Summary: Typed Tiled map automation for the DCC Model Context Protocol
5
+ Project-URL: Homepage, https://github.com/dcc-mcp/dcc-mcp-tiled
6
+ Project-URL: Repository, https://github.com/dcc-mcp/dcc-mcp-tiled
7
+ Project-URL: Issues, https://github.com/dcc-mcp/dcc-mcp-tiled/issues
8
+ Author-email: loonghao <hal.long@outlook.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: automation,dcc,level-design,mcp,tiled,tilemap
12
+ Requires-Python: >=3.9
13
+ Requires-Dist: dcc-mcp-core<1.0.0,>=0.20.14
14
+ Provides-Extra: dev
15
+ Requires-Dist: build>=1.2; extra == 'dev'
16
+ Requires-Dist: jsonschema>=4.23; extra == 'dev'
17
+ Requires-Dist: pytest>=8; extra == 'dev'
18
+ Requires-Dist: pyyaml>=6.0; extra == 'dev'
19
+ Requires-Dist: ruff>=0.8; extra == 'dev'
20
+ Requires-Dist: tomli>=2.0; (python_version < '3.11') and extra == 'dev'
21
+ Requires-Dist: twine>=7.0; (python_version >= '3.10') and extra == 'dev'
22
+ Description-Content-Type: text/markdown
23
+
24
+ # dcc-mcp-tiled
25
+
26
+ <p align="center">
27
+ <picture>
28
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/dcc-mcp-tiled-dark.svg">
29
+ <source media="(prefers-color-scheme: light)" srcset="docs/images/dcc-mcp-tiled.svg">
30
+ <img src="docs/images/dcc-mcp-tiled.svg" alt="DCC-MCP · TILED" width="600">
31
+ </picture>
32
+ </p>
33
+
34
+ Typed, workspace-bounded level authoring for [Tiled](https://www.mapeditor.org/)
35
+ through the DCC Model Context Protocol.
36
+
37
+ ![Tiled game-level workflow](docs/images/tiled-showcase.webp)
38
+
39
+ _Illustrative workflow generated with OpenAI ImageGen from the retained source in `docs/images/sources`; it is not a Tiled screenshot or host-validation artifact._
40
+
41
+ The adapter invokes Tiled's official JavaScript scripting API through
42
+ `tiled --evaluate`. It ships one fixed driver and accepts typed JSON data only:
43
+ clients cannot submit JavaScript or other arbitrary source code. The service is
44
+ standalone, so Tiled does not need an in-process Python plug-in or an open editor
45
+ window.
46
+
47
+ ## Capabilities
48
+
49
+ | Typed tool | Purpose |
50
+ | --- | --- |
51
+ | `get_status` | Verify the executable, Tiled/Qt versions, formats, roots, and runtime limits. |
52
+ | `inspect_map` | Summarize maps, layers, objects, tilesets, properties, and bounded tile occupancy. |
53
+ | `validate_map` | Parse a map with Tiled and report structural or reference errors. |
54
+ | `create_map` | Create orthogonal, isometric, staggered, or hexagonal maps with initial layers. |
55
+ | `add_object_layer` | Add a uniquely named object layer and scalar properties. |
56
+ | `write_objects` | Append or replace bounded point, rectangle, ellipse, polygon, or polyline objects. |
57
+ | `create_tileset` | Create an external TSJ/TSX tileset from an image. |
58
+ | `add_tileset` | Attach an external tileset to a map. |
59
+ | `paint_tiles` | Paint or clear bounded cells, including Tiled flip flags. |
60
+ | `convert_map` | Convert maps through Tiled's registered map formats, including TMJ and TMX. |
61
+
62
+ All mutating operations write to a same-directory temporary file and atomically
63
+ replace the requested output only after Tiled returns a valid, non-empty result.
64
+
65
+ ## Install
66
+
67
+ Install [Tiled](https://www.mapeditor.org/download.html) 1.10 or newer, then
68
+ follow the [agent-first installation guide](install.md). The adapter is not
69
+ currently published on PyPI, so `pip install dcc-mcp-tiled` must not be treated
70
+ as a working install path. Install a checksum-verified wheel from a trusted
71
+ release or reviewed checkout, then run:
72
+
73
+ ```bash
74
+ dcc-mcp-tiled-doctor doctor --json
75
+ dcc-mcp-tiled-doctor verify --json
76
+ dcc-mcp-tiled
77
+ ```
78
+
79
+ The deprecated `dcc-mcp-tiled-install` compatibility alias performs
80
+ verification only and never writes an installation.
81
+
82
+ When the fixed driver is unavailable, catalog planning is exposed only through
83
+ `dcc-mcp-tiled-doctor catalog-plan --json`. That wrapper authenticates the
84
+ exact Core 0.20.14 CLI bytes against Core's signed platform update manifest and
85
+ rechecks the path and digest immediately before the read-only plan. Missing or
86
+ untrusted executables return an explicit blocker instead of a placeholder or
87
+ browser-only remediation.
88
+
89
+ The adapter discovers `tiled`/`tiled.exe` from `PATH` and common Windows install
90
+ locations. Set an explicit executable when needed:
91
+
92
+ ```powershell
93
+ $env:DCC_MCP_TILED_EXECUTABLE = "C:\Program Files\Tiled\tiled.exe"
94
+ $env:DCC_MCP_TILED_ALLOWED_ROOTS = "D:\game\maps;D:\game\art"
95
+ dcc-mcp-tiled
96
+ ```
97
+
98
+ On POSIX systems, separate multiple allowed roots with `:` instead of `;`.
99
+ Without `DCC_MCP_TILED_ALLOWED_ROOTS`, only the server's current working
100
+ directory is accessible.
101
+
102
+ The MCP endpoint is registered with DCC-MCP Core and is also available directly
103
+ from the adapter's loopback HTTP server. Use `dcc-mcp-cli instances` to discover
104
+ the active URL and typed capabilities.
105
+
106
+ ## Safety contract
107
+
108
+ - Source and output paths must remain inside `DCC_MCP_TILED_ALLOWED_ROOTS`.
109
+ - Inputs, responses, maps, tile cells, objects, coordinates, properties, and
110
+ execution time all have explicit upper bounds.
111
+ - Subprocesses run without a shell, support DCC-MCP cancellation, and are
112
+ terminated on timeout.
113
+ - Existing outputs require `overwrite=true`; successful writes are atomic.
114
+ - The bundled driver is immutable package code. Tool arguments are JSON data,
115
+ never evaluated source.
116
+ - This adapter does not claim interactive GUI control. Visible editor automation
117
+ belongs to a separate, explicitly authorized UI-control workflow.
118
+
119
+ Runtime ceilings can be reduced with `DCC_MCP_TILED_MAX_MAP_BYTES`,
120
+ `DCC_MCP_TILED_MAX_REQUEST_BYTES`, `DCC_MCP_TILED_MAX_RESPONSE_BYTES`,
121
+ `DCC_MCP_TILED_MAX_TILE_CELLS`, `DCC_MCP_TILED_MAX_CELLS_PER_CALL`,
122
+ `DCC_MCP_TILED_MAX_OBJECTS_PER_CALL`, and
123
+ `DCC_MCP_TILED_MAX_TIMEOUT_SECS`.
124
+
125
+ ## Native validation
126
+
127
+ The release gate runs the official Tiled 1.12.2 AppImage by a pinned SHA256 in a
128
+ virtual display. It creates a two-tile image tileset, authors and paints a TMJ
129
+ map, writes two gameplay objects, validates it, converts it to TMX, starts the
130
+ packaged MCP server, loads the bundled Skill, and completes a typed asynchronous
131
+ `get_status` job. The smoke test verifies 10 registered typed tools and never
132
+ uses a mock Tiled process.
133
+
134
+ The adapter does not download Tiled and has no persistent binary cache. The CI
135
+ AppImage exists only in the ephemeral runner workspace; operators own upgrades
136
+ and cleanup for OS packages or exact, checksum-verified AppImages.
137
+
138
+ TMJ/TMX outputs are suitable handoff artifacts for downstream Godot, Blender,
139
+ and other game-content pipelines. This adapter validates the Tiled artifact; a
140
+ target engine or DCC remains responsible for its own importer and scene-level
141
+ acceptance.
142
+
143
+ ## Development
144
+
145
+ ```bash
146
+ python -m pip install -e ".[dev]"
147
+ python -m pytest
148
+ python -m ruff check src tests tools
149
+ python -m ruff format --check src tests tools
150
+ python tools/lint_skills.py
151
+ python -m build
152
+ python -m twine check dist/*
153
+ ```
154
+
155
+ Architecture details are in [docs/architecture.md](docs/architecture.md).
156
+ Official API references:
157
+ [scripting](https://doc.mapeditor.org/en/stable/reference/scripting/),
158
+ [MapFormat](https://www.mapeditor.org/docs/scripting/classes/MapFormat.html), and
159
+ [TilesetFormat](https://www.mapeditor.org/docs/scripting/classes/TilesetFormat.html).
@@ -0,0 +1,136 @@
1
+ # dcc-mcp-tiled
2
+
3
+ <p align="center">
4
+ <picture>
5
+ <source media="(prefers-color-scheme: dark)" srcset="docs/images/dcc-mcp-tiled-dark.svg">
6
+ <source media="(prefers-color-scheme: light)" srcset="docs/images/dcc-mcp-tiled.svg">
7
+ <img src="docs/images/dcc-mcp-tiled.svg" alt="DCC-MCP · TILED" width="600">
8
+ </picture>
9
+ </p>
10
+
11
+ Typed, workspace-bounded level authoring for [Tiled](https://www.mapeditor.org/)
12
+ through the DCC Model Context Protocol.
13
+
14
+ ![Tiled game-level workflow](docs/images/tiled-showcase.webp)
15
+
16
+ _Illustrative workflow generated with OpenAI ImageGen from the retained source in `docs/images/sources`; it is not a Tiled screenshot or host-validation artifact._
17
+
18
+ The adapter invokes Tiled's official JavaScript scripting API through
19
+ `tiled --evaluate`. It ships one fixed driver and accepts typed JSON data only:
20
+ clients cannot submit JavaScript or other arbitrary source code. The service is
21
+ standalone, so Tiled does not need an in-process Python plug-in or an open editor
22
+ window.
23
+
24
+ ## Capabilities
25
+
26
+ | Typed tool | Purpose |
27
+ | --- | --- |
28
+ | `get_status` | Verify the executable, Tiled/Qt versions, formats, roots, and runtime limits. |
29
+ | `inspect_map` | Summarize maps, layers, objects, tilesets, properties, and bounded tile occupancy. |
30
+ | `validate_map` | Parse a map with Tiled and report structural or reference errors. |
31
+ | `create_map` | Create orthogonal, isometric, staggered, or hexagonal maps with initial layers. |
32
+ | `add_object_layer` | Add a uniquely named object layer and scalar properties. |
33
+ | `write_objects` | Append or replace bounded point, rectangle, ellipse, polygon, or polyline objects. |
34
+ | `create_tileset` | Create an external TSJ/TSX tileset from an image. |
35
+ | `add_tileset` | Attach an external tileset to a map. |
36
+ | `paint_tiles` | Paint or clear bounded cells, including Tiled flip flags. |
37
+ | `convert_map` | Convert maps through Tiled's registered map formats, including TMJ and TMX. |
38
+
39
+ All mutating operations write to a same-directory temporary file and atomically
40
+ replace the requested output only after Tiled returns a valid, non-empty result.
41
+
42
+ ## Install
43
+
44
+ Install [Tiled](https://www.mapeditor.org/download.html) 1.10 or newer, then
45
+ follow the [agent-first installation guide](install.md). The adapter is not
46
+ currently published on PyPI, so `pip install dcc-mcp-tiled` must not be treated
47
+ as a working install path. Install a checksum-verified wheel from a trusted
48
+ release or reviewed checkout, then run:
49
+
50
+ ```bash
51
+ dcc-mcp-tiled-doctor doctor --json
52
+ dcc-mcp-tiled-doctor verify --json
53
+ dcc-mcp-tiled
54
+ ```
55
+
56
+ The deprecated `dcc-mcp-tiled-install` compatibility alias performs
57
+ verification only and never writes an installation.
58
+
59
+ When the fixed driver is unavailable, catalog planning is exposed only through
60
+ `dcc-mcp-tiled-doctor catalog-plan --json`. That wrapper authenticates the
61
+ exact Core 0.20.14 CLI bytes against Core's signed platform update manifest and
62
+ rechecks the path and digest immediately before the read-only plan. Missing or
63
+ untrusted executables return an explicit blocker instead of a placeholder or
64
+ browser-only remediation.
65
+
66
+ The adapter discovers `tiled`/`tiled.exe` from `PATH` and common Windows install
67
+ locations. Set an explicit executable when needed:
68
+
69
+ ```powershell
70
+ $env:DCC_MCP_TILED_EXECUTABLE = "C:\Program Files\Tiled\tiled.exe"
71
+ $env:DCC_MCP_TILED_ALLOWED_ROOTS = "D:\game\maps;D:\game\art"
72
+ dcc-mcp-tiled
73
+ ```
74
+
75
+ On POSIX systems, separate multiple allowed roots with `:` instead of `;`.
76
+ Without `DCC_MCP_TILED_ALLOWED_ROOTS`, only the server's current working
77
+ directory is accessible.
78
+
79
+ The MCP endpoint is registered with DCC-MCP Core and is also available directly
80
+ from the adapter's loopback HTTP server. Use `dcc-mcp-cli instances` to discover
81
+ the active URL and typed capabilities.
82
+
83
+ ## Safety contract
84
+
85
+ - Source and output paths must remain inside `DCC_MCP_TILED_ALLOWED_ROOTS`.
86
+ - Inputs, responses, maps, tile cells, objects, coordinates, properties, and
87
+ execution time all have explicit upper bounds.
88
+ - Subprocesses run without a shell, support DCC-MCP cancellation, and are
89
+ terminated on timeout.
90
+ - Existing outputs require `overwrite=true`; successful writes are atomic.
91
+ - The bundled driver is immutable package code. Tool arguments are JSON data,
92
+ never evaluated source.
93
+ - This adapter does not claim interactive GUI control. Visible editor automation
94
+ belongs to a separate, explicitly authorized UI-control workflow.
95
+
96
+ Runtime ceilings can be reduced with `DCC_MCP_TILED_MAX_MAP_BYTES`,
97
+ `DCC_MCP_TILED_MAX_REQUEST_BYTES`, `DCC_MCP_TILED_MAX_RESPONSE_BYTES`,
98
+ `DCC_MCP_TILED_MAX_TILE_CELLS`, `DCC_MCP_TILED_MAX_CELLS_PER_CALL`,
99
+ `DCC_MCP_TILED_MAX_OBJECTS_PER_CALL`, and
100
+ `DCC_MCP_TILED_MAX_TIMEOUT_SECS`.
101
+
102
+ ## Native validation
103
+
104
+ The release gate runs the official Tiled 1.12.2 AppImage by a pinned SHA256 in a
105
+ virtual display. It creates a two-tile image tileset, authors and paints a TMJ
106
+ map, writes two gameplay objects, validates it, converts it to TMX, starts the
107
+ packaged MCP server, loads the bundled Skill, and completes a typed asynchronous
108
+ `get_status` job. The smoke test verifies 10 registered typed tools and never
109
+ uses a mock Tiled process.
110
+
111
+ The adapter does not download Tiled and has no persistent binary cache. The CI
112
+ AppImage exists only in the ephemeral runner workspace; operators own upgrades
113
+ and cleanup for OS packages or exact, checksum-verified AppImages.
114
+
115
+ TMJ/TMX outputs are suitable handoff artifacts for downstream Godot, Blender,
116
+ and other game-content pipelines. This adapter validates the Tiled artifact; a
117
+ target engine or DCC remains responsible for its own importer and scene-level
118
+ acceptance.
119
+
120
+ ## Development
121
+
122
+ ```bash
123
+ python -m pip install -e ".[dev]"
124
+ python -m pytest
125
+ python -m ruff check src tests tools
126
+ python -m ruff format --check src tests tools
127
+ python tools/lint_skills.py
128
+ python -m build
129
+ python -m twine check dist/*
130
+ ```
131
+
132
+ Architecture details are in [docs/architecture.md](docs/architecture.md).
133
+ Official API references:
134
+ [scripting](https://doc.mapeditor.org/en/stable/reference/scripting/),
135
+ [MapFormat](https://www.mapeditor.org/docs/scripting/classes/MapFormat.html), and
136
+ [TilesetFormat](https://www.mapeditor.org/docs/scripting/classes/TilesetFormat.html).