{"version":"2.1.236","anchor":"write-db-can-send-a-document-from-a-local-json-file","canonical_anchor":"write-db-can-send-a-document-from-a-local-json-file","heading":"write_db can send a document from a local JSON file","tier":"use","area":"Artifacts","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.236\/e\/write-db-can-send-a-document-from-a-local-json-file","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.236","markdown":"### `write_db` can send a document from a local JSON file\n\nArtifact database writes can take a local JSON file, so big documents skip the conversation.\n\n**What**\n\nArtifact database writes accept `file_path` pointing at a local JSON file whose top-level object becomes the document, so a large document no longer has to pass through the conversation. Exactly one of inline `data` or `file_path` is required; giving both or neither is a validation error.\n\n**Details**\n\n- The file is read under the normal Read permission rules, parsed as JSON, and must be a top-level object; failures are reported as read denied, file not found, invalid JSON, not an object, or too large.\n- Swapping between inline data and a file after approval is refused and forces a fresh permission check.\n- The write approval no longer blanket-covers files that need their own Read approval.\n\n**Evidence**\n\n`file_path does not hold valid JSON \\u2014 write_db sends the file's JSON object as the document`, `saved as local JSON files (the destination follows the file-edit rules)`, `a local JSON file whose top-level object is sent as the document`\n\n- Area: Artifacts\n- Names: `file_path`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}