Skip to main content
Glama

Create a performance rule

create_rule

Watch one checkout's number every day and act when it crosses a line, e.g. "if the order bump is taken by fewer than 10% of buyers over 14 days, with at least 50 orders, switch it off". metric: conversion, bump_rate, upsell_rate or refund_rate. action: offer_active (config {target: bump|upsell, offerId, active}), set_price ({target: checkout|bump|upsell, offerId?, price}), set_copy ({target, offerId?, field: name|ctaLabel for the checkout or headline for an offer, text}) or ask_ai ({}), which flags it for you in list_findings. A fixed action never changes a live checkout directly: it files a request on the seller's Approvals page, then the rule pauses. Get offer ids from get_product. Confirm the rule with the seller before creating it.

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": {
      "product": "<product>",
      "name": "<name>",
      "metric": "<metric>",
      "comparison": "<comparison>",
      "threshold": "<threshold>",
      "action": "<action>"
    },
    "name": "create_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesA short name the seller will recognise.
actionYes
configNoDepends on action; see the description.
metricYes
accountNoOnly to work in a client's account: its id from list_accounts. Leave it out for your own account.
productYesThe checkout's id or slug.
minSampleNoFire only after this many views (conversion) or orders (the rest). At least 10; default 50.
thresholdYesA percentage, e.g. 10 for 10%.
comparisonYes
windowDaysNoMeasured over this many days. Default 14.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (which only mark it non-read-only and non-destructive), the description discloses the critical side effect: a fixed action never mutates a live checkout directly, it files a request on the seller's Approvals page and the rule then pauses. It also explains that evaluation is daily and gated by minSample, which is exactly the behavior an agent cannot infer from structured fields.

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

Conciseness4/5

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

It is front-loaded with the core behavior, then layers metrics, actions, and the approval caveat in a logical order with no filler. The dense inline config notation is efficient but slightly hard to parse on a first read.

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

Completeness4/5

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

For a 10-parameter, 6-required tool with a nested object and no output schema, the description covers the hard parts: config shapes, id sourcing, and the approval side effect. It does not mention what is returned on success or how the created rule is later viewed or removed, which is a small residual gap.

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

Parameters5/5

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

The nested config object is documented only as 'depends on action; see the description' in the schema, and the description fully compensates by spelling out the shape per action (offer_active target/offerId/active, set_price target/offerId/price, set_copy field name/ctaLabel/headline, ask_ai empty). It also clarifies metric meanings and that threshold is a percentage.

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?

The description opens with a concrete verb+resource: watch one checkout's metric daily and act when it crosses a threshold, followed by a worked example. It is clearly a threshold-rule creator and cannot be confused with siblings like add_email_rule or create_coupon, since it names its own metric and action vocabulary.

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

Usage Guidelines4/5

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

It gives real workflow guidance: get offer ids from get_product, confirm the rule with the seller before creating it, and use list_findings to see ask_ai flags. It does not explicitly say when to prefer a different rule-creation tool, but the required-metric framing makes the applicability clear.

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.