How to connect Microsoft Clarity to Toolspoke

Let your Toolspoke agents read your Clarity dashboard metrics and find session recordings by behaviour, device or page. Microsoft's Clarity server runs in Toolspoke's hosted sandbox with a Data Export API token, one per project.

Microsoft Clarity toolkitRead session recordings, dashboard analytics, and behaviour insights for a Clarity project.

Checked against Microsoft Clarity's documentation on 2026-11-26.

Toolspoke's Clarity toolkit runs Microsoft's own Clarity server for you in Toolspoke's hosted sandbox, not on your machine. It gives the server your Clarity Data Export API token. Once it's installed, any agent in the project can use it.

The toolkit is read-only. An agent can ask for dashboard numbers, find recordings worth watching and look things up in Clarity's docs. It can't change your project, its settings, masking rules or tracking code. This guide sets it up, then builds an agent that posts the week's frustration signals to your product channel.

What an agent can do once it's connected

The toolkit has 3 named actions, and all of them only read:

  • Dashboard metrics: query_analytics_dashboard takes a plain-English question and returns matching rows. It covers traffic, popular pages, dead and rage clicks, script errors, scroll depth and engagement time. Results can be broken down by browser, device, OS, country, traffic source or URL. One question per call works best, with the time range named: "dead clicks by URL over the last 3 days".
  • Recordings: list_session_recordings returns session recordings with playback links, filtered by behaviour, device, location or URL. Use it when a number needs explaining. Dead clicks and quickbacks only make sense when someone watches the session.
  • Clarity's own docs: query_documentation searches Microsoft's Clarity documentation for setup and troubleshooting answers. It doesn't read your project's data.

What you need

  • A Clarity project that's already collecting data, and admin access to it. Microsoft's docs say only project admins can manage API tokens.
  • A Toolspoke workspace, and a project to install the toolkit in.

Step 1: Generate a Data Export API token

  1. Open your project in Clarity and go to Settings → Data Export.
  2. Choose Generate new API token.
  3. Name it, for example toolspoke. Clarity requires 4 to 32 characters: letters, numbers, hyphens, underscores and periods, with no spaces. The name has to be unique within the project.
  4. Copy the token and keep it somewhere safe.
Microsoft Clarity
  1. Settings
  2. Data Export
  3. Generate new API token
Token name
toolspoke
Copy the token and store it securely. Only project admins can manage tokens. Illustration of Microsoft Clarity's screen. The labels are Microsoft Clarity's; the layout is ours.

A token reaches only the project that issued it, and the toolkit's actions take no project argument. If you run three sites as three Clarity projects, install the toolkit three times with three tokens. Then give each agent only the projects it should see.

Step 2: Install the Clarity toolkit in Toolspoke

  1. In Toolspoke, open the project your agents work in. Find Microsoft Clarity in the marketplace and add it.
  2. Paste the Data Export API token from step 1.
CredentialMicrosoft Clarity
Data Export API token
••••••••••••••••
Clarity → Settings → Data Export → Generate new API token. Requires project admin. A token reaches only the project that issued it, so install this tool once per Clarity project.

query_analytics_dashboard answered. The credential works.

Save and test
The Microsoft Clarity toolkit's credential card in your Toolspoke project, with its real fields.

Toolspoke checks the connection by asking query_analytics_dashboard how many sessions there were over the last day. That check is a real request to Clarity, so plan for it in the daily quota described below.

The token is encrypted at rest and handed to the server inside the sandbox. The agent never sees it, and it never appears in the arguments an agent sends or in the audit log.

Step 3: Decide who spends the daily quota

Nothing here can change your Clarity project, so there are no writes to switch off. What's scarce is the quota. Microsoft's announcement of its Clarity server gives a limit of 10 requests per project per day. Every person and agent using the same token shares those requests.

That makes access control mostly about budget:

  • In the project's toolkit settings, each action can be switched on or off for everyone in the project. An action that's switched off can't be called, whatever the prompt says.
  • Decide which agents should use Clarity, and give the routine work to one scheduled agent. A scheduled report and a person debugging a page shouldn't compete for the same ten requests by accident.
  • query_documentation answers "how does Clarity work" questions without your project's data. Leave it on for everyone.

Microsoft Clarity actions in your project

Agents can call 3 of 3, and none of them change anything.

