Skip to main content
Glama

Perpetuus CRM

Get Campaign Stats

crm_get_campaign_stats
Read-onlyIdempotent

Read stats for one campaign by documentId. WhatsApp sent is submission/acceptance, not delivery; delivered and read are separate receipt counters. Completion means dispatch finished, not that every message was delivered.

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": {
      "campaignId": "<campaignId>"
    },
    "name": "crm_get_campaign_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
campaignIdYes

Output Schema

NameRequiredDescriptionDefault
okYesAlways true on success; errors come with isError and no structuredContent.
dataYes
metaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "properties": {
      +            "data": {
      +              "anyOf": [
      +                {
      +                  "additionalProperties": true,
      +                  "properties": {
      +                    "delivered": {
      +                      "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/properties/total"
      +                    },
      +                    "error": {
      +                      "type": [
      +                        "string",
      +                        "null"
      +                      ]
      +                    },
      +                    "failed": {
      +                      "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/properties/total"
      +                    },
      +                    "pending": {
      +                      "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/properties/total"
      +                    },
      +                    "read": {
      +                      "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/properties/total"
      +                    },
      +                    "sent": {
      +                      "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/properties/total",
      +                      "description": "Submitted/accepted, not delivered."
      +                    },
      +                    "skipped": {
      +                      "$ref": "#/properties/data/anyOf/0/properties/data/anyOf/0/properties/total"
      +                    },
      +                    "total": {
      +                      "type": [
      +                        "number",
      +                        "null"
      +                      ]
      +                    }
      +                  },
      +                  "type": "object"
      +                },
      +                {
      +                  "type": "null"
      +                }
      +              ],
      +              "description": "Campaign counters."
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "meta": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "organizationDocumentId": {
      +          "description": "Organization documentId resolved from the credential.",
      +          "type": "string"
      +        },
      +        "requestId": {
      +          "description": "Request id (x-request-id or generated by the MCP server).",
      +          "type": "string"
      +        },
      +        "source": {
      +          "const": "perpetuus-crm-mcp",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "requestId",
      +        "source"
      +      ],
      +      "type": "object"
      +    },
      +    "ok": {
      +      "const": true,
      +      "description": "Always true on success; errors come with isError and no structuredContent.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "ok",
      +    "data",
      +    "meta"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description earns credit beyond that by disclosing metric semantics an agent cannot get from annotations: WhatsApp "sent" is submission/acceptance rather than delivery, delivered and read are separate counters, and completion means dispatch finished rather than full delivery.

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?

Three tight sentences, front-loaded with purpose, followed only by metric definitions that materially change how the output is read. No filler and nothing redundant.

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 an output schema present, the description rightly avoids explaining return values, and the annotations cover the safety profile. The metric-semantics notes close the main interpretive gap; what remains missing is behaviour on an unknown/invalid campaign ID and routing guidance versus sibling tools.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must carry the parameter. It does add that the value is a document identifier for a campaign, but it calls it "documentId" while the schema requires "campaignId" with a constrained character pattern, creating a naming mismatch rather than disambiguation.

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 uses a specific verb and resource ("Read stats for one campaign") and scopes it to a single campaign, which separates it from list/aggregate siblings like crm_get_dashboard_metrics. It stops short of naming the closely related crm_get_campaign as the alternative for campaign details, and it says "documentId" while the actual parameter is campaignId.

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?

Usage is implied rather than stated: an agent can infer this is for per-campaign statistics, but there is no explicit when-to-use/when-not or pointer to alternatives such as crm_get_campaign (entity lookup) or crm_get_automation_log_stats (automation scope). Adequate but leaves routing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.