SKILL.md
As tools abaixo aparecem com os nomes que o MCP da Clickmax registra. Se o seu cliente de IA prefixar nomes de tool (
mcp<servidor>,mcp<servidor>, ou outro), use o nome já prefixado que aparecer na sua lista de tools.
When this applies
Use this skill when the user wants lead discovery/inspection OR to create a lead: search/filter contacts, inspect one lead, check whether an email already exists, create a new contact, compare lead-origin patterns, or pull a lead's payments/invoices/products.
Not this skill:
- tagging/classification ->
clickmax-tags - manual lists or dynamic segments ->
clickmax-list-segments - kanban pipelines/opportunity cards ->
clickmax-pipelines
Key assumptions
leadsfilterschemadescribes the legacy filter model; never use it to buildleads_searchfiltersleadssearchis the main entry for cohort discovery.filtersis required ([]= all leads), andperPageaccepts 1-100. Its onlysortByvalues areopportunitiesasc/opportunities_desc; omittingsortByreturns leads NEWEST-FIRST bycreatedAt. So "the last N leads" usesfilters: [],page: 1,perPage: N(N <= 100) with nosortByleads_getis enriched commercial context, not just a flat row- payments, invoices, common products, and origin trees are lead-adjacent projections, not separate core entities
- tags, lists, and segments group leads; they do not replace the lead record itself
- lifecycle and temperature are mutable business signals; report them as current state, not immutable history
Thought process
- Decide whether the user needs one lead, a filtered cohort, or supporting aggregates.
- If the user describes filters vaguely, inspect the filter schema first.
- Use
leadssearchfor cohorts andleadsgetfor one concrete lead. - Pull supporting projections only when they materially answer the request.
Execute guide
- For cohort discovery, follow the
leads_searchinput contract; do not translate fields from the legacy filter-schema operation. - Search cohorts with
leads_search, passing the requiredfiltersarray ([]when unfiltered) plus optional paging and sort fields. Use this for discovery, comparison, and broad CRM filtering. - Inspect one known lead with
leads_get, passing the lead id. Treat this as the main enriched lead view. - Add commercial context with
leadspayments,leadsinvoices, andleadscommonproductsonly when payments, billing status, or bought-product patterns materially change the answer. Unlike its siblings,leadscommonproductsrequiresfilter(not optional) — always pass a filter, even a broad one. - Use
leadsexistsby_emailfor duplicate-check questions, not enrichment. - Create one contact with
leadscreate— onlynameis required; passemail/telephonewhen known and checkleadsexistsbyemailfirst to avoid duplicates. It also acceptstagIds/customFieldValuesinline, so a lead can be created pre-tagged/pre-classified in the SAME call instead of a separate tagging step afterward. It returns the new lead id. To seed a pipeline, create each contact here then add them as opportunity cards viaclickmax-pipelines(cardscreateneeds the returned lead ids). For several contacts, callleadscreateonce per contact. - Use
leadsorigins,leadssuborigins, andleadsorigins_treefor source taxonomy and breakdown questions. - Use
leadspaymentsutm_autocompletewhen the user needs help discovering UTM values before filtering or diagnosing acquisition patterns. - Preferred order: cohort question ->
leadssearch; single lead question ->leadsget-> supporting projections only if needed; origin or UTM exploration -> origin or UTM helper first -> lead search only when matching contacts are also required.
Report
- Start with what was inspected: one lead, cohort, or origin/UTM diagnostic.
- For one lead: summarize identity, status/context, and only the relevant commercial facts.
- For cohorts: summarize count + the most relevant breakdowns before dumping rows.
- Cap long result sets and show
+N morewhen the cohort is too broad. - Follow-up actions are opt-in only.
Warnings
- Do not guess filter fields or operators.
- Do not treat lead payments or invoices as if they were the lead record itself.
leadsexistsby_emailanswers existence, not ownership or enrichment.
Anti-patterns
- Asking the user for workspace id.
- Using raw origins/UTM helpers as a substitute for lead search.
- Returning every field when the user only asked for one operational answer.