Skip to main content
Glama

Create goal

create_goal

Create a conversion goal. Each matching event records a conversion credited to the last email sent or clicked within window_days. Returns the goal. Errors: goal_exists, invalid_window (1 to 90), invalid_event_name. Next: track_event to convert, then goal_stats.

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>",
      "event_name": "<event_name>"
    },
    "name": "create_goal"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesA unique name, such as "Upgraded to pro".
conditionsNoOptional property conditions, same shape as for sync rules.
event_nameYesThe event that counts as a conversion.
window_daysNoAttribution window in days, 1 to 90 (default 7): an email sent or clicked this long before gets the credit.
value_propertyNoProperty holding the revenue of the event, such as "amount".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent write with no open-world reach; the description adds real behavioral context beyond that by naming the failure modes (goal_exists, invalid_window 1-90, invalid_event_name) and stating it returns the goal. The goal_exists error usefully signals the non-idempotent semantics implied by the annotations. It does not discuss permissions or what ownership scope the goal is created in.

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?

Three compact sentences: purpose first, then the attribution rule, then returns/errors/next steps. No filler, and the most decision-relevant information is front-loaded.

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?

With no output schema, the description responsibly covers the return value and error surface, and it points to the follow-on tools. The main remaining gap is whether the referenced event must already be defined before creation (relevant given the invalid_event_name error and the create_event_definition sibling).

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?

Schema description coverage is 100%, so all five parameters (including conditions, value_property, and window_days) are already documented in the schema. The description's mention of window_days and the last-email attribution rule largely restates the schema's own wording, so it adds some framing but little new parameter meaning; the high-coverage baseline of 3 applies.

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 and resource ('Create a conversion goal') and immediately qualifies what a goal means: an event-based conversion credited to the last email sent or clicked within window_days. That definitional detail distinguishes it from other create_* siblings like create_event_definition or create_campaign without needing their schemas.

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 'Next: track_event to convert, then goal_stats' line gives concrete forward workflow guidance, which is the main usage question for a goal-creation tool. It stops short of naming when not to use it or what prerequisites exist (e.g., whether the event must already exist), so it is clear context rather than full when/when-not guidance.

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.