Skip to main content
Glama

Change a feature rule

update_feature_rule
DestructiveIdempotent

Replace a feature rule's name and conditions. This re-labels the feature's events back to the start of retention, so preview the new conditions with preview_feature_rule first. undo_setup_run puts the old definition back. Pass run_id from start_setup_run so this undoes together with the rest of the setup; leave it out (never "") to start a new chat run, whose run_id is returned and should go on every later change.

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": {
      "rule_id": "<rule_id>",
      "feature_name": "<feature_name>",
      "conditions": "<conditions>"
    },
    "name": "update_feature_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idNoThe setup run this change belongs to, from start_setup_run. Omit to start a new chat run (its id is returned).
projectNoProject ID, from list_projects. Required when this connection covers more than one project; may be left out when it covers one (and with an API key, which belongs to one project).
rule_idYesFeature rule ID, from list_feature_rules.
conditionsYesThe full new list of conditions, which replaces the current one. Same format as create_feature_rule, any groups included.
feature_nameYesThe feature name, which replaces the current one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / conditions / items / properties / operator / description
      Previous value: -"A plain condition's operator: equals, contains, starts_with or matches (a whole-value pattern where * stands for any text, e.g. /products/*; a pattern of only * is refused). Matching is case-sensitive (/Pricing does not match /pricing) except on query.utm_source, query.utm_medium and query.ref, which ignore case."New value: +"A plain condition's operator: equals, contains, starts_with or matches (a whole-value pattern where * stands for any text, e.g. /products/*; a pattern of only * is refused). Matching is case-sensitive (/Pricing does not match /pricing) except on query.utm_source, query.utm_medium and query.ref, which ignore case. scroll_depth and time_on_page_seconds take equals, greater_than, less_than (both strict, > and <: scroll_depth greater_than 74 is 75 or more) or exists (has a value), with a whole number in range as the value, digits only; no text operator. attrs.KEY also takes greater_than and less_than (strict), comparing the detail as a number: attrs.total greater_than 100, with a plain decimal number as the value (100, 34.5, -3; no exponent or separators); an event without the detail or whose detail is not a number matches neither. greater_than, less_than and exists work on nothing else."
    • changedInput schema / properties / conditions / items / properties / property / description
      Previous value: -"A plain condition's property: event_type, page_origin, page_path, element_tag, element_selector, element_selector_generalized, element_text, referrer (the referring URL; sent with page views only) or query.PARAM (one URL parameter, e.g. query.utm_source; on every event of that page, clicks included; missing means no match). For 'came from X' add event_type equals pageview. Leave out in an any group."New value: +"A plain condition's property: event_type, page_origin, page_path, element_tag, element_selector, element_selector_generalized, element_text, referrer (the referring URL; sent with page views only), query.PARAM (one URL parameter, e.g. query.utm_source; on every event of that page, clicks included; missing means no match), attrs.KEY (one detail of the event: a data-track-KEY attribute or a key of track()'s details, e.g. attrs.total; missing means no match), or a page view's numbers: scroll_depth (how far down the page the visitor got, whole percent 0-100: 0 never scrolled, 100 the bottom) and time_on_page_seconds (active seconds on the page, 0-1800), which only page views carry and which arrive when the visitor leaves or hides the page (until then, or from an older tracker, none, which no comparison matches). For 'came from X' add event_type equals pageview. Leave out in an any group."
    • changedInput schema / properties / conditions / items / properties / value / description
      Previous value: -"A plain condition's value, non-empty."New value: +"A plain condition's value, non-empty, except for exists, which takes none. For scroll_depth and time_on_page_seconds a whole number such as 74; for greater_than or less_than on attrs.KEY a plain decimal number such as 100 or 34.5."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the actual consequence an agent needs: the change re-labels the feature's events back to the start of retention, which is a data-visible side effect on analytics. It also names the recovery path (undo_setup_run) and explains that a new run_id is returned and must be carried forward.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the mutation and its side effect, then the safety route (preview), then the rollback, then the run_id mechanics. Four short sentences, no restatement of the name or title, and no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers everything an agent needs for a destructive, non-reversible-looking update: the data effect, the preview requirement, the undo path, and run_id lifecycle. With no output schema, the mention that run_id is returned fills the one return-value gap that matters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the nested conditions/operator/property semantics are already fully documented and the baseline is 3. The description still adds meaning beyond the schema for run_id — that omission starts a new chat run, that the id is returned, that it must accompany every later change, and that an empty string is invalid — which justifies a step above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Replace a feature rule's name and conditions') and immediately scopes it against siblings: preview_feature_rule for dry runs, undo_setup_run for rollback, start_setup_run for run chaining. An agent can distinguish this from create_feature_rule, delete_feature_rule and preview_feature_rule without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use routing: preview the new conditions with preview_feature_rule first, use undo_setup_run to revert, and pass run_id from start_setup_run to bundle the change with the rest of a setup. It also gives the counter-case (omit run_id to start a new chat run) and a hard exclusion (never an empty string).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources