sb_code
Inject tracking pixels, analytics, chat widgets, and site-wide CSS into page head, body start, or body end. Create, merge, or remove custom code files scoped to a site or single page.
Instructions
The site's custom code files — tracking pixels, analytics, chat widgets, site-wide CSS — injected at head, body_start or body_end of every page (no page_id) or one page. Create infers language from the extension, placement from the language. scss/typescript compile on write (compile_error). json/text: placement "none" only; an enabled site-wide "none" file is served at its url. action:"list" | "set" (no id creates; with id merges the named fields over the stored row) | "remove". Not the custom-code element.
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": {
"action": "<action>"
},
"name": "sb_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| name | No | ||
| action | Yes | ||
| content | No | ||
| dry_run | No | ||
| enabled | No | ||
| page_id | No | list: that page's files plus site-wide; set: scope to it ("" = site-wide) | |
| site_id | No | ||
| language | No | ||
| position | No | ||
| placement | No |