Skip to main content
Glama
CallRail MCP

CallRail MCP

by pghdma

call_stats

Read-onlyIdempotent

Aggregate call totals and selected metrics server-side by source, campaign, keyword, or other dimensions for date ranges and filters, avoiding pagination through individual calls.

Instructions

Server-side call aggregation via CallRail's /calls/summary.json.

One request instead of paginating every call. Prefer this over call_summary (which fetches and counts calls client-side) when you only need grouped totals. call_summary remains useful for metrics this endpoint doesn't expose (first-time vs repeat split, per-source-name breakdown, exact duration sums).

Args: group_by: Dimension to group by. One of: 'source', 'keywords', 'campaign', 'referrer', 'landing_page', 'company'. days: Lookback (default 30). Ignored if start_date given. start_date / end_date: 'YYYY-MM-DD'. Explicit dates win. company_id: Filter to one company. fields: Comma-separated metrics, e.g. 'total_calls,missed_calls,answered_calls,first_time_callers, average_duration,leads'. Default: total_calls only. account_id: Auto-resolves if omitted.

Returns: JSON string with start_date, end_date, time_zone, total_results and grouped_results[] ({key, }).

Server-side filters (documented, live-verified 2026-10-05): answer_status ('answered' | 'missed' | 'voicemail'; missed includes voicemail), direction, device, lead_status ('good_lead' | 'not_a_lead' | 'not_scored'), first_time_callers, min_duration / max_duration (seconds), tags (any of), tracker_ids, search (phone fragment, name, note, source) and time_zone (IANA; also sets "today" for days). fields is validated against VALID_CALL_STATS_FIELDS.

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": "call_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
tagsNo
deviceNo
fieldsNo
searchNo
end_dateNo
group_byNosource
directionNo
time_zoneNo
account_idNo
company_idNo
start_dateNo
lead_statusNo
tracker_idsNo
max_durationNo
min_durationNo
answer_statusNo
first_time_callersNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv1.3.2
    • addedInput schema / properties / answer_status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Answer Status"
      +}
    • addedInput schema / properties / device
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Device"
      +}
    • addedInput schema / properties / direction
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Direction"
      +}
    • addedInput schema / properties / first_time_callers
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "First Time Callers"
      +}
    • addedInput schema / properties / lead_status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Lead Status"
      +}
    • addedInput schema / properties / max_duration
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Duration"
      +}
    • addedInput schema / properties / min_duration
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Min Duration"
      +}
    • addedInput schema / properties / search
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Search"
      +}
    • addedInput schema / properties / tags
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tags"
      +}
    • addedInput schema / properties / time_zone
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Time Zone"
      +}
    • addedInput schema / properties / tracker_ids
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Tracker Ids"
      +}
  2. Addedv1.0.4

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and a closed-world scope, so the safety profile is covered. The description adds real behavioral value beyond that — single-request aggregation instead of pagination, date-precedence rules, field validation against VALID_CALL_STATS_FIELDS, and the non-obvious side effect that time_zone also shifts what 'today' means for days. However, it omits return shape for aggregate metrics, so the gap is partially filled.

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-loaded with purpose and alternative, then Args, Returns, and a filter block — a clean scannable structure. A few lines are dense but earn their place; the 'live-verified 2026-10-05' note and some redundancy between the Args and filter prose keep it from a 5.

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

Completeness5/5

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

For an 18-parameter, zero-required read tool with an output schema, the description is complete enough to invoke correctly: it covers precedence rules, defaults, filter semantics, and return keys. No unresolved ambiguity remains.

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

Parameters5/5

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

With 0% schema description coverage across 18 parameters, the description carries the full burden and does: group_by enumerates all six dimensions, fields lists example metric names and the default (total_calls only), days documents its default and precedence, and the filter block enumerates answer_status, lead_status, duration units in seconds, tags as 'any of', and search semantics. This is exactly the compensation needed.

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 ('Server-side call aggregation via CallRail's /calls/summary.json') and immediately names the sibling it competes with, call_summary, explaining the mechanical difference (server-side vs client-side counting). An agent can pick between the two without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit selection rule: prefer this over call_summary when you only need grouped totals, and use call_summary for first-time vs repeat split, per-source-name breakdown, and exact duration sums. It also states argument precedence (days ignored if start_date given; explicit dates win; account_id auto-resolves).

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