Skip to main content
Glama

Create Badge Rule

create_badge_rule

Create a badge rule for the current customer. Describe the rule and confirm with the user before calling. Each condition is an object: {condition, category, threshold, seconds}. condition is one of SCORE_LT, SCORE_LTE, SCORE_GT, SCORE_GTE (with category HUMANITY, AUTHENTICITY, UNIQUENESS, BEHAVIOR, or ANY to match any category, and threshold 0-100) or IDENTITY_AGE_GT (with seconds since the identity was first seen). Badge rules cannot reference other badges (no BADGE_EXISTS) and have no IDENTITY_AGE_LT; use an escalation rule for those. All conditions must hold for the badge to apply. The badge's slug is derived from its name and is what escalation rules reference in BADGE_EXISTS conditions. Returns the created rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesBadge name shown on identities, up to 50 characters; the slug is derived from it.
typeYesGOOD, BAD, or NEUTRAL.
priorityNoPriority for ordering badges on an identity (higher first; default 0).
conditionsYesThe conditions that must all hold for the badge to apply.
applyDelaySecondsNoSeconds the conditions must hold before the badge applies (default 0).
removeDelaySecondsNoSeconds the conditions must stop holding before the badge is removed (default 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With no informative annotations, the description carries the full burden and discloses key behaviors: rule creation is scoped to the current customer, conditions are ANDed, the slug is derived from the name and is what escalation rules reference, and the call returns the created rule. It does not discuss duplicate-name behavior or failure modes, but it is substantially transparent for a create tool.

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?

The description is information-dense and every sentence serves a purpose: precondition, condition grammar, exclusions, conjunction semantics, slug behavior, and return value. It is front-loaded with the most important usage warning before the parameter details.

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 6-parameter create tool with no output schema, the description provides enough to construct valid conditions and understand what the badge can reference. It falls just short of complete because it does not reconcile the schema-required 'badge' field in condition objects or clarify the role of 'seconds' in non-IDENTITY_AGE_GT conditions.

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 baseline is 3; the description adds real value by enumerating condition/category enums, the threshold range, and the meaning of IDENTITY_AGE_GT seconds. However, it lists the condition object as {condition, category, threshold, seconds} while the schema requires a 'badge' property, so the description is not fully aligned with the schema.

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 states a specific action and resource ('Create a badge rule for the current customer') and elaborates what a badge rule is with condition types and semantics. It also differentiates from the closest sibling create_escalation_rule by explicitly excluding BADGE_EXISTS and IDENTITY_AGE_LT and routing those to escalation rules.

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?

It opens with an explicit precondition: 'Describe the rule and confirm with the user before calling.' It also provides when-not-to-use guidance by naming the unsupported condition types and saying 'use an escalation rule for those,' which tells the agent exactly when to choose a sibling tool.

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.