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 for pipeline/stage/card operations: create or change pipelines and stages, move cards, assign attendants, inspect history/risk, import leads into pipelines, or read pipeline analytics/settings.
Not this skill:
- lead search and identity ->
clickmax-leads - manual tagging or segment/list membership ->
clickmax-tags/clickmax-list-segments - building or reading a saved Insights dashboard of opportunities BI ->
clickmax-insights-dashboards
Key assumptions
- stage/pipeline ids must be resolved before mutation
- moving cards can change card status from the destination stage semantics
wonandlostare terminal stage meanings; only put them on stages meant to close opportunities- auto-assignment strategy changes who owns new/changed cards and should be treated as operational policy, not cosmetic text
- settings can include idle SLA threshold, lost reasons, default priority, temperature, currency, and card display fields
- some move paths may be blocked by stage passage rules
- delete semantics are soft-hide/remove-from-board at the backend level, but still user-visible destructive actions
- attendant assignment/settings writes replace current structures, not patch arbitrary fragments
- Every money amount here is an INTEGER IN CENTS —
cardscreate/cardsupdate'svalue,opportunitiesbulksetvalue'svalue,cardslist/opportunities_query'svalueMin/valueMax, andcommissionFixedCents.19990= R$ 199,90. Neither side divides or multiplies: a decimal like199.90is not "reais", it is a fifth of a cent. Commission PERCENTAGES are basis points instead (525= 5,25%). cardsandopportunitiesbulkact on the SAME thing — an opportunity card. The bulk family is not "the lead version" of the single-card tools;opportunitiesbulkapplytagswrites the exact same card↔tag link ascardsapplytags, just over a whole selection. Tagging the CONTACT is a different domain entirely (crmtagsapplytoleads, seeclickmax-tags).- Bulk targeting is
cardIds(an explicit non-empty list of CARD ids) ORallMatching: truewith ascope{ pipelineId, stageId?, filters? }— mutually exclusive, one required, and neveropportunityIds/leadIds. Sending both or neither is a 400.
idmeans a DIFFERENT thing depending on the tool — same param name, nopipelineId/stageIdalias to disambiguate. Onstageslist,stagescreate, andstagesreorder,idis the PIPELINE id (the stage itself is created/reordered by name/list, not addressed). Onstagesupdateandstages_delete,idis the STAGE id. Do not assume it means the same thing across sibling tools — check which one before calling.
Thought process
- Resolve the exact pipeline/stage/card first.
- Distinguish card mutation from pipeline metadata/settings mutation.
- When moving or reordering, preserve board semantics and current anchors.
- Confirm destructive changes when intent is not already explicit.
Execute guide
- Resolve the board before writes: use
pipelineslistto find the pipeline,stageslistwithid(the pipeline id, notpipelineId) to map stage ids, andcards_listwithpipelineId,stageId, pagination, and optional filters such assearchortagIdswhen the target card still needs disambiguation.
- Creating a NEW pipeline with its stages already defined (the common "create a pipeline with stages X, Y, Z" ask): pass the stages inline in
pipelinescreate's optionalstagesarray ({name, color?, type?, metaPixelEvent?}per stage,typedefaults toinprogress— usewon/loston the terminal stages) instead of one pipeline call plus N separatestages_createcalls. One call creates the whole board.
- Create cards with
cardscreate, passing the targetleadIds,pipelineId, andstageId; includevalueandattendantIdsonly when the user wants those set at creation time. Do not guess a card-creation tool name outside pipelines —cardscreateis the only one; there is nopipelinescreatecard.
- Brand-new/fictional contacts: create each one first via clickmax-leads's leadscreate (one call per contact, returns the new lead id), THEN batch them into cardscreate calls using that pipeline's pipelineId/stageId and leadIds: [<the returned id>]. - EXISTING contacts (e.g. "pegue os últimos N leads e adicione na pipeline X"): this is a TWO-DOMAIN task — resolve the leads first via clickmax-leads's leadssearch (no special sort needed for "last N", see that skill), resolve the pipeline/stage via pipelineslist/stageslist here, THEN call cardscreate once per resolved lead id with that pipelineId/stageId. Load both skills' guidance for this request — do not treat it as pipelines-only just because a pipeline is named.
- Change many cards at once with the
opportunitiesbulk*family instead of looping the single-card tools:opportunitiesbulkmove,applytags,assignattendants,setvalue,setpriority,settemperature,setclosingdate,setcustomfield,createnextaction,delete. Resolve the selection first (cardslistoropportunitiesquery), then send it ascardIds, or describe it once asallMatching: true+scope. Each call answers{ mode: "sync", affected }up to 200 cards, or{ mode: "async", jobId }above that — an async answer means NOTHING has happened yet; pollopportunitiesbulkjob_statuswith thatjobIdbefore reporting the change as done.
- Write an opportunity custom field with
opportunitiesbulksetcustomfield—customFieldIdfromcustomfieldslistwithentityType: "opportunities", andvalueraw for the field type (string for text/select, number for number, ISO string for date, boolean for boolean, string array for multiselect;nullclears it). Onlytext,number,date,boolean,selectandmultiselect can be written in bulk — every other type (currency,textarea,link,percentage,radio,rating,file,formula,json) is refused with a 400Custom field type "<x>" is not supported in bulk update. For those, write per card viacards_update'scustomFieldValues, or pick a supported type when creating the field.
- Move cards with
cards_move, passing the cardid, the destinationstageId, and the current relative anchor (beforeCardIdorafterCardId) so the board order stays intentional; includelossReasononly when the move path requires or justifies it.
- Assign attendants in 2 steps: first read
pipelinesattendanttypesgetfor the pipeline's valid attendant type ids, then writecardsassign_attendantswith explicitassignmentsentries containingattendantId,attendantTypeId, andisPrimary.
- Import leads into a pipeline with
cardsimportfrom_listsonly when the user wants board population from list/segment cohorts rather than one-off card creation.
- Inspect card behavior with
cardsgetfor one card,cardslistbyleadfor a lead's pipeline presence,cardshistoryfor move/change history, andcardsat_riskfor cards currently flagged as operational risk.
- Update structure only after resolving the exact target object: to add a stage to an EXISTING pipeline, use
stagescreatewithid= that pipeline's id (not apipelineIdfield, and not the new stage's id — the stage has no id yet);stagesupdate/stagesdeleteinstead takeid= the STAGE's own id, since those two target one stage directly. Usestagesreorder(id= pipeline id) to resequence. Usepipelinescreate,pipelinesupdate, orpipelines_deletefor pipeline changes.
- Treat settings and analytics as separate from board CRUD: read current configuration with
pipelinessettingsgetbeforepipelinessettingsupdate, usepipelinesattendanttypessetonly when changing the pipeline's attendant-role structure itself, and usepipelinesanalyticsfor performance/throughput answers rather than card-by-card inspection.
Report
- For structural changes: report what changed, where, and the resulting status.
- When summarizing one specific created/read pipeline in a visual card, use the pipeline name as the large headline/value. Put stage count, opportunity count, active status, and similar board metrics in pills/secondary metrics instead of replacing the headline with counts.
- For card moves: report origin -> destination and any relevant status/owner effect.
- For analytics/risk: summarize the operational takeaway, not raw board payloads.
Warnings
- Do not guess stage ids from names when several stages are similar.
- A bulk write that comes back
mode: "async"has NOT been applied yet. Reporting "done" off that response is how a mass update gets silently lost — pollopportunitiesbulkjobstatus, and useopportunitiesbulkjobhistoryto audit or recover ajobIdthat was not kept. - Treat a tool result flagged as an error as a FAILURE even though the transport answered 200. MCP reports a failed tool call in the result envelope (
isError: true, the message as text), not as a JSON-RPCerror— a caller that only inspectserrorreads "Provide non-empty cardIds OR allMatching=true with scope" as if it were a successful write. Never count rows as written on a result you did not actually read. cards_createcreates ONE card per call, even whenleadIdscarries several contacts — that is the multi-contact card, not a shortcut for N cards. For one card per contact, call it once per lead id.- Card order uses relative positioning semantics; stale anchors can misplace cards.
- Importing from lists/segments skips leads already present in the pipeline.
- If
leadscreate(or any write here) returns an empty/unexpected result for a contact you need the id of, do not silently skip it or fabricate an id — callleadsexistsbyemail/leadssearch(seeclickmax-leads) to recover the real id before using it incardscreate, or surface the failure instead of creating a card with no lead.
Anti-patterns
- Treating pipeline settings as harmless cosmetic edits.
- Moving cards without checking destination stage semantics.
- Using card deletion when the user only wants to hide/archive operationally.