Skip to content

feat(agent-toolkit): add get_asset_upload_url and finalize_asset_upload tools#332

Open
Mikolajku wants to merge 11 commits intomasterfrom
feature/mikolajku/asset-upload-mcp-tools
Open

feat(agent-toolkit): add get_asset_upload_url and finalize_asset_upload tools#332
Mikolajku wants to merge 11 commits intomasterfrom
feature/mikolajku/asset-upload-mcp-tools

Conversation

@Mikolajku
Copy link
Copy Markdown
Collaborator

@Mikolajku Mikolajku commented May 5, 2026

Summary

Adds two new MCP tools enabling AI agents to upload files to monday.com and attach them to file columns on board items.

Tools added

get_asset_upload_url — Step 1: request a presigned S3 upload URL.

  • Inputs: fileName, contentType, fileSize (max 500MB)
  • Returns: upload_id, upload_url, url_expires_at

finalize_asset_upload — Step 2: finalize the upload and attach to a column.

  • Inputs: uploadId, etag (from PUT response headers), boardId, itemId, columnId
  • Returns: asset_id, filename, content_type, file_size, url, filelink

Usage example

1. get_asset_upload_url(fileName="report.pdf", contentType="application/pdf", fileSize=204800)
   → { upload_id: "abc", upload_url: "https://s3.../presigned", url_expires_at: "..." }

2. curl -i -X PUT "<upload_url>" -H "Content-Type: application/pdf" --data-binary @report.pdf
   → capture ETag header: "d41d8cd98f00b204e9800998ecf8427e"

3. finalize_asset_upload(uploadId="abc", etag="d41d8cd...", boardId="123", itemId="456", columnId="file_col")
   → { asset_id: 789, filename: "report.pdf", filelink: "https://..." }

Both tools use versionOverride: 'dev' as create_upload/complete_upload are currently dev-schema-only.

🤖 Generated with Claude Code

Mikolajku and others added 9 commits April 21, 2026 16:42
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… attach, dummy ETag)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ure in get_asset_upload_url

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…hema, add --api-url arg

- Add append_file_to_column tool that safely appends a file to an existing
  file column without clobbering other files (fetches current values first)
- Update finalize_asset_upload to return filelink instead of is_image/url_thumb,
  matching the updated AssetResult schema in assets-core (commit 07b6857)
- Add --api-url / -au CLI arg to monday-api-mcp to allow pointing at staging
- Register AppendFileToColumnTool in platform-api-tools index

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l in append_file_to_column

Replaces the two-step fetch-existing-files + update_assets_on_item pattern
with a direct change_column_value mutation using the added_file JSON payload.
This eliminates the race condition and avoids copying the underlying asset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nd_file_to_column

finalize_asset_upload now accepts a required columnId and calls
change_column_value with an added_file payload immediately after
complete_upload, preventing orphaned assets.

append_file_to_column is removed — callers can use
change_item_column_values with raw JSON for any other append use cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Guard empty parts array in GetAssetUploadUrlTool (throw instead of returning undefined url)
- Remove non-existent fileName param from finalize_asset_upload description
- Add comments on versionOverride: 'dev' explaining graduation path
- Add test for empty-parts error path in GetAssetUploadUrlTool
- Update CHANGELOG with 5.3.2 entry for asset upload tools
- Re-run codegen to remove stale GetFileColumnValue types (source deleted in e01b7b8 but codegen was not re-run)
- Revert --api-url / mondayApiEndpoint changes (staging-only, belongs in stash not in branch)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mikolajku Mikolajku changed the title MCP tools for asset upload via presigned urls feat(agent-toolkit): add get_asset_upload_url and finalize_asset_upload tools May 5, 2026
@Mikolajku Mikolajku marked this pull request as ready for review May 6, 2026 08:11
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