Skip to main content
Glama
clamp-sh

Clamp Analytics MCP Server

Official

funnels.create

Define an ordered sequence of steps (events or pageviews with property filters) and evaluate a conversion funnel. Get step-by-step counts, per-step conversion rates, and overall conversion from first to last step.

Instructions

Create and immediately evaluate a conversion funnel. A funnel measures how many unique visitors complete an ordered sequence of steps. Returns step-by-step counts, per-step conversion rates (vs the previous step), and overall conversion (last step / first step). The funnel is saved by name and can be re-evaluated later or for different periods via funnels.list.

Step format: a custom event name like "signup", a pathname-scoped pageview like "pageview:/pricing", and optionally one or more property predicates appended in brackets — "cta_click[location=hero_primary]" matches only cta_click events whose location property equals "hero_primary". Stack predicates to AND them: "cta_click[location=hero_primary][plan=pro]". Predicates work on pageview steps too: "pageview:/pricing[utm_source=google]". Requires Pro plan.

Predicates default to string-typed comparisons (the property is read from the string column). For number- or boolean-typed properties (declared as such in event-schema.yaml), append a type tag: "purchase[count:n=5]" matches numeric 5; "checkout[refunded:b=false]" matches boolean false; "purchase[plan:s=5]" forces string matching when the value looks numeric. Tags: ":n" number, ":b" boolean (true|false|1|0), ":s" string (default).

Examples:

  • pricing-to-signup → name="pricing-to-signup", steps=["pageview:/pricing", "signup"]

  • which CTA actually converts → name="hero-cta-funnel", steps=["cta_click[location=hero_primary]", "signup_completed"]

  • onboarding flow → name="onboarding", steps=["signup", "onboarding_started", "onboarding_completed", "first_purchase"]

  • multi-item checkouts only → name="multi-item-checkout", steps=["pageview:/cart", "checkout_completed[items:n=3]"]

  • non-refunded purchases → name="purchase-net", steps=["pageview:/pricing", "purchase[refunded:b=false]"]

  • blog-to-newsletter → name="blog-newsletter", steps=["pageview:/blog", "newsletter_subscribed"]

Limitations: between 2 and 10 steps; step strings ≤500 chars; names ≤200 chars. Step order matters — once a session skips a step, it cannot complete later steps. Pageview pathnames match exact strings only (no wildcards). Predicate keys must be snake_case; string values may not contain ']' or '['. Number predicates require a finite value; boolean predicates require true|false|1|0. Funnel evaluation is per-session, not per-user across devices. Names must be unique within a project — a duplicate-name create returns 409; use funnels.delete first or pick a new name. Funnel definitions are immutable after creation; to change steps, delete and re-create.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoTarget project ID (e.g. "proj_abc123"). Required when the credential has access to multiple projects. If omitted and only one project is accessible, that project is used automatically. Call `projects.list` to discover available project IDs.
nameYesA descriptive display name for this funnel (e.g. "Pricing → Signup", "Onboarding flow", "pricing-to-signup"). Used to retrieve it later. Permissive charset — spaces, capitals, arrows, and punctuation are all fine. Must not contain "/", ",", "[", or "]" because those collide with URL routing and the step-DSL grammar. Max 200 chars.
stepsYesOrdered array of 2-10 funnel steps. Each step: a custom event name ("signup"), a pathname-scoped pageview ("pageview:/pricing"), or either form with property predicates appended in brackets ("cta_click[location=hero_primary]", "pageview:/pricing[utm_source=google]"). Stack predicates to AND them: "cta_click[location=hero_primary][plan=pro]". Predicates default to string matching; append ":n" for number ("checkout[items:n=3]"), ":b" for boolean ("purchase[refunded:b=false]"), or ":s" to force string when the value looks numeric ("plan:s=5").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
nameYes
stepsYes
overall_conversionYes
periodYes
Behavior5/5

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

Discloses behavioral traits beyond annotations: funnel saved and re-evaluable, per-session evaluation, immutable definitions (delete and re-create), step order importance, name uniqueness, and step DSL constraints. No contradiction with annotations.

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?

Long but well-structured: core purpose first, then step format, examples, limitations. Every sentence adds value, though could be slightly more concise given the complexity.

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?

Covers all essential aspects: step format, examples, limitations, error cases (duplicate name), and return values (step counts, conversion rates). Despite no output schema shown, description adequately describes behavior.

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

Parameters5/5

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

Schema coverage is 100%, but description adds extensive meaning: steps DSL with predicate types, examples, and limitations; name charset and collision info; project_id multi-project handling. Goes far beyond 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?

The description clearly states the tool creates and immediately evaluates a conversion funnel, explains what a funnel measures, and returns step-by-step counts and conversion rates. It distinguishes from siblings like funnels.list (re-evaluation) with specific verb and resource.

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?

Provides explicit when-to-use guidance, including handling duplicate names (409 error, suggests delete or new name), contrasts with funnels.list, and includes limitations (2-10 steps, char limits, step order, pageview exact match).

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/clamp-sh/mcp'

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