Valuein
Discovery

Create Rule

create_rule
Benchmark and above

Persist a trigger -> action rule and register it with the evaluator. Seven trigger types x six action types, with an optional single-comparison condition_expr evaluated against the trigger payload. Read the returned rule's trigger_wiring_status to see whether its trigger has a...

Example Call

example_call.pypython
# Using the Valuein MCP server from Python (via MCP SDK)# Or call directly from Claude / Cursor after setup result = await client.call_tool(    "create_rule",    arguments={    "name": "EXAMPLE",    "trigger": {},    "action": {}})print(result)

Direct tool call:create_rule(...)

Inputs

ParameterTypeRequiredDescription
namestring
required
Human-readable label.
triggerobject
required
Discriminated union — which signal fires this rule.
condition_exprstringoptionalOptional single comparison against the trigger payload, e.g. "price_change_pct gt 5". Omit to fire on the trigger alone.
actionobject
required
Discriminated union — what happens when the rule fires.
replaces_rule_idstringoptionalOptional. The id of a signal this call REPLACES — set it when saving an edit, which is stored as create-then-delete because neither engine has an update tool. A verified live record you own is discounted from the tier cap so an edit is cap-neutral; an unknown, deleted, or foreign id is ignored and the cap applies normally.

Output Fields

rulewarning

Example Response

Illustrative
response.jsonjson
{  "rule": null,  "warning": null}

Shape only — field names match the live schema; values are placeholders, not real filings. See MCP server for the structured response shape.

Notes

Available from the Benchmark plan and above.

Try this tool

Get tokenAll tools
CategoryDiscovery
PIT-safeNo
Min planBenchmark
Inputs5 (3 required)

Plan Access

Sample (guest)
Not included
Benchmark (token)
Available
Pro
Available
Institutional
Available

Index names are trademarks of their owners; Valuein is not affiliated with or endorsed by any index provider.