Skip to main content
Glama

Create Rule

create_rule_template

Create a rule configuration on this connection: a deduplication scheme (which fields identify a duplicate, which record survives, which value wins per field), a normalize scheme, a segment definition, or an enrichment field mapping. tool_type, object_type and kind are FIXED AT CREATE and cannot be changed afterwards -- authoring a different kind means authoring a new template. config is validated against that kind's own validator, so a rule the engine could not execute is refused here rather than at dispatch. READ THE SHAPE FIRST: call get_default_rule_config for the shipped default of this tool/object/kind, or get_rule_template on an existing one. A SEGMENT has no shipped default, so its shape is here: {"name": <the Segment's name>, "membership_mode": "first_match", "default_value": null, "segments": [{"name": , "order": , "predicate": {"kind": "group", "combinator": "AND", "nodes": [{"kind": "condition", "field": , "operator": "gte", "value": 50}]}}]}; object_type is "any". The name must be unique for the tool, object and kind. This creates configuration, not work: no run is created and nothing is written to the CRM. A connection's verification rules are not created here: every connection is seeded one set, and it is changed with update_rule_template.

Input Schema

NameRequiredDescriptionDefault
kindNoWhich slice of the tool's configuration this is. Deduplication needs one of each: matching, master_record, survivorship. A segment is always 'segments' and may omit it. Omit for normalize and enrichment, which have no kinds.
nameYesA name for the rule, unique within this tool, object and kind.
configYesThe rule itself. Its shape depends on tool_type and kind -- call get_default_rule_config or get_rule_template to see it before writing one.
tool_typeYesWhich tool this rule configures.
object_typeYesWhich CRM object the rule applies to: contact, account or lead.
connection_idYesThe CRM connection. Call list_crm_connections first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the write/read profile (readOnlyHint=false, destructiveHint=false), so the description carries the meaningful load and does so well: kind/tool_type/object_type are immutable after creation, config is validated against the kind's own validator and refused if the engine could not execute it, names must be unique per tool/object/kind, and crucially it clarifies this creates configuration only — no run, nothing written to the CRM.

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?

Front-loads purpose, then immutability constraints, then the shape-first workflow, then the inline segment example — a sensible priority order. It is dense and lengthy, with mild redundancy against the schema (both point to get_default_rule_config), but nearly every sentence earns its place.

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?

For a 6-parameter, nested-config, no-output-schema mutation tool, the description covers everything needed to call it correctly: immutability of the discriminator fields, validation-on-create behavior, the one shape with no shipped default, uniqueness requirements, and the side-effect scope. Nothing material is missing.

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 each parameter already has a description; the baseline would be 3. The description goes beyond that by spelling out the full JSON shape of a segment config (membership_mode, segments, predicate, nodes) and by clarifying object_type must be "any" for segments, which is genuine added meaning for a nested-object parameter the schema punts on.

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 (Create) plus resource (rule configuration on this connection) and enumerates the four concrete artifacts it can author: deduplication scheme, normalize scheme, segment definition, enrichment field mapping. An agent can immediately tell this apart from run-creating siblings like create_deduplication_run or create_segmentation_run.

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?

Explicitly instructs the agent to read the shape first via get_default_rule_config or get_rule_template, and gives a clear when-not with the alternative named: verification rules are seeded per connection and changed with update_rule_template, not created here. Nothing is left to inference.

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