For the full documentation index, see PageWeave Documentation or fetch llms.txt.

get_component, update_component, get_html_head, update_html_head

Manage header, footer, and html_head.

Concepts

Instance Model

Components are instance-based: a website can have multiple header/footer/html_head instances. One instance per component type is the default (used on all pages). get_component and update_component operate on the default instance. If no default exists, update_component auto-creates one.

Each instance supports versioning (same model as pages). component_id is returned in tool responses for correlation with the REST API.

Header / Footer

get_component

Get the default header or footer content.

Parameters:

  • website — Website subdomain, domain, or UUID
  • componentheader or footer

Response:

  • component_id — Instance UUID (for REST API correlation)
  • html_content — Latest version HTML (or nil if no content)
  • version — Latest version number (or nil)

update_component

Update the default header or footer content.

Two editing modes, mutually exclusive:

  • html — overwrite the entire component content
  • replacements — find-and-replace operations on the existing content

Parameters:

  • website — Website subdomain, domain, or UUID
  • componentheader or footer
  • html — Full HTML to overwrite the component content (mutually exclusive with replacements)
  • replacements — Array of {old_html, new_html, mode} objects
    • old_html — HTML snippet to find (required for replace/replace_all)
    • new_html — Replacement HTML
    • modereplace, replace_all, append

Auto-creates a default instance if none exists. Returns component_id and version.

html_head

get_html_head

Get the default html_head content.

Parameters:

  • website — Website subdomain, domain, or UUID

Response:

  • component_id — Instance UUID (for REST API correlation)
  • html_content — Latest version HTML (or nil if no content)
  • version — Latest version number (or nil)

update_html_head

Update the default html_head content.

Two editing modes, mutually exclusive:

  • html — overwrite the entire html_head content
  • replacements — find-and-replace operations on the existing content

Parameters:

  • website — Website subdomain, domain, or UUID
  • html — Full HTML to overwrite the html_head content (mutually exclusive with replacements)
  • replacements — Array of {old_html, new_html, mode} objects

Auto-creates a default instance if none exists.

Use html_head for: meta tags, tracking scripts, analytics, favicons.

Do NOT add: <meta viewport>, <meta charset>, <html>, <head>, <body>, or importmap — these are generated automatically.

Version Management

Use the unified version tools with target: "header", target: "footer", or target: "html_head":

  • pin_version — Pin a specific version
  • revert_version — Revert to a previous version

OAuth Scopes

Tool Scope
get_component component:read
get_html_head html_head:read
update_component component:write
update_html_head html_head:write
pin_version version:pin
revert_version version:revert