Create IT Glue Document Image
itglue_create_document_imageUpload an image into an IT Glue document body so it renders inline or in a gallery, bypassing attachment-only limitations.
Instructions
Upload a picture INTO a document — the only way to get an image to render in a document's body (itglue_create_attachment only files it in the Attachments panel). Two placements: (1) INLINE — omit gallery_id; the result carries inline_resource_url, a relative path you must use verbatim as in Text/Step section HTML via itglue_create_document_section or itglue_update_document_section, or pass append_to_section_id to have this tool append the to an existing Text/Step section for you. (2) GALLERY — pass gallery_id (the document_gallery_id shown on a Gallery or Step section) to file the image into that gallery. Never put base64/data: URIs or S3 URLs in section content; IT Glue strips them. Provide exactly one source: upload_id (a file the client PUT via itglue_request_upload — the right choice for anything on the client's disk), url (the server fetches it), file_path (local stdio runs only), or content_base64 (tiny files only). content_base64 must be the exact bytes of a real image file — never write or reconstruct base64 yourself (IT Glue rejects anything ImageMagick cannot decode). file_name needs an extension (e.g. screenshot.png); inferred from url/file_path when omitted. Max 25 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL the server fetches and base64-encodes | |
| file_name | No | File name with extension; inferred from url/file_path if omitted | |
| file_path | No | Local filesystem path to read (stdio transport only) | |
| upload_id | No | ID from itglue_request_upload after the client has PUT the file to the returned URL — the server reads the bytes itself | |
| gallery_id | No | document_gallery_id of a Gallery/Step section to file the image into; omit for an inline image | |
| document_id | Yes | The document the image belongs to | |
| content_base64 | No | Base64-encoded file bytes (a leading data: URI prefix is stripped) — small files only | |
| response_format | No | Output format: human-readable markdown (default) or structured JSON | markdown |
| append_to_section_id | No | Inline only: ID of an existing Text/Step section to append <div><img src=…></div> to after upload |