Skip to content

Release v0.5.0: document-image tools (pictures inside documents) - #14

Merged
selic merged 2 commits into
mainfrom
release/0.5.0
Sep 14, 2026
Merged

selic merged 2 commits into
mainfrom
release/0.5.0

Conversation

@selic

@selic selic commented Sep 14, 2026

Copy link
Copy Markdown
Member

Why

itglue_create_attachment only files into a record's Attachments panel — nothing it uploads ever renders in a document's body, and IT Glue strips data: URIs and S3 URLs from section HTML. So "image support" for documents effectively did not exist.

What

IT Glue's separate POST /document_images API is now wrapped:

  • itglue_create_document_image (write) — inline (target: document) or gallery (target: gallery, using a Gallery/Step section's document_gallery_id); optional append_to_section_id embeds the returned <img src="/org/docs/doc/images/ID"> into an existing Text/Step section in one call.
  • itglue_get_document_image (read), itglue_delete_document_image (editor-tier, like deleting a section).
  • Gallery/Step sections expose document_gallery_id and their images in list/get/get_document output.
  • Tool descriptions spell out the attachment vs. document-image split and that section updates replace the whole HTML.
  • Shared byte-source resolution (content_base64 / url / file_path) extracted to src/tools/binary-input.ts.
  • Endpoint catalog, README, CLAUDE.md, tests (137 passing).

Verified live

Uploaded assets/logo.png into doc 24183083 via the new handler; IT Glue preserved the file name (so the documented nested image.file-name key is correct) and rendered_content resolved the relative path to a presigned S3 URL.

Release

Lockstep bump 0.4.1 → 0.5.0 (package.json, package-lock.json, server.json, manifest.json). After merge: tag v0.5.0 → release.yml (npm + .mcpb + GitHub release) and docker-publish.yml (GHCR).

🤖 Generated with Claude Code

selic and others added 2 commits September 14, 2026 12:43
itglue_create_attachment only files into a record's Attachments panel — it
never shows up in a document's body, and IT Glue strips data: URIs and its
own S3 URLs from section HTML. Pictures inside documents go through the
separate POST /document_images API: target {type: document|gallery, id} plus
image {content, file-name}; the response's inline_resource_url (a relative
/org/docs/doc/images/id path) is the only <img src> the editor keeps.

New tools: itglue_create_document_image (inline or gallery, with an
append_to_section_id shortcut that embeds the <img> for you),
itglue_get_document_image, itglue_delete_document_image (editor-tier, like
deleting a section). Gallery/Step sections now expose document_gallery_id and
their images; tool descriptions explain the attachment/image split and that
section updates replace the whole HTML.

Byte-source resolution (content_base64 / url / file_path) moved to
src/tools/binary-input.ts and is shared with attachments. Endpoint catalog,
README, CLAUDE.md and tests updated. Verified live: uploaded assets/logo.png
into doc 24183083 and confirmed rendered_content resolves it to S3.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@selic
selic merged commit 934c804 into main Sep 14, 2026
2 checks passed
@selic
selic deleted the release/0.5.0 branch September 14, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant