Skip to main content
Glama
taylorwilsdon

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Update Doc Headers Footers

update_doc_headers_footers
Destructive

Set or replace header/footer text in Google Docs. Automatically creates the header/footer when missing, so you can update content in one call.

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
Behavior4/5

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

Annotations already signal destructiveHint=true, and the description adds valuable behavioral context: it states the tool automatically creates the header/footer if missing and replaces content if present, and it highlights a failure mode of the alternative. However, it does not mention authentication requirements, potential errors, or side effects beyond the header/footer content, so it stops short of full transparency.

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

Conciseness4/5

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

The description is well-structured with a clear opening statement, a warning, and bullet points. It is slightly longer than strictly necessary, but every section serves a purpose—the warning about batch_update_doc and the bulleted behaviors are both important. It is appropriately front-loaded with the core purpose.

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

Completeness4/5

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

The description covers the main operational facets (create/update, no separate step needed, safety) and the alternative tool's limitations. However, it omits guidance on the optional header_footer_type parameter and does not discuss error scenarios or permissions, which leaves some gaps for a 5-parameter tool. The output schema existence reduces the need to explain returns, but a bit more context would make it complete.

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 does not add meaningful parameter semantics beyond the schema—it only mentions 'content' generically and does not explain the optional header_footer_type field or the required user_google_email parameter. Since the schema already documents all fields, the description adds no significant value here.

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 opens with a clear, specific verb+resource: 'Safely creates or updates header/footer text in a Google Doc.' It further distinguishes itself from sibling tools by explicitly warning against using batch_update_doc with create_header_footer for this purpose, establishing this tool as the default for header/footer content.

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 states when to use this tool ('This is the default tool for header/footer content') and when not to ('Do NOT use batch_update_doc with create_header_footer just to set header/footer text'), including a rationale ('that low-level operation is only for advanced section-break workflows and can fail when the default header/footer already exists'). It also clarifies the automatic create-or-update behavior, leaving no ambiguity.

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

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