Skip to main content
Glama

Update Doc Headers Footers

update_doc_headers_footers
Destructive

Create or update header/footer text in a Google Doc in a single call, automatically handling both creation and replacement.

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

TableJSON Schema
NameRequiredDescriptionDefault
user_google_emailYesUser's Google email address
document_idYesID of the document to update
section_typeYesType of section to create or update ("header" or "footer")
contentYesText content for the header/footer
header_footer_typeNoType of header/footer ("DEFAULT", "FIRST_PAGE_ONLY", "EVEN_PAGE")DEFAULT

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description reveals that the tool handles both creation and update atomically: auto-creates if missing, replaces if exists. Annotations (destructiveHint=true) indicate mutation, but the description adds context about safety and idempotent-like behavior, complementing annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured, starting with a clear statement of purpose, followed by a warning, then bullet points explaining behavior. Every sentence adds value and the length is appropriate for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the schema covers all parameters and an output schema exists, the description provides sufficient context for correct usage. It explains the core behavior and when to use the tool, without needing to describe return values or parameter details already in the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with each parameter described. The description does not add additional meaning beyond the schema, so the baseline of 3 is appropriate. No extra parameter guidance or examples are provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates or updates header/footer text in a Google Doc. It distinguishes itself from the sibling tool batch_update_doc by explaining that this is the default, simpler approach, and warns against using the low-level operation for simple text setting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance (default tool for header/footer content) and when-not-to-use (avoid batch_update_doc with create_header_footer) with reasoning about advanced workflows and potential failure. It also clarifies that no separate creation step is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chadvdwww-hash/worksuite-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server