An AI agent processes an aviation customs document reliably only when the workflow defines what to send, what to accept, and what to do when the tool cannot produce a usable result. A generic “read everything in the packet” prompt fails that test.
For Doana’s current public interface, the supported extraction task is EASA Form 1 via extract_easa_form1. Broader aviation packet processing requires additional tools and integration logic you already own. There is no public REST POST /extract.
Select the document before the tool
Identify the document type before choosing a tool. The Doana catalog exposes extract_easa_form1; it does not advertise a generic parser for every customs document, invoice, or FAA 8130-3.
Keep FAA-only certificates, invoices and air waybills outside that path. For FAA planning, see the API availability guide. Dual-release packets need a human to choose which file is the EASA Form 1. If the type is unknown, the agent should say so. Prefer a PDF that contains only the Form 1 pages — a whole-packet scan can hit TOO_MANY_PAGES (20 pages).
Send bytes, not a path
A local path is not a file transfer. Use the ChatGPT attachment contract where supported, lossless content_base64 up to 64 KiB in another client, or the upload-slot workflow for a larger file. A created upload slot is not a finished PUT.
The MCP walkthrough covers binary PUT and browser upload. If the agent cannot PUT, the operator opens browser_upload_url while signed in. ChatGPT: attach and pass download_url / file_id in the same turn. Claude cannot see local disk paths. Codex can read a local file into bytes, then send them. TIFF is UNSUPPORTED_FILE_TYPE. PDF 50 MB / 20 pages, JPEG/PNG 20 MB.
Bytes are the original PDF, JPEG or PNG contents. A path is a string on a machine the server cannot see. If the agent passes /tmp/form1.pdf or an arbitrary https link, the call should fail with a documented error, not a guessed parse. content_base64 must be lossless original content — do not downscale a scan to fit the 64 KiB inline path if that changes the pixels.
Keep state across tool calls
Save the job identifier in your application before anyone walks away. Poll get_extraction_result while status is dispatch_pending, queued, running, or outcome_unknown. Import only when status is succeeded, documentType is easa_form_1, and result is present. documentType: unknown is usually a succeeded job with no Form 1. On failed_refundable or failed_charged, show lastError. An assistant should never turn an in-flight result into a fabricated certificate table.
Timeouts should poll, not start a second extract. Re-sending the same file within 24 hours may replay. AOG desks still spend the five-file UTC week when the bytes differ, the prior job failed, or the fingerprint is older than 24 hours. MCP_QUOTA_EXHAUSTED waits until Monday 00:00 UTC unless paid credits exist. Failed or out-of-scope jobs refund the unit.
MCP’s transport specification defines how clients and servers exchange messages. It does not define your business approvals. OpenAPI describes MCP; it does not add a REST /extract mutation.
Review before inventory or customs mapping
Display the returned identifiers, remarks and uncertainty next to the source PDF. Only after review should your application map data into inventory, receiving or customs preparation records. Keep serial numbers as arrays instead of flattening them.
Confidence is not a release. Empty release13 with filled release14 is often a maintenance Form 1. Origin, valuation and procedure stay human evidence. If documentType is unknown, create an unresolved item. Do not reconstruct a Form 1 in prose.
Surface failure codes instead of hiding them
DOWNLOAD_URL_EXPIRED, FILE_TOO_LARGE, TOO_MANY_PAGES, UNSUPPORTED_FILE_TYPE, MCP_QUOTA_EXHAUSTED, INVALID_CONTENT_BASE64 and FILE_SOURCE_REQUIRED. Hiding them as a friendly paragraph is how operators retry the same bad file. documentType: unknown is usually a succeeded job with no Form 1 — create an unresolved item, do not treat it as a failure code.
Do not retry TOO_MANY_PAGES with the same PDF. Do not retry TIFF. Do not start a second extract while status is dispatch_pending, queued, running, or outcome_unknown. Show get_usage when quota is the blocker. The EASA Form 1 MCP walkthrough describes upload and retrieval.
ChatGPT, Claude and Codex fail in different places (signed URL, local path, PUT allowlist). The agent should name the client-specific path, not invent a fourth upload type.
Unsupported types
Classify, then stop or switch workflow. FAA-only files belong on the transcription guide, not Doana extraction. Invoices and AWBs stay on your own process. Mixed packets must be split. The agent should report “no supported tool” instead of stretching extract_easa_form1.
Client setup lives under integrations. Workflow policy lives under AI agents. Connect OAuth, list tools, and require extract_easa_form1 by name before the first file. If tools/list does not show that name, you are not on Doana’s public catalog. Do not compensate by asking the model to “be the parser.”
Explore AI agent workflows, then choose a client integration.
