For the complete documentation index, see llms.txt.

MCP tools

Last updated View as Markdown

The Contentsquare MCP server gives your AI agent tools to explore your Contentsquare data. You don't call these tools yourself. Ask a question in natural language, and your AI agent chooses the right tools and fills in their parameters.

The tools can only return data from projects where you already have Contentsquare permissions.

How your AI agent uses the tools

Section titled How your AI agent uses the tools

To answer a question, the agent works through these steps:

  1. Find your project. The agent calls listProjects to get the ID of the project you want to analyze.
  2. Look up the objects in your question. The agent finds the mappings, page groups, segments, or goals you mention, and gets their IDs.
  3. Run the analysis. The agent calls the metrics, analysis, or error tool that fits your question.

The analysis tools take these common options:

  • Date range. A start and end date and time. Analysis tools accept a range of up to 92 days, and error tools up to 31 days.
  • Device type. All devices, or only desktop, mobile, or tablet.
  • User filter. An optional filter that limits the analysis to a subset of users. You can filter by browser, goal completion, segment, or page interaction (bounce, exit, or landing page), and combine conditions with AND and OR.

Discover your project and objects

Section titled Discover your project and objects

These tools look up the projects and objects you mention in your prompt, such as mappings, page groups, segments, goals, or events. They return the IDs that the analysis tools need.

ToolDescription
listProjectsReturns the projects (ID and name) that you can access. The agent calls it first.
searchMappingsSearches and retrieves the mappings of a project.
getPageGroupsForMappingRetrieves all the page groups of a mapping, sorted alphabetically by name.
searchSegmentsSearches and retrieves the segments of a project, optionally filtered by name. For large projects, the results are returned in pages.
searchGoalsSearches and retrieves the goals of a project.

These tools find the objects that are most relevant in a project. They rank mappings, page groups, segments, and goals by engagement and usage frequency in Contentsquare, such as how often they're viewed or used in analyses.

ToolDescription
recommendMappingsRecommends mappings based on how often they're viewed and used in analyses.
recommendPageGroupsRecommends page groups based on how often they're viewed and used in analyses.
recommendSegmentsRecommends segments based on how often they're viewed and used in analyses. If a project has no recent engagement data, it returns the most recently updated segments.
recommendGoalsRecommends goals based on how often they're viewed and used in analyses.

These tools return aggregated numbers and breakdowns, either for the whole site or for a page group.

ToolDescription
computeSiteMetricsComputes aggregated metrics across the entire site. It can group results by session-level dimensions such as device, browser, country, city, language, and day, and apply a goal or a user filter. It can return traffic and engagement metrics (visits, bounce rate, average session time, and average pageviews), conversion rate and count for a goal, e-commerce metrics (revenue, average cart, transaction rate, and transaction count), and quality of experience metrics (visits with errors and frustration score).
computePageGroupMetricsComputes metrics for one page group, to get an overview of the performance of part of your site. It can group results by dimensions such as page path, path prefix, device, browser, country, and day. It can return traffic and engagement metrics (views, visits, unique visits, unique users, bounce rate, exit rate, landing rate, and activity rate), page behavior metrics (scroll rate, interaction time, elapsed time, loading time, page height, and fold height), conversion rate for a goal, average session lifetime revenue for e-commerce projects, and quality of experience metrics (visits with errors and frustration score).

Analyze behavior and conversion

Section titled Analyze behavior and conversion

These tools show how visitors move through your site and where they convert.

ToolDescription
computeFunnelMeasures drop-offs and conversions across an ordered sequence of 2 to 32 page groups of a mapping. Analyzes conversion rates, drop-off points, and time to completion, by sessions or by users.
computeImpactCompares conversion performance between groups of users for a conversion goal. Returns conversion rate, bounce rate, session time, pageviews, and revenue impact, with statistical significance testing. You can compare a different date range, device type, or user filter.
computeJourneyShows how visitors navigate your site as a hierarchical tree of common paths and drop-off points, for up to 7 steps. A forward journey starts from landing pages, or from a page group you choose. A reverse journey starts from exit pages, or from a page group you choose.
computePageComparisonCompares 2 to 10 page groups of a mapping side by side: views, bounce rate, exit rate, scroll rate, time spent, activity level, load times, and conversion rate for a goal.

These tools find the errors that affect your visitors and show how they hurt your goals. Each tool answers a different question.

These tools analyze either the whole site or one page group, and can filter by error type: JavaScript, API, custom, crash, or Flutter.

ToolDescription
getErrorExplorerLists errors with their technical and business impact, or returns an overview of error totals and trends. Rows can be errors, pages, page groups, or errors on page groups. It can filter errors by type, HTTP status code, HTTP method, response body or custom attributes, source platform, dismissed status, and free text. In overview mode, it returns the total sessions, sessions with errors, and number of errors with their evolution over the period, plus the top 10 errors and their trends. The date range is limited to 31 days.1
getTopErrorsBySessionsWithErrorsRanks errors by the number of sessions with errors. This is the main tool for general error questions: error trends, rates, and the most frequent errors.
getTopErrorsByImpactOnGoalRanks errors by their impact on a conversion goal, to prioritize fixes by business value. Requires a mapping and a goal.1
getTopErrorsByMissedOpportunityRanks errors by the revenue they cost, for e-commerce projects. Requires a mapping.1
getTopPageGroupsByLostConversionsRanks page groups by the conversions lost because of errors. Requires a mapping and a goal.1
getTopPagesBySessionsWithErrorsShows the pages most affected by errors compared with their traffic, either as page groups or as individual page URLs. Requires a mapping.

Feedback tools aren't available in Experience Analytics.

  1. Business impact results include only statistically significant errors by default, and goal ID -1 stands for the e-commerce goal. ↩ ↩2 ↩3 ↩4