Skip to main content
Glama

Update Doc Headers Footers

update_doc_headers_footers
Destructive

Creates or updates header/footer text in a Google Doc. Handles both creation and update in a single call, automatically creating the section if it does not exist.

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

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

The description adds significant behavioral context beyond annotations: it auto-creates if missing, replaces if exists, no separate creation needed. This complements the destructiveHint and idempotentHint annotations. Could mention potential errors or limitations for a perfect score.

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 with a clear opening, bullet points, and imperative guidance. Every sentence adds value, and the length is appropriate for the complexity. Front-loads purpose and key usage rules.

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 the annotations, full schema coverage (100%), and existence of output schema, the description is complete. It covers purpose, usage guidelines, behavioral details, and preconditions. No gaps identified.

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 all 5 parameters described in the schema. The description does not add new semantic information about parameters; it only references 'desired content' generically. Baseline score of 3 is appropriate as schema does the heavy lifting.

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', specifying the exact resource and action. It distinguishes itself from the sibling batch_update_doc by noting it is the default tool and that the other tool is for advanced workflows.

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 advises against using batch_update_doc for simple header/footer text updates, explaining why (advanced, can fail). It also states when to use this tool ('default') and that it handles both creation and update in one call.

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/theolefort-cyber/mcpworkspace'

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