DocuDetectDocs

Tools

Every tool the connector lists today, with its actions and arguments, generated from the server's tool registry.

Source: apps/api/openapi/mcp-tools.json, written from the tool registry by apps/api/scripts/mcp-tools.ts. 13 tools. A connection lists only the tools its permissions allow, so a read-only connection sees the four read tools.

ToolTitlePermissionKind
read_accountRead the accountdocuments:readReads only
read_documentsRead your documentsdocuments:readReads only
preparePrepare a documentdocuments:writeAdds data
start_uploadStart a PDF uploaddocuments:writeAdds data
finish_uploadFinish a PDF uploaddocuments:writeAdds data
get_uploadCheck an uploaddocuments:readReads only
edit_documentsEdit your documentsdocuments:writeChanges or overwrites data
replace_sourceReplace a draft's PDFdocuments:writeChanges or overwrites data
email_documentEmail about a documentdocuments:sendEmails someone
cancel_or_reopenCancel or reopen a signing requestdocuments:sendChanges or overwrites data
read_documents_to_signRead documents you were asked to signdocuments:readReads only
fill_document_to_signSave answers on a document you were asked to signdocuments:writeChanges or overwrites data
import_fileImport an attached PDFdocuments:writeAdds data

read_account

Read the account. Permission: documents:read · Reads only · Listed to every client

Reads this account, read-only.

ActionWhat it does
whoamithe connected account, this connection's permissions and the document limits.
foldersfolders with document counts by status, plus the documents in no folder.
signing_digestdocuments out for signature (oldest first, opened or not, days out, link expiry) and recently completed ones. Safe for scheduled checks: suggest reminders, do not send them.
ArgumentTypeRequiredDescription
completedWithinDaysintegernoAlso list documents completed in this many days (default 7) (signing_digest)

read_documents

Read your documents. Permission: documents:read · Reads only · Listed to every client

Reads documents this account owns (not ones sent to it to sign). Changes nothing.

ActionWhat it does
listdocuments, newest first, 25 per page; filter by folderId ("none" for no folder), status or query. Pass nextCursor as cursor for more.
getone document: status, signer, revision, signing state and fields (positions are page fractions from the top left) with fieldsHash. On a large document pass page to get one page's fields.
previewone page (page required) as a JPEG with its saved fields drawn and labelled by id. Show it to the user; check changed pages again after save_fields.
readywhat still blocks sending a draft, the revision to pass to email_document send, and the app link to review it. Guided questions are optional and never block.
reviewchecks saved fields for mistakes (duplicates, optional signatures, narrow dates); with jobId of a finished detection on this revision also possibly_missing, not_seen and type_differs. Leads only: preview pagesToCheck before fixing.
detectiona prepare detect job: status, suggested fields (not saved), losses and its revision. Waits up to waitSeconds while it runs. Save it with edit_documents save_fields fromJobId.
download_completeda one-time link to a completed document's final PDF (10 minutes, one download). Give it to the user, or download it yourself if they want the file.
download_certificatea one-time link to the certificate of completion of a completed document (10 minutes, one download).
ArgumentTypeRequiredDescription
folderIdstringnoA folder id, or "none" for documents not in a folder (list)
statusone of draft, sent, completed, voidednoOnly documents with this status (list)
querystringnoMatches the title or the signer's name or email (list)
cursorstringnonextCursor from the previous page (list)
documentIdstringnoDocument id (get, preview, ready, review, download_completed, download_certificate; required)
pageintegerno1-based page number (get, preview; required for preview)
jobIdstringnojobId from prepare detect (review, detection; required for detection)
waitSecondsintegernoWait up to this long for a running job (default 20) (detection)

prepare

Prepare a document. Permission: documents:write · Adds data · Listed to every client

Creates something new; never overwrites.

