# MCP document intake Part of https://atlaswork.ai/llms.txt Section URL: https://atlaswork.ai/llms/mcp-document-intake MCP tools run on Atlas servers. They cannot read the user's laptop or chat attachment bytes directly, except when the host injects document_file. Pick ONE path for send_contract_for_review: | Situation | Path | |-----------|------| | Host supports attachment injection (ChatGPT) | document_file + parties[] | | Public or share link exists | document_url + parties[] | | Local file in chat (Claude Desktop, etc.) | request_document_upload + parties[] then complete_upload_session | | Agent has shell + file path (Claude Code, CI) | npx @atlasapi/cli upload or POST /api/documents, then complete_upload_session | | Contract drafted in chat only | document_text + parties[] | Never: base64 in MCP, upload_document (removed), document_text for .pdf/.docx files. ### Local file upload session (two MCP calls) 1. send_contract_for_review({ request_document_upload: true, parties: [...] }) Returns needs_document { upload_url, upload_session }. 2. User opens link, uploads PDF or DOCX unchanged, then says done, uploaded, ready, ok, or finished in chat. 3. send_contract_for_review({ complete_upload_session: "" }) Returns created { review_url }. Agents should treat any upload-complete phrase as the signal for step 3. No webhook or poll API. Parties are stored server-side on step 1. Do not re-ask for signers on step 3. ### Claude Code / local shell (CLI) When the agent has shell access and the file is on disk: 1. send_contract_for_review({ request_document_upload: true, parties: [...] }) Returns needs_document with upload_url, upload_session, and agent_upload_command. 2. Run the CLI (or curl) to stage the file: npx @atlasapi/cli upload --file ./contract.pdf --from-url "" Or pass the token from the URL: npx @atlasapi/cli upload --file ./contract.pdf --token "" 3. User says done, uploaded, ready, ok, or finished in chat (or agent calls complete_upload_session after CLI exit 0). 4. send_contract_for_review({ complete_upload_session: "" }) You can delegate step 2 to Claude Code in the same thread: "use Claude Code to upload ./path/to/file.pdf" after step 1 returns upload_url and agent_upload_command. Direct REST (no upload session): POST /api/documents with Bearer API key or OAuth scope documents:write, then complete_upload_session or document_id on send. ### Review-first (MCP) send_contract_for_review always returns review_url for document uploads. A human must click Send on review before signers are emailed. Do not use auto_send on this tool for one-off contracts. Templates use send_contract_from_template with auto_send when repeat sends need immediate dispatch.