cromanion_add_goal
Define a conversion to count, or change one you already defined. This is not one more setting: it is the numerator of every impact figure your human will read, so a goal that fires on every pageview makes the agent look brilliant and tells them nothing. Send type and value to create — idempotent, the same matcher twice creates one goal. Send goalId instead to rename, reprioritise or price an existing one, or with remove: true to stop counting it. Needs the goals permission.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "cromanion_add_goal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Matcher: css_click, form_submit, page_view, mailto, tel, outbound, scroll_depth, dwell, custom_event. | |
| label | No | What your human will call it. Defaults to something readable. | |
| value | No | What the matcher matches — a selector, a path, a percentage, seconds. | |
| goalId | No | Change an EXISTING goal instead of creating one. Ids come from cromanion_config. With `remove: true` it stops counting that conversion; otherwise it applies the label, priority or dollarValue you send. | |
| remove | No | With goalId: stop counting that conversion. Nothing already measured is rewritten. | |
| siteId | No | Which site this call is about. Only needed when your credential covers more than one — cromanion_grants lists them and says whether it is required. Omitting it with several is refused rather than guessed at. | |
| priority | No | With goalId: 1 is the primary goal, ascending. Rejected rather than clamped if out of range. | |
| dollarValue | No | Optional worth of one conversion, for revenue figures. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| note | No | Present when nothing changed, saying why. | |
| label | No | What your human sees it called, after the change. | |
| goalId | Yes | ||
| created | No | Present on a create. False when this site already counted that conversion — the call succeeded either way and nothing was duplicated. | |
| removed | No | Present when you sent remove: true. | |
| updated | No | Present on an edit: which fields changed. |