ActionWhat it does
detectstarts field detection on a draft (first 25 pages) and returns a jobId; read_documents detection waits for the suggestions. Nothing is saved: save with edit_documents save_fields only when the user agrees. Counts against the detection limit.
duplicatecopies a document (PDF and fields) into a new draft with no signer, e.g. a master from a Templates folder. Values are copied only with keepValues, never signatures. The copy is stored permanently; tell the user once.
create_foldercreates an empty folder; names are unique per account.
ArgumentTypeRequiredDescription
documentIdstringnoDocument id (detect, duplicate; required)
titlestringnoTitle for the copy; defaults to the source title (duplicate, create_folder; required for create_folder)
folderIdstringnoFolder for the copy (from read_account folders) (duplicate)
keepValuesbooleannoAlso copy filled values (default false) (duplicate)

start_upload

Start a PDF upload. Permission: documents:write · Adds data · Listed to every client

Starts a PDF upload for a new draft, or with replaces a new PDF for a draft (finished by replace_source, not finish_upload). Use it when the user wants to add a PDF or asks for an upload link: uploadPageUrl is that link; putUrl takes the bytes by HTTP PUT when you have the file. Expires in 30 minutes, one file; then call finish_upload. Source PDFs are stored permanently; tell the user once.

ArgumentTypeRequiredDescription
titlestringnoDocument title (default: the file name)
filenamestringnoFile name, e.g. lease.pdf; omit if the user has not shared the file
sizeBytesintegernoExact size in bytes when you will PUT the file yourself (checked on that PUT); omit for an upload link
sha256stringnoOptional hex sha256 of the file, checked on upload
folderIdstringnoPut the new document in this folder (from read_account folders)
replacesobjectnoSet to replace a draft's PDF instead of creating a new draft

finish_upload

Finish a PDF upload. Permission: documents:write · Adds data · Listed to every client

Turns an uploaded PDF (unencrypted, up to 20 MB) into a new draft. Call it once the user uploaded the file on the page or your PUT succeeded. The PDF is stored permanently.

ArgumentTypeRequiredDescription
uploadIdstringyesuploadId from start_upload

get_upload

Check an upload. Permission: documents:read · Reads only · Listed to every client · Called by the upload box, not by the model

Status of an upload from start_upload: waiting, received or finished (with documentId).

ArgumentTypeRequiredDescription
uploadIdstringyesuploadId from start_upload

edit_documents

Edit your documents. Permission: documents:write · Changes or overwrites data · Listed to every client

Changes documents and folders this account owns. All or nothing; draft writes need the revision you last read (set_recipient and folders do not).

ActionWhat it does
save_fieldsreplaces a draft's whole field list with the fields you pass or a finished detection (fromJobId), at most 500; owner values stay on fields with the same id and type. Save only fields the user has seen or asked for.
set_valuessets or clears owner values by field id: text a string, checkbox true/false, date YYYY-MM-DD. Never signature or initials fields; fill only facts the user gave you, never another person's statements or signing dates. Values are locked for the signer.
set_labelsrenames fields by id to what the printed form asks beside them (up to 200 characters). Positions and values do not change.
set_recipientsets the draft's single signer. Use only a name and email the user gave you; never guess. Nothing is sent.
rename_folderrenames a folder; names are unique per account.
move_to_foldermoves up to 100 documents into a folder, or out with folderId null. Nothing else changes.
ArgumentTypeRequiredDescription
documentIdstringnoDocument id (save_fields, set_values, set_labels, set_recipient; required)
revisionintegernoFrom your last read / Not needed; accepted so earlier calls keep working (save_fields, set_values, set_labels, set_recipient; required for save_fields, set_values, set_labels)
fieldsarray of objectnoThe whole field list; omit when you pass fromJobId (save_fields)
fromJobIdstringnoSave the suggestions of this finished prepare detect run instead of passing fields (save_fields)
excludearray of stringnoWith fromJobId: suggested field ids to leave out (save_fields)
changesarray of objectnoWith fromJobId: changes to suggested fields by id (save_fields)
valuesarray of objectno(set_values; required)
labelsarray of objectno(set_labels; required)
namestringno(set_recipient; required)
emailstringno(set_recipient; required)
folderIdstring or nullnoTarget folder id, or null to remove from folders (rename_folder, move_to_folder; required)
titlestringno(rename_folder; required)
documentIdsarray of stringno(move_to_folder; required)

