Skip to main content
Glama

Set conversion goals

set_goals
DestructiveIdempotent

Set conversion goals for a landing page. Goals define what counts as a "conversion" — the primary actions you want visitors to take. You can set multiple goals per page.

Conversion rate is calculated from unique visitors who completed at least one configured goal. Each goal is still tracked separately in analytics, and improvement suggestions adapt to goal types.

Examples:

  • User says "カフェの予約ページを作って" → goals: [{ goalType: "cta_click", label: "予約サイトへ" }]

  • User says "資料請求と LINE 登録ができるページ" → goals: [ { goalType: "form_submission", label: "資料請求フォーム" }, { goalType: "cta_click", label: "LINE登録" } ]

IMPORTANT: Always call this after create_site when the page purpose is clear. If the user mentions forms, inquiries, signups → include form_submission goal. If the user mentions external links, bookings, LINE, phone, EC store → include cta_click goal.

What it replaces: the page's whole goal list. Goals left out are deleted, including the form_submission goal create_form added, and Convika keeps no copy of them; analytics then count conversions by the new list. To keep a goal, read the list with list_goals first and send it again with the new ones. Recorded visits, clicks, and form entries stay as they are.

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": {
      "siteId": "<siteId>",
      "goals": "<goals>"
    },
    "name": "set_goals"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalsYesList of conversion goals (1-5)
siteIdYesThe ID of the page to set goals for

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / siteId / description
      Previous value: -"The site ID to set goals for"New value: +"The ID of the page to set goals for"
  3. Changed2 schema fields changed
    • changedInput schema / properties / goals / items / properties / goalType / description
      Previous value: -"'form_submission': visitors submit a form. 'cta_click': visitors click a CTA to an external destination."New value: +"'form_submission': visitors submit a form. 'cta_click': visitors click a CTA to an external destination. 'order': visitors place an order on the page's order form (after enable_orders and the seller's setup); analytics then report its orders and revenue, and the conversion total is an estimate (conversionsEstimated)."
    • changedInput schema / properties / goals / items / properties / goalType / enum
      Previous value: -[
      -  "form_submission",
      -  "cta_click"
      -]New value: +[
      +  "form_submission",
      +  "cta_click",
      +  "order"
      +]
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, and the description adds real substance on top: the call replaces the entire goal list, omitted goals are deleted (including one create_form had added), no copy is retained, and analytics recalculate on the new list. It also clarifies that historical visits, clicks, and form entries are unaffected, which is exactly the blast-radius information an agent needs before a destructive call.

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?

It is front-loaded with purpose, then examples, then the required-order rule, then the destructive warning, so a reader who stops early still learns the essentials. The two verbose Japanese examples and the goal-type routing lines add length, but each supports a real decision; only minor trimming is possible.

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

Completeness5/5

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

For a two-parameter destructive mutation with no output schema, the definition covers everything needed to call it correctly: when to call it, what it overwrites, how to preserve prior goals, how goals relate to conversion counting, and how the goal types should be chosen. Return values are not described, but no output schema exists and none of the guidance depends on them.

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 schema carries the field-level burden, but the description still adds meaning beyond it: worked examples show the goalType/label pairing and the intent-to-goalType mapping is not something the schema states. The 1-5 maxItems and ctaHrefPattern details are left entirely to the schema, keeping it short of a 5.

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 opening sentence states a specific verb and resource ('Set conversion goals for a landing page') and immediately defines what a goal means. It also distinguishes itself from the read-side sibling by instructing the agent to read the list with list_goals first, so an agent can tell it apart from list_goals and create_form without opening a schema.

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 gives an explicit ordering rule ('Always call this after create_site when the page purpose is clear') and concrete routing heuristics mapping user language to goal types (forms/inquiries/signups → form_submission; external links/bookings/LINE/phone/EC → cta_click). The read-modify-write path via list_goals is spelled out for preserving existing goals.

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.