Implements full 4-step LinkedIn Videos API flow: download from public URL, initialize upload, 4MB chunk PUT with ETag collection, finalize, poll until AVAILABLE, then publish via POST /rest/posts reading post ID from x-restli-id. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
965 B
965 B
Phase 01 Plan 02: Tool + Route Wiring Summary
Wired linkedin_upload_video MCP tool and POST /api/linkedin/video REST route.
Accomplishments
- Added
createVideoPost as createLinkedInVideoPostto the LinkedIn import insrc/tools.ts - Inserted
linkedin_upload_videotool definition in the tools array (afterlinkedin_create_post) - Added
case 'linkedin_upload_video'handler inhandleToolCallswitch - Added
POST /api/linkedin/videoroute insrc/index.ts(after/api/linkedin/post) npm run buildsucceeds with zero errors
Files Created/Modified
src/tools.ts— import line updated, tool definition added, switch case addedsrc/index.ts— REST route added
Decisions Made
- REST route does not add input validation (deferred to the tool's required-fields check per plan spec)
Issues Encountered
- None — all changes clean on first attempt
Next Step
Phase complete — linkedin_upload_video tool is live.