set_message_handler
Create or replace a Perspective component message handler by specifying the view path, component, message type, and script.
Instructions
Create or replace a component message handler.
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": {
"view_path": "<view_path>",
"component": "<component>",
"message_type": "<message_type>",
"script": "<script>"
},
"name": "set_message_handler"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| confirm | No | ||
| dry_run | No | ||
| project | No | ||
| component | Yes | ||
| view_path | Yes | ||
| page_scope | No | ||
| view_scope | No | ||
| message_type | Yes | ||
| session_scope | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||