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 UUIDcomponent—headerorfooter
Response:
component_id— Instance UUID (for REST API correlation)html_content— Latest version HTML (ornilif no content)version— Latest version number (ornil)
update_component
Update the default header or footer content.
Two editing modes, mutually exclusive:
html— overwrite the entire component contentreplacements— find-and-replace operations on the existing content
Parameters:
website— Website subdomain, domain, or UUIDcomponent—headerorfooterhtml— Full HTML to overwrite the component content (mutually exclusive withreplacements)replacements— Array of{old_html, new_html, mode}objectsold_html— HTML snippet to find (required forreplace/replace_all)new_html— Replacement HTMLmode—replace,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 (ornilif no content)version— Latest version number (ornil)
update_html_head
Update the default html_head content.
Two editing modes, mutually exclusive:
html— overwrite the entire html_head contentreplacements— find-and-replace operations on the existing content
Parameters:
website— Website subdomain, domain, or UUIDhtml— Full HTML to overwrite the html_head content (mutually exclusive withreplacements)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 versionrevert_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 |