Read
Looks, changes nothing.
  • query_analytics_dashboardAsk for Clarity dashboard metrics in plain English and get the matching rows back.
  • list_session_recordingsList session recordings with playback links, filtered by behaviour, device, geography or URL.
  • query_documentationSearch Microsoft Clarity's own documentation for setup, feature, troubleshooting and integration guidance.
Try the switches. They start the way this guide suggests; nothing here changes your project.

Recordings can show what real visitors typed and clicked, subject to your masking settings. If that's sensitive for your team, switch off list_session_recordings for projects that only need the numbers.

Every call is recorded with the agent and person behind it, the request, the response, the status and the duration.

Step 4: Build an agent that uses it

In Toolspoke, create an agent and describe its job in one sentence. The builder proposes the instructions, the toolkits it needs, a schedule and where it should answer. You add or skip each one, then create the agent. Every piece stays editable afterwards.

One run spends two or three of the project's ten daily requests, which leaves the rest for people's questions. The agent replies in the thread it was asked in when someone asks it a follow-up.

Try it

Ask the agent in Slack, by email or in its chat. Ask for everything you need in one question, because each call spends quota:

  • Over the last 3 days, which 10 URLs had the most rage clicks, and on which devices?
  • How did sessions, pages per session and scroll depth compare between mobile and desktop yesterday?
  • Find recordings from the last 2 days where visitors rage-clicked on /checkout. Give me the five most recent playback links.
  • Which pages have the most script errors this week, broken down by browser?
  • How do I mask a form field in Clarity?

The Clarity toolkit page lists every action.

What the data covers

The toolkit doesn't call Clarity's Data Export API. Microsoft's Clarity server answers a question in plain English, so Clarity decides which days and rows an answer covers. The Data Export API's documented limits (1 to 3 days, three breakdowns, 1,000 rows) belong to that API, not to these actions.

  • Ask for 3 days or less when the answer has to be complete. Microsoft's announcement of the server described up to 3 days of data and up to three breakdowns per request. Its current documentation shows questions about "the last week" but doesn't restate a limit.
  • list_session_recordings returns at most 250 recordings per call. Microsoft's server refuses a larger count. If you get back exactly as many as you asked for, there may be more: split the date range and ask again.
  • Recording dates are in UTC. Name the dates in a dashboard question too, rather than relying on "today" or "yesterday".

Clarity keeps session recordings for 30 days. Favorited recordings last longer, so favorite the ones you want to keep.

Troubleshooting

"An error occurred while fetching the data."

Microsoft's server gives this one sentence for every failed request, whatever the cause, so the agent can't tell you which it was. Check these in order:

  1. The daily limit. If the project has already used its 10 requests today, every call fails until the next day. Combine questions: "traffic and dead clicks by device over 3 days" is one call, not two.
  2. The token. It may have been deleted, replaced or issued by a different project. Generate a new one as a project admin (step 1) and paste it into the toolkit's credentials. Microsoft recommends replacing tokens promptly when someone with access leaves the project.
  3. Clarity itself. If a new token and a fresh day don't help, Clarity may be failing on its side. Try again later rather than in a loop: if the real cause was the daily limit, every retry fails the same way.
"No Clarity API token provided."

The install has no token. Paste one into the toolkit's credentials (step 2).

The numbers are from the wrong site.

The token belongs to a different Clarity project. Each project needs its own install.

A recording link from a few weeks ago no longer plays.

Recordings older than 30 days are deleted unless they were favorited.

Questions

Does the Clarity server run on my computer?

No. It runs in Toolspoke's hosted sandbox. You don't install Node or anything else locally.

Can an agent change my Clarity settings or tracking?

No. The toolkit only has the 3 read actions above, and nothing else is reachable through it.

Can one install cover all my Clarity projects?

No. A Data Export token belongs to one project, so install the toolkit once per project.

Will the token keep working?

Microsoft has said that token sign-in for its Clarity server is being deprecated in favour of signing in with a Clarity account, and hasn't given a date. Toolspoke runs a fixed version of the server that takes a token, so a new release can't change how your install signs in. If Clarity stops accepting tokens, every call fails with the error above even with a fresh token.

Connect Microsoft Clarity to Toolspoke

Install Microsoft Clarity in a project, give it to an agent, and every call is checked and logged.