Skip to main content
Glama

smile-io

Record a customer activity

smile_create_activity
Destructive

WRITE: record that a customer performed an action (identified by an activity type token configured in Smile Admin, e.g. a custom 'newsletter signup' activity). Smile then asynchronously applies the store's earning rules and may issue points or rewards. Identify the customer by customer_id OR customer_email (exactly one). Pass distinct_id (e.g. an order number) to make it idempotent — a second activity with the same token + distinct_id is rejected. Custom activity types need Smile's Plus/Enterprise plan. Requires the activity:write scope. Smile: POST /activities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesActivity type token, e.g. activity_f57a9b5a8d0ac5.
customer_idNoSmile customer ID (or give customer_email).
distinct_idNoUnique id for this activity in your system; prevents duplicates for the same token.
customer_emailNoCustomer email (or give customer_id).
created_on_origin_atNoISO 8601 date-time the action actually happened, if earlier than now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the thin annotations (destructiveHint only): asynchronous earning-rule evaluation that may issue points or rewards, idempotency semantics with the specific rejection case for duplicate token+distinct_id, plan gating, and required scope. This tells the agent the side effects and failure mode of a write it cannot see from the schema.

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-loaded with 'WRITE:' and the core action, then packed with operational constraints in a few dense sentences; little is wasted. It is information-heavy rather than elegantly trimmed, but every sentence carries weight.

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, no return-value description is strictly required, and the description covers async processing, idempotency, scope, and plan requirements for a 5-parameter write tool. Only a note on what the call returns or how the async outcome is observed 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 the baseline is 3, but the description adds real meaning: token is a token configured in Smile Admin, distinct_id is exemplified as an order number, and the customer_id/customer_email mutual-exclusivity rule is stated. It extends rather than repeats 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?

Opens with an explicit verb+resource ('WRITE: record that a customer performed an action') and pins the resource to a configured activity type token, finishing with the underlying call (Smile: POST /activities). This is clearly distinguishable from the points-transaction and rewards siblings, which record different resources.

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?

Gives concrete conditions: exactly one of customer_id or customer_email, use distinct_id to make the call idempotent, custom activity types require Plus/Enterprise, and the activity:write scope is needed. It stops short of naming a sibling alternative (e.g. when to reach for smile_create_points_transaction instead), so it is strong but not exhaustively routing.

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.