Skip to main content
Glama

create_header

Destructive

Adds a page header to a Google Doc and optionally inserts plain text, returning a header ID for adding formatted content later.

Instructions

Add a page header to a Google Doc.

Creates a header section and optionally inserts plain text content into it. For rich formatting, use insert_doc_text with the returned headerId as segmentId after calling this tool.

Args: doc_id: The Google Doc file ID. header_type: "DEFAULT" (all pages, default) or "FIRST_PAGE_HEADER" (applies only to the first page — requires useFirstPageHeaderFooter to be set on the document section, which the Docs UI handles automatically). content: Optional plain text content to insert into the header.

Returns: Confirmation with docId and headerId. Use headerId as the segmentId in subsequent insert_doc_text calls to add formatted content.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "doc_id": "<doc_id>"
    },
    "name": "create_header"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYes
contentNo
header_typeNoDEFAULT

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.6

TDQS

A4.1/5.0
Behavior3/5

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

The annotations declare destructiveHint=true, and the description never explains why: it does not say whether an existing header is replaced, whether prior header content is lost, or whether the operation is reversible. It does add useful behavior beyond the annotations — plain-text-only content, the first-page prerequisite, and the headerId handoff — but the most consequential trait signalled by the annotations is left undisclosed.

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 opening sentence front-loads the purpose, and the follow-up sentence covers the rich-formatting handoff; the Args/Returns blocks are conventional and scannable. Some redundancy exists (the headerId handoff is stated twice), but nothing is padded or off-topic.

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?

For a low-complexity, three-parameter tool with an output schema, the definition covers all parameters, the multi-tool workflow, and the first-page prerequisite. The only material omission is the destructive dimension the annotations flag — what happens to a pre-existing header.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it does: doc_id is identified as the file ID, header_type documents both allowed values with a default and a document-level prerequisite, and content is marked optional plain text. The enum values are conveyed only in prose, but the semantics are complete and actionable.

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?

States a specific verb and resource ("Add a page header to a Google Doc") and immediately clarifies that it creates the header section and optionally inserts plain text, which cleanly separates it from insert_doc_text (which handles rich formatting) and from create_footer. An agent can identify the operation and its boundary without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes the agent: use this tool for the header container plus plain text, then call insert_doc_text with the returned headerId for rich formatting. It also explains when FIRST_PAGE_HEADER is appropriate and its prerequisite (useFirstPageHeaderFooter on the document section). It does not explicitly discuss cases where a header should not be created, but the alternative guidance is clear.

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

Deploy Server

Other Tools