Skip to main content
Glama
benpalmer1

Gorgias MCP Server

by benpalmer1

Create Rule

gorgias_create_rule

Create an automation rule with JavaScript logic and event triggers to automate helpdesk workflows.

Instructions

POST /api/rules — Create a new automation rule with JavaScript logic and event triggers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe logic of the rule as JavaScript code
nameYesThe name of the rule
code_astNoThe logic of the rule as an ESTree AST representation (auto-generated from code if not specified)
priorityNoOrder of execution; rules with higher priority values are executed first
descriptionNoA human-readable description of the rule
event_typesNoComma-separated list of events that trigger this rule. Allowed values: ticket-created, ticket-updated, ticket-message-created, ticket-assigned, ticket-self-unsnoozed, satisfaction-survey-responded
deactivated_datetimeNoISO 8601 datetime when the rule was deactivated. Set to null to create the rule as active
Behavior3/5

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

The description adds some behavioral context beyond the annotations by indicating that rules contain 'JavaScript logic and event triggers,' which explains how the rule operates. However, it does not mention side effects, execution behavior, or requirements like valid code. Annotations already signal a write operation (readOnlyHint: false), so the description is consistent but not highly informative.

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 a single, front-loaded sentence that includes the HTTP method and endpoint, making it immediately actionable. Every word contributes to clarity, with no redundant or filler content.

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

Completeness3/5

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

The description is adequate for a create operation with a well-documented schema, but it lacks details about post-creation behavior (e.g., whether the rule activates immediately, what the response contains, or any side effects). Given the lack of an output schema and the openWorldHint annotation, a bit more context would improve completeness.

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

Parameters3/5

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

The input schema provides 100% coverage of parameter descriptions, so the baseline is 3. The description's mention of 'JavaScript logic and event triggers' loosely maps to the 'code' and 'event_types' parameters but does not add new meaning beyond what the schema already provides. No additional parameter semantics are introduced.

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 clearly states the tool's function: 'Create a new automation rule with JavaScript logic and event triggers.' It uses a specific verb ('Create') and resource ('automation rule'), and distinguishes itself from sibling tools like gorgias_get_rule, gorgias_update_rule, and gorgias_delete_rule by focusing on the creation action.

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?

The description implies usage context: it is for creating rules, as opposed to retrieving, updating, or deleting them, which are covered by sibling tools. However, it does not explicitly mention when not to use it or name alternatives, so it falls short of a 5. The context is clear enough for an agent to select it for rule creation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/benpalmer1/Gorgias-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server