Skip to main content
Glama
CallRail MCP

CallRail MCP

by pghdma

spam_detector

Idempotent

Detect likely spam calls by scoring duration, unanswered status, and repeated callers, then optionally tag flagged calls for review.

Instructions

Heuristically identify likely-spam calls and (optionally) tag them.

Spam scoring (additive): +2 if duration < 10 seconds +1 if not answered +1 if first_call AND duration < 30 seconds +1 if same caller appears >=3 times in window (likely auto-dialer) A call scoring >= 3 is flagged as likely spam.

Args: company_id: Restrict to one company (recommended). days: Lookback window (1-90; 90 is hard-capped to avoid memory blowup on high-volume clients: full call list is materialized for scoring before truncating the response). auto_tag: If True, ADD tag_name to each likely-spam call after the scan. Default False (preview only). Note: we deliberately do NOT mark calls as spam=True automatically: CallRail HIDES spam-flagged calls from default GET endpoints, so self-reviewing them later becomes painful. Tag first, manually spam-flag if confirmed. tag_name: The tag to add when auto_tag=True. Default 'auto_detected_spam'. Auto-creates the tag at company level if it doesn't exist (CallRail's behavior). account_id: Auto-resolves if omitted.

Returns: - score breakdown by call - histogram of caller phone numbers (so you can spot a single dialer hammering you) - if auto_tag: count tagged + failures

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

Input Schema

NameRequiredDescriptionDefault
daysNo
auto_tagNo
tag_nameNoauto_detected_spam
account_idNo
company_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=false, destructiveHint=false, and idempotentHint=true, and the description adds genuinely new behavioral context: CallRail hides spam-flagged calls from default GET endpoints, tags are auto-created at company level, and the 90-day cap exists because the full call list is materialized. Return-format details are partly covered by the output schema, so the description's real added value is the hiding behavior and auto-creation side effects.

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 the purpose, then structured scoring rules, args, and returns. The scoring breakdown is dense but load-bearing since it explains when a call gets flagged. A few lines (e.g. the memory rationale) could be trimmed, but nothing is filler.

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?

Covers detection criteria, side effects, defaults, hard limits, and return contents for a five-parameter tool with a mutation path. Even though an output schema exists, the brief Returns section complements it without redundancy, leaving nothing essential for a correct invocation unstated.

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 0%, so the description carries the full burden and mostly succeeds: it explains days as a 1-90 capped lookback with a stated reason, auto_tag as an additive tag after the scan, tag_name defaults and auto-creation, company_id scoping, and account_id auto-resolution. It is missing only explicit format/type hints that would be redundant, so a 4 rather than a 5.

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 ('Heuristically identify likely-spam calls') plus the optional side effect ('optionally tag them'). An agent can immediately tell this apart from add_call_tags or bulk_update_calls, since the detection logic and criteria are named rather than implied.

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 operational guidance: company_id is 'recommended', auto_tag defaults to preview-only, and the reader is told to tag first and spam-flag manually if confirmed. It stops short of explicitly naming a sibling alternative for pure tag-writing, so it is strong but not fully routed against alternatives.

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