darktable icon indicating copy to clipboard operation
darktable copied to clipboard

MCP server: export/render capped at 1363x1024 — 'width' ignored above ~1600, full raw resolution unreachable

Open andreagosto opened this issue 2 months ago • 0 comments

Summary

The MCP server tool export (and render / image_stats) accepts a width parameter, but the output resolution does not follow it above ~1600 px. Requesting the full native resolution of a raw (e.g. 5184×3888 Olympus ORF) still produces a PNG capped at 1363×1024.

requested width actual output
1024 681×512
1600 1363×1024
2000 1363×1024
5184 (full raw) 1363×1024

Tested with both input.imgid and input.path, with and without an explicit module stack. Always the same cap, so the native raw resolution is unreachable through the MCP server.

Expected

width / height should be honored up to the image's native resolution, like a normal darktable export (darktable-cli --width ... does respect it). At the very least, the cap and the parameter units should be documented.

Steps to reproduce

  1. Start darktable-mcp --core --library <catalog> with a catalog containing a ~5000 px-wide raw.
  2. Call the export tool with {input: {path: <raw>}, width: 5184, out_path: <out.png>}.
  3. Inspect the resulting PNG: it is 1363×1024.

Environment

  • darktable 5.7.0+758~gd63f1023a3 (nightly, AppImage), Linux, headless darktable-mcp
  • Camera raw: Olympus ORF 5184×3888 (cap appears resolution-independent)

Additional notes

  • The shipped tool schema (usr/share/darktable/mcp-tools.json) does not describe the parameters: width/height are bare integer with no description, units or limits, and there is no configuration key / environment variable to raise the cap.
  • Output sizes correspond to discrete downscale steps of the full image (÷3.8 and ÷7.6, ratio ~2), which suggests the tools render through a preview/mipmap-style pipeline rather than a sized export pipe.

Related observation (possibly a separate issue)

  • Combining history_end with a module stack silently discards the stack (the output equals the bare base-raw render); the semantics of history_end are not documented in the tool schema.

andreagosto avatar Sep 06 '26 10:09 andreagosto