Skip to main content
Glama

JavaScript errors

get_errors
Read-onlyIdempotent

JavaScript errors visitors hit, grouped by name and message, with how many of those visitors didn't pay. Use to find errors that may block checkout on a page (path) or at a funnel step (funnel or steps + drop_step: the visitors who reached the step before drop_step and not drop_step, 0-based). group returns one group's sample stack and, with the visitors scope, the people who hit it. Needs JavaScript errors turned on in the website's settings (enabled says whether it is).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_errors"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day, YYYY-MM-DD (inclusive).
fromNoFirst day, YYYY-MM-DD (inclusive). Use with to.
pathNoOne page path, e.g. /checkout.
groupNoOne group's fingerprint (from a previous answer): its detail.
stepsNoFunnel steps, e.g. visit,page:/pricing,identify,payment, with drop_step (default funnel when omitted).
fieldsNoOptional: only these parts of the answer, as comma-separated dot paths (e.g. overview.current,series.date,series.visitors). Through a list a path applies to every item; period is always kept. An unknown top-level name fails with the list of valid ones. Leave out for the full answer.
funnelNoA saved funnel's ID, with drop_step.
periodNoPreset period, default 30d. today/yesterday/wtd/mtd follow the timezone. Ignored when from and to are set.
compareNoWhat change figures compare against: previous (default, the equal-length window right before), weekdays (the same length, starting whole weeks earlier on the same weekday, so Mondays compare with Mondays), year (same period last year), or a YYYY-MM-DD start (window keeps the period's length). Ignored for period all.
filtersNoUp to six visitor filters, all of which must match. op: is, is_not (exact); contains, not_contains, starts_with, ends_with (literal text, letter case ignored); regex, not_regex (case-insensitive regular expressions up to 200 characters, without lookarounds, backreferences or repeated groups like (a+)+); is_empty, is_not_empty (no values: send []; e.g. utmCampaign is_empty = visitors who never had a campaign); gt, lt and is for visits. dim urlParam also needs key, the URL parameter name (one of the site's kept parameters): {"dim":"urlParam","key":"plan","op":"is","values":["pro"]}. dim prop (event property) needs key, the property name, and optionally goal to look only at that goal's events; values match as text (numbers and true/false too), and a visitor matches with at least one such event: {"dim":"prop","key":"plan","goal":"signup","op":"is","values":["growth"]} (list_event_properties lists names and values). dim trait needs key, a person's identify trait (get_visitor_traits lists them): {"dim":"trait","key":"role","op":"is","values":["founder"]}. Other dimensions take no key or goal. A 400 filter_too_slow means the regex was too slow: simplify it.
timezoneNoIANA time zone for day boundaries and grouping, e.g. Europe/Madrid. Default UTC.
drop_stepNoThe funnel step (0-based) visitors failed to reach.
website_idNoWebsite ID from list_websites (the data-site-id value in the tracking script).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, and the description still adds real behavioral context: the site must have JavaScript error tracking enabled (enabled flag), and group mode returns a sample stack plus, with the visitors scope, the people who hit it. Missing details on result limits or pagination keep it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose in the first clause, then layers usage and mode notes. The nested parentheses around path/funnel/group make the middle sentence dense, though no sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter read tool with no output schema, it covers the essential shape of the answer (grouped errors plus non-paying visitor counts), the main modes, and the enablement prerequisite. It does not sketch the rest of the response object, but the richly documented schema offsets most of that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: drop_step is described as the step whose predecessor visitors reached and drop_step itself they did not (0-based), and group is described as a fingerprint from a previous answer. Other 11 parameters are left to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource: JavaScript errors visitors hit, grouped by name and message, plus the non-paying visitor count. That is specific enough for an agent to distinguish it from generic breakdown or traffic tools in the sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear when-to-use guidance: finding errors that may block checkout on a page (path) or at a funnel step (funnel/steps + drop_step), and explains what the group mode returns. It does not name an alternative tool or state when not to use it, so it falls short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources