Skip to main content
Glama

update_doc_headers_footers

Create or update header and footer text in Google Docs automatically, handling both new and existing sections in one operation without separate setup steps.

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 provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it handles both creation and update automatically, replaces existing content, and works regardless of header/footer existence. It also warns about potential failure modes of the alternative ('can fail when the default header/footer already exists'). However, it doesn't mention authentication needs, rate limits, or error handling specifics.

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 and front-loaded with the core purpose. Each sentence adds valuable information: tool role, usage guidance, behavioral logic, and prerequisites. There is no wasted text, and it efficiently communicates complex information in a compact form.

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 tool's moderate complexity (mutation operation with conditional logic), no annotations, but with 100% schema coverage and an output schema (implied by context signals), the description is complete. It covers purpose, usage, behavior, and prerequisites adequately, and the output schema handles return values, so no gaps remain.

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 schema already documents all 5 parameters. The description adds some context about the tool's logic (creation vs. update based on existence) but doesn't provide additional parameter-specific semantics beyond what's in the schema. The baseline of 3 is appropriate when the 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 specific action ('creates or updates header/footer text'), the resource ('in a Google Doc'), and distinguishes it from sibling tools by explicitly naming 'batch_update_doc' as an alternative for advanced workflows. It precisely defines the tool's scope and differentiation.

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 guidance on when to use this tool ('default tool for header/footer content'), when not to use it ('Do NOT use batch_update_doc with create_header_footer just to set header/footer text'), and names the alternative ('batch_update_doc'). It also clarifies prerequisites ('You do NOT need to create a header/footer separately').

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