create_document
Create a NEW ProductNow document and generate its content with AI. Use this to persist knowledge the user wants remembered or shared across sessions and teammates — decisions, specs, RFCs, plans, meeting outcomes. Search with search first so you don't duplicate an existing document; to change an existing document use edit_document instead. File the document in an existing folder. Search results include each document's folderId; pass the folderId of the closest related document. If search does not show a fit, fetch_folder the root and walk folders until you have a folderId. Leave folderId off only when the user explicitly asked for the warehouse root. If no folder fits, call create_folder under the closest existing folder and pass that new folderId. Content is generated from prompt (the full outline: numbered sections, their titles, and what each should say) and context (verbatim source material the user supplied or explicitly authorized for this ProductNow document). Generation paraphrases: if exact wording must survive, put it in context and say so in prompt. Pass templateId only when you already have one. Returns the documentId and URL; generation continues after the call returns.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Document title (e.g., 'RFC: API Key Generation') | |
| prompt | Yes | Generation instruction for the document, including a full document outline (with numbered sections, each with a title and content) | |
| context | No | Supporting material supplied by the user or explicitly authorized for this document. ProductNow attaches it as a .txt file for generation. | |
| folderId | No | Folder to file the document in. Find it with search and fetch_folder before this call. Omit only when the user explicitly asked to create the document at the warehouse root. | |
| templateId | No | Template ID — pass when applying a specific template |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| documentId | Yes |