Connect
Add the Gleap MCP server as a custom connector in your AI client and sign in with Gleap (OAuth):
Clients that can’t do OAuth send the headers
x-gleap-api-key and x-gleap-project-id instead. The agent acts with your role in the project.
Tools
How agents build a survey
create_surveywith a definition. The tool rejects common mistakes before saving — unknown properties, duplicate ids or keys, jumps to unknown or earlier questions, conditions on choice labels instead of choice ids, NPS ranges outside 0–10 — and returns Gleap’s validation of the saved draft.- The agent fixes problems with
update_survey(always the complete definition) orvalidate_survey. - You open the
reviewUrlthe tool returns, check the survey in the editor and click Publish changes.
Create a churn survey for customers who cancel. Ask why, and if it’s pricing, ask what price would have worked. Show it full screen right after they cancel.The agent creates a full-screen draft with a
single question, a jump from the too_expensive choice to a number question, two endings and the trigger subscription_cancelled (once per contact) — and tells you it hasn’t published it.
Guardrails
create_surveyalways savesstatus: "draft";update_surveyonly writes the draft definition. Neither publishes nor changes a live survey’s version, status or targeting.publish_surveygoes through the same publish endpoint as the dashboard. For agents it returns{ "published": false, "requiresApproval": true, "reviewUrl": "…" }; the agent shouldn’t retry.reach_out_to_respondentsends nothing unless the call passessend: true, which agents should only do after you approved the exact message.- Results stay compact: lists are capped, long answers are clipped and responses are paged with a cursor.
- Customer-facing agent runs (Kai answering one customer) can’t use survey tools.