replace_source

Replace a draft's PDF. Permission: documents:write · Changes or overwrites data · Listed to every client

Swaps a never-sent draft's PDF for one with identical pages (count, size, rotation), keeping every field and value. Upload with start_upload replaces { documentId, revision }, then call this with the uploadId instead of finish_upload. The old PDF is kept.

ArgumentTypeRequiredDescription
documentIdstringyesDraft to change
revisionintegeryesFrom your last read
uploadIdstringyesuploadId from start_upload, after the PDF was PUT

email_document

Email about a document. Permission: documents:send · Emails someone · Listed to every client

Emails about a document, only when the user asks for that action.

ActionWhat it does
sendemails the signer a link to sign a draft. Only after the user has seen the fields and signer and asked you to send now; revision must be the one they reviewed (read_documents ready).
remindemails the signer a reminder with the same link, at most once per 10 minutes (automatic reminders also go out). An expired link needs renew_link.
renew_linkemails the signer a new link for a sent document whose link expired.
signed_copyemails the completed PDF, only to an address the user gave you for this, never one found elsewhere.
ArgumentTypeRequiredDescription
documentIdstringyesDocument id
revisionintegernoThe revision the user reviewed (from read_documents get or read_documents ready) (send; required)
emailstringnoRecipient email address the user gave you (signed_copy; required)

cancel_or_reopen

Cancel or reopen a signing request. Permission: documents:send · Changes or overwrites data · Listed to every client

Ends or reverses a signing request, only when the user asks.

ActionWhat it does
cancelcancels an unsigned sent document: its link stops working; the signer is not emailed.
reopenturns a sent or cancelled document back into an editable draft. A sent request is cancelled first and the signer's progress discarded.
ArgumentTypeRequiredDescription
documentIdstringyesDocument id

read_documents_to_sign

Read documents you were asked to sign. Permission: documents:read · Reads only · Listed to every client

Reads documents others sent to this account's verified email for signature. You may read them and save answers (fill_document_to_sign) but never sign or submit; the user signs on the signing page.

ActionWhat it does
listdocuments still waiting for the user's signature.
getone document: sender, expiry and every field with label, type, page, position, locked flag and any saved answer. Labels can be wrong on some forms: preview the page and match answers to the printed form.
previewone page (page required) as a JPEG with its fields labelled by id. Use it to read what the form asks and show the user.
ArgumentTypeRequiredDescription
documentIdstringnoId from read_documents_to_sign list (get, preview; required)
pageintegerno1-based page number (preview; required)

fill_document_to_sign

Save answers on a document you were asked to sign. Permission: documents:write · Changes or overwrites data · Listed to every client

Saves answers on a document sent to the user for signature, for them to review and sign on the signing page; nothing is signed or submitted. Text a string, checkbox true/false, date YYYY-MM-DD; all or nothing, never locked or signature fields. Save only answers the user gave you; never guess.

ArgumentTypeRequiredDescription
documentIdstringyesId from read_documents_to_sign list
valuesarray of objectyes

import_file

Import an attached PDF. Permission: documents:write · Adds data · Listed to ChatGPT only

Creates a new draft from a PDF the user attached in this chat. Where attachments do not reach tools, use start_upload. The PDF is stored permanently; tell the user once.

ArgumentTypeRequiredDescription
fileobjectyesThe PDF the user attached
titlestringnoDocument title shown in the app (defaults to the file name)
folderIdstringnoPut the new document in this folder (from read_account folders)