Skip to main content
Glama

query_error_counts

Read-only

Retrieves crash and ANR error counts and distinct users over a date range, broken down by report type, with optional issue and dimension filters.

Instructions

Query absolute counts of error reports (crashes and ANRs) over time: errorReportCount and distinctUsers. Rows are always broken down by reportType (CRASH/ANR/NON_FATAL), which the API requires; add issueId to see which issues drive the volume, then use search_error_issues for details.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "query_error_counts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax rows to return (default: 50)
filterNoAIP-160 filter over dimensions, e.g. "versionCode = 415"
metricsNoMetrics to fetch (default: errorReportCount, distinctUsers)
end_dateYesEnd date (inclusive) as YYYY-MM-DD, e.g. '2026-08-13'
dimensionsNoBreak the metrics down by these dimensions, e.g. ['versionCode','deviceModel']
start_dateYesStart date (inclusive) as YYYY-MM-DD, e.g. '2026-08-01'
package_nameNoApp package name, e.g. 'com.acme.app' (defaults to GOOGLE_PLAY_PACKAGE_NAME)
aggregation_periodNoAggregation granularity (default: DAILY)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changedv0.3.0
    • changedInput schema / properties / dimensions / items / enum
      Previous value: -[
      -  "apiLevel",
      -  "versionCode",
      -  "deviceModel",
      -  "deviceBrand",
      -  "deviceType",
      -  "countryCode"
      -]New value: +[
      +  "apiLevel",
      +  "versionCode",
      +  "countryCode",
      +  "reportType",
      +  "issueId",
      +  "isUserPerceived",
      +  "deviceModel",
      +  "deviceBrand",
      +  "deviceType",
      +  "deviceRamBucket",
      +  "deviceSocMake",
      +  "deviceSocModel",
      +  "deviceCpuMake",
      +  "deviceCpuModel",
      +  "deviceGpuMake",
      +  "deviceGpuModel",
      +  "deviceGpuVersion",
      +  "deviceVulkanVersion",
      +  "deviceGlEsVersion",
      +  "deviceScreenSize",
      +  "deviceScreenDpi",
      +  "startType",
      +  "processName",
      +  "appState"
      +]
  3. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds non-obvious behavior beyond that: rows are always broken down by reportType because the API requires it, meaning agents can't get an ungrouped total — a real constraint not visible in annotations.

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

Conciseness5/5

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

A single tightly packed sentence chain with the metrics named up front, the implicit dimension constraint next, and the hand-off to search_error_issues last. No repeated schema content or 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?

With no output schema, the description names the returned metrics and the grouping structure, which is what an agent needs to interpret results. For an 8-parameter analytics tool, filter syntax and date formats are left to the fully documented schema, which is a reasonable division of labor.

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 baseline is 3, but the description adds meaning: it explains that the reportType dimension is effectively mandatory and that issueId is the parameter for attributing volume to specific issues, which the schema only lists as one enum value among many.

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 specific verb and resource ('Query absolute counts of error reports (crashes and ANRs) over time') and names the exact metrics returned (errorReportCount, distinctUsers). Explicitly contrasts with sibling search_error_issues, so an agent can pick between volume aggregation and issue detail without opening a schema.

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 a concrete sequencing rule: use this for volume, add issueId to see which issues drive it, then use search_error_issues for details. It doesn't state when to prefer siblings like query_crash_rate or search_error_reports, but the positive routing guidance is clear and actionable.

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