update_doc_headers_footers
Create or update header and footer text in Google Docs automatically, handling both new and existing sections in one operation without separate setup steps.
Instructions
Safely creates or updates header/footer text in a Google Doc.
This is the default tool for header/footer content. Do NOT use batch_update_doc with create_header_footer just to set header/footer text; that low-level operation is only for advanced section-break workflows and can fail when the default header/footer already exists.
This tool handles both creation and update in one call:
If the header/footer does not exist, it is automatically created first.
If the header/footer already exists, its content is replaced.
You do NOT need to create a header/footer separately before calling this tool. Simply call it with the desired content and it will work whether the header/footer exists or not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_google_email | Yes | User's Google email address | |
| document_id | Yes | ID of the document to update | |
| section_type | Yes | Type of section to create or update ("header" or "footer") | |
| content | Yes | Text content for the header/footer | |
| header_footer_type | No | Type of header/footer ("DEFAULT", "FIRST_PAGE_ONLY", "EVEN_PAGE") | DEFAULT |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |