# documentManagement.writeDocuments

## Description
Create or update documents
Insert, update, or upsert documents in a collection. Supports both single documents and arrays. Documents can include _id field with various formats (string, ObjectId, composite object).

## When to use
<!-- Describe user intent that should trigger this tool -->

## What this returns
<!-- Describe the shape / purpose of the response -->

## Notes
<!-- Constraints, ordering, related tools, etc. -->
