create_header
Adds a page header to a Google Doc and optionally inserts plain text, returning a header ID for adding formatted content later.
Instructions
Add a page header to a Google Doc.
Creates a header section and optionally inserts plain text content into it. For rich formatting, use insert_doc_text with the returned headerId as segmentId after calling this tool.
Args: doc_id: The Google Doc file ID. header_type: "DEFAULT" (all pages, default) or "FIRST_PAGE_HEADER" (applies only to the first page — requires useFirstPageHeaderFooter to be set on the document section, which the Docs UI handles automatically). content: Optional plain text content to insert into the header.
Returns: Confirmation with docId and headerId. Use headerId as the segmentId in subsequent insert_doc_text calls to add formatted content.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doc_id": "<doc_id>"
},
"name": "create_header"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| content | No | ||
| header_type | No | DEFAULT |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||