Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

docs: wait for ready before publishing adjusted media

Gilad Resisi4cab87301f7e
diff --git a/libraries/nestjs-libraries/src/chat/tools/media.status.tool.ts b/libraries/nestjs-libraries/src/chat/tools/media.status.tool.ts
index de8e613b5..f79e6e2b5 100644
--- a/libraries/nestjs-libraries/src/chat/tools/media.status.tool.ts
+++ b/libraries/nestjs-libraries/src/chat/tools/media.status.tool.ts
@@ -15,7 +15,7 @@ export class MediaStatusTool implements AgentToolInterface {
id: 'mediaStatusTool',
description: `Check whether a media uploaded with adjust set to true finished adjusting to the platforms' limits, using the media id returned by uploadFromUrlTool, the public API (POST /public/v1/upload or /public/v1/upload-from-url) or the Postiz CLI (postiz upload).
Files the user uploaded through the upload widget (uploadWidgetTool) have no id until they are listed, so check those with uploadWidgetStatusTool and its sessionId instead.
-Only a media with the status "processing" needs checking: wait about 10 seconds and call again. Its path is already usable, a post published before the adjustment ends uses the original file.
+Only a media with the status "processing" needs checking: wait about 10 seconds and call again. Don't publish a post with its path until it is "ready": a post published while it is processing uses the original, unadjusted file.
"ready" means the adjusted file is in place at the same path. "ready" with a warning means the adjustment failed and the original file was kept and will be used for publishing.`,
mcp: {
annotations: {
diff --git a/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts b/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts
index ee1a8dd0b..6b1b9c805 100644
--- a/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts
+++ b/libraries/nestjs-libraries/src/chat/tools/upload.from.url.tool.ts
@@ -18,7 +18,7 @@ Local or private files cannot be fetched by this tool: upload them with the Post
Use this before scheduling a post when the user provides an external media URL (not already hosted on our domain),
so the attachment passes the upload-domain validation. Returns the hosted media { id, path, status } to use as an attachment (or as the src of an <img> in the content, when the channel rules say pictures go inside the content), or { error } on failure.
Set adjust to true (off by default) to adjust the media to the platforms' limits after the upload, for media a platform may reject as too large, too small or in an unsupported encoding: videos get their short side scaled to 1080 px (up or down, long side at most 1920 px) and are re-encoded to H.264 MP4 with AAC audio at up to 60 fps; images are only scaled down (short side at most 1080 px, long side at most 1920 px) and keep their format. GIF, AVIF, BMP and TIFF files are stored as uploaded.
-The path is usable right away. Without adjust the status is "ready". With adjust it is "processing" until the adjusted file replaces the original at the same path, and a post published before that uses the original. To know when the adjusted file is in place, call mediaStatusTool with the returned id (not uploadWidgetStatusTool, which only covers the upload widget).`,
+Without adjust the status is "ready" and the path can be used immediately. With adjust the status is "processing" until the adjusted file replaces the original at the same path, usually within seconds. Wait until it is "ready" before publishing a post with this path: a post published while it is processing uses the original, unadjusted file. To know when the adjusted file is in place, call mediaStatusTool with the returned id (not uploadWidgetStatusTool, which only covers the upload widget).`,
mcp: {
annotations: {
title: 'Upload Media From URL',