Skip to main content
Glama
CallRail MCP

CallRail MCP

by pghdma

compare_periods

Read-onlyIdempotent

Compare current and previous N-day CallRail windows to return per-company minute and call deltas plus agency totals, highlighting growth, shrinkage, and invoice surprises.

Instructions

Compare current N-day window vs the previous N-day window.

Returns per-company minute / call deltas + agency-wide totals. Useful for "is Malick growing?", "did we lose Stewart traffic this month?", catching invoice surprises before they hit.

Args: days: Window length on each side (default 30 = roughly one cycle). Cap: 365 (don't ask for "5-year delta", likely a typo). account_id: Auto-resolves if omitted.

Returns: A breakdown showing current vs previous totals, % deltas, and per-company growth/shrink. Sorted by absolute minute change.

Implementation: pulls call data for both windows in one tool call. Tracker counts use current-snapshot for both periods (CallRail doesn't expose historical tracker counts); only minute deltas reflect actual period-over-period change.

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

Input Schema

NameRequiredDescriptionDefault
daysNo
account_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world safety, and the description adds non-obvious behavior beyond that: both windows are pulled in one call, and tracker counts use current-snapshot for both periods so only minute deltas reflect real period-over-period change. That caveat materially affects interpretation of results. No pagination/cost notes, but the key semantics limitation is disclosed.

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?

Front-loaded summary sentence, then clearly labeled Args/Returns/Implementation blocks with no filler. The quoted example questions are short and directly illustrate intent rather than padding.

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?

Output schema exists so return values are already covered, and the description still summarizes shape and sort order (absolute minute change). Both parameters and the main behavioral caveat are addressed; only lack of comparison guidance relative to sibling tools keeps it from a 5.

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?

Schema coverage is 0%, so the description carries the burden and does: days is defined as window length on each side with 30 ≈ one cycle and a hard cap of 365, and account_id is documented as auto-resolving when omitted. Both parameters gain meaning not present in the schema.

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

Purpose4/5

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

States a specific verb and comparison frame: 'Compare current N-day window vs the previous N-day window', plus the unit of output (per-company minute/call deltas + agency-wide totals). An agent can distinguish this from a plain snapshot tool like call_stats. It doesn't explicitly name a sibling alternative, which keeps it short of a 5.

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 concrete use cases ('is Malick growing?', spotting invoice surprises) and an explicit boundary: cap of 365 days with the reason a larger value is likely a typo. Missing only explicit routing away from point-in-time siblings such as call_stats or call_timeseries.

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