Skip to main content
Glama

Create a price rule

create_price_rule

Add a pricing rule — a percent off, a percent markup, a fixed price or an amount off — for everybody, a price level or one customer, on every item, a type, a trade or one item, optionally from a minimum quantity and between dates. It changes what every FUTURE order, estimate and invoice line is quoted at; nothing already issued moves. Use quote_prices to show the user the effect first. Usually queued for the account holder to approve (read staged).

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": {
      "name": "<name>",
      "rule_type": "<rule_type>",
      "value": "<value>"
    },
    "name": "create_price_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
noteNo
valueYesA percentage for percent_off and percent_markup; dollars for fixed_price and amount_off.
ends_onNoISO date it stops applying.
item_idNoRequired when item_scope is item.
priorityNoThe lowest number wins. Default 100.
entity_idNoAnother entity in the same books (ids from `list_entities`). Leave out to use the entity the person is working in.
is_activeNoDefault true.
item_typeNoRequired when item_scope is type.
rule_typeYes
stackableNoApplies on top of the winning rule instead of competing with it.
starts_onNoISO date it starts applying.
item_scopeNoDefault all.
trade_typeNoRequired when item_scope is trade.
customer_idNoRequired when customer_scope is customer.
min_quantityNoApplies from this quantity. Default 0.
customer_scopeNoDefault all.
price_level_idNoRequired when customer_scope is level.

Output Schema

NameRequiredDescriptionDefault
idNoThe created or updated record's id, when the write was applied rather than staged.
noteNoWhy the result was truncated, when it was.
stagedNoTRUE means nothing has changed yet — the write is queued in the account holder's Approvals queue in Seayora. Say it is waiting for approval; never report it as done.
draft_idNoThe staged proposal's id, when it was queued rather than performed.
truncatedNoPresent and true when the result was too large to return in full. Treat it as a partial answer.
total_availableNoHow many rows existed before truncation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the effect is limited to FUTURE orders, estimates and invoices, and 'nothing already issued moves' — a crucial non-retroactivity guarantee that no annotation conveys. It further discloses the approval workflow ('Usually queued for the account holder to approve (read `staged`)'), which matters for a non-idempotent create. Nothing here contradicts readOnlyHint=false / destructiveHint=false.

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?

Four sentences, front-loaded with the object being created, then side effects, then the safer alternative, then the approval caveat. The dense first sentence is long but every clause maps to a real schema axis rather than padding. No filler or restatement of the title.

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 an 18-parameter mutation with an output schema, the description covers the two things the schema cannot: blast radius (future pricing only) and the approval round-trip. Field-level detail is safely delegated to the schema. The only gap is that rule conflict resolution (priority/stackable) is left entirely to parameter descriptions.

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 already 83%, so the schema carries most parameter documentation; the description adds the semantic frame that ties rule_type variants to their scopes and notes the optional quantity floor and date window. It does not explain the interplay of `priority` and `stackable` (compete vs. stack), which is the one genuinely non-obvious pair. Still above the high-coverage baseline of 3.

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 ('Add') and resource ('pricing rule'), then enumerates the four rule variants and the three scoping axes (customer_scope, item_scope, quantity/date windows) that define the tool. An agent reading only the description knows exactly what class of object this creates, and it is explicitly distinguished from `quote_prices`, the read-only preview.

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?

Gives a concrete use-the-alternative instruction: 'Use `quote_prices` to show the user the effect first.' It also tells the agent the write is normally deferred for approval, which shapes when it is appropriate to call. It lacks an explicit 'do not use when…' for the many sibling create_* tools, but those target unrelated resources, so the guidance is practically complete.

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