Skip to main content
Glama

Rahul D Sarker: Marketing & RevOps Tools

Performance Marketing Margin Protector

performance_marketing_margin_protector
Read-onlyIdempotent

Calculate the break-even and maximum CPA that protect a target profit margin, and check current CPA against that ceiling. See the full version at https://rahuldsarker.co/calculators/performance-marketing-margin-protector

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aovYesAverage order / contract value
currencyNoISO 4217 code for money in the result, e.g. "USD", "INR", "EUR", "GBP". Omit to show plain numbers.
currentCpaYesCurrent CPA
grossMarginPctYesGross margin, as a percentage
targetProfitPctYesTarget profit margin to keep after ad cost, as a percentage

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
kindYes
toolYesThe calculator tool that produced this result
notesYes
titleYes
inputsYes
compactYes
metricsYesEvery "Label: value" line of the result; value is the first number on the line
currencyYes
benchmarksYesRule-of-thumb verdicts for the headline numbers
bookingUrlYes
calculatorYesSlug of the interactive calculator on rahuldsarker.co

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "ISO 4217 code for money in the result, e.g. \"USD\", \"INR\", \"EUR\", \"GBP\". Omit to show plain numbers.",
      +  "pattern": "^[A-Za-z]{3}$",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "benchmarks": {
      +      "description": "Rule-of-thumb verdicts for the headline numbers",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "band": {
      +            "type": "string"
      +          },
      +          "display": {
      +            "type": "string"
      +          },
      +          "metric": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "read": {
      +            "type": "string"
      +          },
      +          "segment": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "source": {
      +            "type": "string"
      +          },
      +          "target": {
      +            "type": "string"
      +          },
      +          "tone": {
      +            "enum": [
      +              "good",
      +              "ok",
      +              "warn",
      +              "bad"
      +            ],
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "metric",
      +          "name",
      +          "value",
      +          "display",
      +          "band",
      +          "tone",
      +          "read",
      +          "target",
      +          "segment",
      +          "source"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "bookingUrl": {
      +      "type": "string"
      +    },
      +    "calculator": {
      +      "description": "Slug of the interactive calculator on rahuldsarker.co",
      +      "type": "string"
      +    },
      +    "compact": {
      +      "type": "boolean"
      +    },
      +    "currency": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "inputs": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "kind": {
      +      "const": "calculator",
      +      "type": "string"
      +    },
      +    "metrics": {
      +      "description": "Every \"Label: value\" line of the result; value is the first number on the line",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "display": {
      +            "type": "string"
      +          },
      +          "label": {
      +            "type": "string"
      +          },
      +          "unit": {
      +            "anyOf": [
      +              {
      +                "enum": [
      +                  "currency",
      +                  "x",
      +                  "%",
      +                  "months"
      +                ],
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "value": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "label",
      +          "value",
      +          "unit",
      +          "display"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "notes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "tool": {
      +      "description": "The calculator tool that produced this result",
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "kind",
      +    "tool",
      +    "title",
      +    "calculator",
      +    "url",
      +    "bookingUrl",
      +    "currency",
      +    "compact",
      +    "inputs",
      +    "metrics",
      +    "notes",
      +    "benchmarks"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and closed-world scope, so safety is covered. The description adds useful behavioral context about the three computed outputs, but nothing about currency behavior, result format, or any constraints, so it is only modestly additive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is well front-loaded and information-dense, but the trailing external URL is promotional rather than invocation-relevant and consumes part of a very short description. Slightly wasteful rather than harmful.

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 and full parameter documentation, the description needs only to convey purpose and scenario, which it does. The missing piece is guidance on when to prefer this over the other CPA and ROAS calculators, which would complete it.

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 100%, so all five parameters (aov, grossMarginPct, targetProfitPct, currentCpa, currency) are already documented in the schema. The description adds no syntax, unit, or edge-case guidance beyond that, so the baseline 3 is appropriate.

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 specific verbs and a precise resource: break-even CPA, maximum CPA, and a check of current CPA against that ceiling. It is clearly a margin-protection CPA calculator, but it does not name or distinguish itself from the many nearby siblings (cpl_cpa_calculator, linkedin_ad_cost_threshold_calculator, roas_calculator), leaving the agent to infer the distinction.

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?

The implied use case (deciding whether current CPA fits inside a profit-margin ceiling) is readable from the description, but there is no explicit when-to-use/when-not-to-use statement and no pointer to an alternative tool for adjacent CPA questions. Usage must be inferred.

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.

Resources