Tool tree
Ship a UI-first copilot (no backend rewrite). Turn the signed‑in user session into the universal API—and capture decision traces—via WebMCP.
Implementation
gradeNot graded
gradeNot graded
demo_register_toolAction
Register a new WebMCP tool dynamically. The tool will be available immediately for use.
View tool JSON
{
"name": "demo_register_tool",
"kind": "act",
"impl": "imperative",
"description": "Register a new WebMCP tool dynamically. The tool will be available immediately for use.",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Tool name (snake_case recommended)"
},
"toolDescription": {
"type": "string",
"description": "What the tool does"
},
"handlerCode": {
"type": "string",
"description": "JavaScript function body. Receives 'args' parameter."
}
},
"required": [
"name",
"toolDescription",
"handlerCode"
]
},
"page": "/"
}demo_update_stylesAction
Update the Char widget's visual appearance via CSS variables. Available variables: --char-color-primary (hex), --char-color-background (hex), --char-color-foreground (hex), --char-color-muted (hex), --char-color-border (rgba or hex), --char-radius (px value like "8px" or "0")
View tool JSON
{
"name": "demo_update_styles",
"kind": "act",
"impl": "imperative",
"description": "Update the Char widget's visual appearance via CSS variables.\nAvailable variables: --char-color-primary (hex), --char-color-background (hex), --char-color-foreground (hex), --char-color-muted (hex), --char-color-border (rgba or hex), --char-radius (px value like \"8px\" or \"0\")",
"inputSchema": {
"type": "object",
"properties": {
"variables": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "CSS variable key-value pairs. Example: {\"--char-color-primary\": \"#ff6b35\", \"--char-radius\": \"12px\"}"
}
},
"required": [
"variables"
]
},
"page": "/"
}