Skip to main content
Glama
CallRail MCP

CallRail MCP

by pghdma

form_stats

Read-onlyIdempotent

Retrieve CallRail form-submission totals for a date range, company, or account, and optionally group results by source, campaign, form name, or lead status to analyze lead sources.

Instructions

Server-side form-submission totals via /forms/summary.json.

Args: 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. account_id: Auto-resolves if omitted.

Returns: JSON string with start_date, end_date, time_zone, and total_results (e.g. {"total_forms": N}).

group_by ('source' | 'keywords' | 'campaign' | 'referrer' | 'landing_page' | 'form_name' | 'company') returns grouped_results; fields (comma-separated) selects additional summary fields; lead_status, tags and time_zone filter as on call_stats.

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

Input Schema

NameRequiredDescriptionDefault
daysNo
tagsNo
fieldsNo
end_dateNo
group_byNo
time_zoneNo
account_idNo
company_idNo
start_dateNo
lead_statusNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.3.2
    • addedInput schema / properties / fields
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Fields"
      +}
    • addedInput schema / properties / group_by
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Group By"
      +}
    • addedInput schema / properties / lead_status
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Lead Status"
      +}
    • 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"
      +}
  2. Addedv1.0.4

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive, closed-world behavior. The description adds useful operational details beyond that: date precedence (days ignored when start_date is given), account_id auto-resolution, grouped output behavior, and comma-separated fields.

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?

The purpose is front-loaded, followed by structured Args and Returns sections. It is dense but appropriate for 10 parameters; the Returns block overlaps with the output schema but remains brief.

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 10-parameter aggregate tool with an output schema and clear annotations, the description is nearly complete: it covers purpose, every parameter, precedence, and grouping. It stops short of tool-selection guidance and permission or authentication context.

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?

With 0% schema description coverage, the description does substantial work: it documents defaults, YYYY-MM-DD formatting, precedence, filter IDs, group_by allowed values, and fields syntax. The weaker point is tags, lead_status, and time_zone, which are only described as filtering 'as on call_stats', leaving their exact semantics to a sibling.

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?

The description states a specific verb and resource: it returns server-side form-submission totals via /forms/summary.json. That makes the aggregate/stats nature clear, though it does not contrast with list_form_submissions or other stats siblings.

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

Usage Guidelines3/5

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

There is no explicit when-to-use or when-not guidance. The reference to call_stats is about parameter filtering behavior, not about selecting this tool, so usage is only implied by the stats/summary framing.

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