Review a document with a GC AI playbook
Run the user's documents through a GC AI review playbook and report the results. Do the whole chain in one turn, polling long-running jobs yourself.
Steps
-
Get the target files into GC AI.
- If the user attached documents to this conversation, call
upload_fileand let the host fill thefileargument. Never read or construct a file path yourself. - If a document only exists in your own sandbox, call
start_file_upload, PUT the bytes to the returnedupload_url, then callfinish_file_upload. - If the user is pointing at documents already in GC AI, find them with
get_files. - After any upload, poll
get_files({ id })untilstatusisready. Do not run a playbook against a file that is stillextractingorembedding.
- If the user attached documents to this conversation, call
-
Pick the playbook. Call
get_playbooks. Match the user's request to a playbook by name. If nothing clearly matches, ask which playbook to use rather than guessing. -
Run it. Call
run_playbookwith the file ids and the playbook id, then pollrun_playbook_statusuntilstatusissucceeded,failed, orcanceled. -
Summarize for the user. Group the check results into what passed, what failed, and what needs a human look. Quote the specific clause or finding behind each flagged item, not just the check name. Close with the concrete next step (for example, which clauses to negotiate or redline).
Notes
- One document, several playbooks, or several documents against one playbook are all valid. Confirm the scope with the user if it is ambiguous.
- Keep working until the result is ready. Never hand the turn back to the user to wait or poll.


