Skip to main content
Glama

Universal Data — x402 + MPP Payment Setup

api_commerce_campaign_roas

Read-onlyIdempotent

Calculate campaign ROAS, acquisition cost, conversion rate and net contribution from recorded ads, conversions and revenue. One call costs 0.01 USDC on Base x402; customer-owned provider credentials use X-Provider-Key header where needed.

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": {
      "ad_spend": "<ad_spend>",
      "clicks": "<clicks>",
      "orders": "<orders>",
      "revenue": "<revenue>"
    },
    "name": "api_commerce_campaign_roas"
  }
}

Input Schema

NameRequiredDescriptionDefault
clicksYesclicks; see operation description for units and format
ordersYesorders; see operation description for units and format
revenueYesrevenue; see operation description for units and format
ad_spendYesad spend; see operation description for units and format
goods_costNogoods cost; see operation description for units and format

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive, open-world operation. The description adds useful operational context beyond that: the 0.01 USDC x402 cost and the X-Provider-Key header for customer-owned provider credentials. It does not describe result format or error behavior, but the annotations already cover the safety profile.

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?

The definition is two focused sentences with no wasted wording. The core purpose is front-loaded, followed by cost and authentication details that an agent would need before calling the tool.

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 simple calculation tool with no output schema, the description names the outputs and gives payment/auth context, which is largely sufficient. The main gaps are the lack of units/currency and the absence of formula details for metrics such as net contribution, but these are relatively minor for invocation.

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 the schema already exposes all five parameters. The description implies the inputs by saying metrics are calculated from recorded ads, conversions, and revenue, but it does not clarify units, currency, or how goods_cost affects net contribution; this is the baseline level when the schema carries most of the burden.

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, 'Calculate', and names the exact metrics returned: campaign ROAS, acquisition cost, conversion rate, and net contribution. It is clear what the tool does, though it does not explicitly distinguish itself from sibling commerce/finance tools such as api_order_profit or api_live_revenue_attribution.

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

Usage Guidelines2/5

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

The description provides no explicit when-to-use or when-not-to-use guidance, and it does not name alternatives for related commerce or profit calculations. Any usage context must be inferred from the metric names alone.

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