Skip to main content
Glama

update_doc_headers_footers

Create or update header or footer text in a Google Doc in a single call, whether it exists or not. Automatically creates if missing, replaces if present.

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?

With no annotations, the description carries full burden. It discloses that the tool handles both creation and update in one call, automatically creates if missing, and replaces existing content. It also advises that no prior creation is needed. While it doesn't cover permissions or error handling (e.g., invalid header/footer type), the key behavioral traits are well communicated.

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?

Description is two paragraphs with clear front-loading: first sentence immediately states the purpose. Each sentence adds value, no fluff. Structured with bullet-like emphasis using 'If...' clauses. Efficiently conveys all essential information.

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?

Given 5 parameters (4 required) and presence of an output schema, the description covers the tool's core purpose and usage guidelines. It lacks details on error conditions (e.g., non-existent document) or parameter constraints (e.g., valid header_footer_type values), but for a straightforward tool, it provides sufficient context for an agent to invoke it correctly.

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?

Input schema has 100% coverage with descriptions. Baseline is 3. The description adds limited extra meaning beyond the schema: it explains that section_type is 'header' or 'footer' and that content is text, but these are already clear from schema. The description's main value is explaining how parameters relate to tool behavior (e.g., no need to create separately), which is more behavioral than parametric.

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?

Description clearly states the tool's function: 'Safely creates or updates header/footer text in a Google Doc.' It specifies the verb (creates or updates), resource (header/footer text in a Google Doc), and distinguishes from sibling tool batch_update_doc by noting this is the 'default tool' 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?

Description explicitly tells the agent when to use this tool ('default tool for header/footer content') and when not to use alternatives ('Do NOT use batch_update_doc with create_header_footer just to set header/footer text'), naming the alternative and explaining why the low-level approach is inferior ('only for advanced section-break workflows and can fail').

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/HuntsDesk/ve-gws'

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