Skip to main content
Glama

Update Doc Headers Footers

update_doc_headers_footers
Destructive

Create or update header/footer text in Google Docs with a single action, whether the section already exists or needs to be created.

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
contentYesText content for the header/footer
document_idYesID of the document to update
section_typeYesType of section to create or update ("header" or "footer")
user_google_emailYesUser's Google email address
header_footer_typeNoType of header/footer ("DEFAULT", "FIRST_PAGE_ONLY", "EVEN_PAGE")DEFAULT

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations (destructiveHint=true, readOnlyHint=false), the description discloses rich behavioral detail: automatic creation when absent, content replacement when present, and the failure mode of the low-level alternative. The phrase 'its content is replaced' explicitly states what gets destroyed, and the reassurance that no separate creation step is needed adds prerequisite context the annotations cannot convey.

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 front-loaded with the core purpose and 'default tool' designation, followed by a targeted warning about the sibling alternative and a bulleted breakdown of behavior. Every sentence earns its place; the bullets and closing reassurance are compact and scannable rather than redundant.

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 a moderate 5-param tool with a full output schema, safety-relevant annotations, and a large sibling list, the description covers the decision-relevant aspects completely: when to use, when not to use, what happens on both existence paths, and that no prerequisite steps are required. The one ambiguity (which header/footer_type is affected) is already resolved by the schema's parameter descriptions.

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 description coverage is 100%, so the baseline is 3. The description marginally reinforces parameter meaning by referring to 'content' as 'desired content' and 'header/footer text,' but it does not add format, syntax, or domain details beyond what the schema already documents.

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 opening sentence states a specific verb+resource combination: 'creates or updates header/footer text in a Google Doc.' The description further differentiates from its nearest sibling by explicitly naming batch_update_doc as the wrong tool for this job, so an agent can disambiguate without inspecting schemas.

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 explicitly declares 'This is the default tool for header/footer content' and gives a clear exclusion: 'Do NOT use batch_update_doc with create_header_footer just to set header/footer text.' It also explains the condition that selects the alternative (advanced section-break workflows) and why it fails for the common case, leaving nothing to inference.

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

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/WorldCentralKitchen/google_workspace_mcp'

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