Skip to main content
Glama

Create an event to count

create_event

Declares something to count on a site and returns how to install it, step by step: a click on a button or link (no JavaScript, a class to add), a page reached (nothing to install, e.g. a thank-you page), a link to another site (nothing to install, e.g. a booking platform: every click to it counts), or an action sent by the site's own code. Clicks to other sites, email addresses, phone numbers, files, and forms on WordPress are already counted by themselves (auto:…): do not create an event for them, use set_goal. Pass platform so the steps fit the tool the site is made with.

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": {
      "site": "<site>",
      "label": "<label>",
      "kind": "<kind>"
    },
    "name": "create_event"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoTrue when this is what the site is for (a sale, a sign-up, a contact): conversions are then counted for it.
kindYesclick, page (a page reached), link (a link to another site) or code.
nameNoFor kind code: the exact name the site's code already sends (e.g. signup_created), kept as is. Without it, the name is made from the label.
pageNoFor kind page: the page address, e.g. /thank-you or https://example.com/thank-you. When the same page has several addresses (one per language: /pricing and /fr/pricing), give them all, separated by commas: one event counts them together. An address that ends with * counts every address that begins so (/checkout/order-received/*).
siteYesThe site: its domain (example.com), its id, or its public id. See list_sites.
labelYesThe name the user gives it, e.g. Newsletter sign-up.
targetsNoFor kind link: the site the links lead to, a domain (its subdomains count too) optionally followed by the start of a path, e.g. axyomes.com or example.org/booking. Several, separated by commas.
platformNoThe tool the site is made with, so that the steps fit it. Ask the user if unsure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only declare non-read-only and non-idempotent; the description adds the important behavioral fact that the tool returns per-platform installation instructions and that different kinds require different work ('nothing to install' vs 'a class to add'). It does not address what happens when an equivalent event already exists, which matters given idempotentHint=false.

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 the action and the return value, and the exclusion rule plus the `platform` instruction land in the final sentences. The opening sentence is long and parenthetical-heavy, which slightly dilutes scanning, but no sentence is filler.

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 8-parameter mutating tool with no output schema, the description covers purpose, the return value (install steps), and the key alternative. It leaves the duplicate/already-exists scenario and the effect of `goal` on downstream conversion counts unexplained.

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, but the description adds conceptual meaning the schema lacks: what each `kind` implies for installation effort and what a `link` target or multi-address `page` means for counting. `goal`, `label`, and duplicate-handling get no extra depth in the prose.

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 ('Declares something to count on a site') plus the side effect ('returns how to install it, step by step'), then enumerates the four kinds of things that can be counted. An agent can distinguish this from set_goal and update_event on the strength of the text alone.

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?

Names explicit exclusions (clicks to other sites, email addresses, phone numbers, files, WordPress forms are auto-counted) and routes those cases to a specific alternative, set_goal. It also gives a conditional instruction to pass `platform` so the returned steps match the site's builder.

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