Skip to main content
Glama

Recover Revenue

recover_revenue
Read-onlyIdempotent

Use this after a specific revenue-loss event already happened and the caller needs the next recovery action. Returns a prioritized decision packet; KlearFlow sends no external message. Execution costs $0.05 via x402 Base USDC.

Input Schema

NameRequiredDescriptionDefault
industryNoOptional business industry or service category used to tailor the recovery action.
eventTypeYesSpecific revenue-loss event to recover: missed call, stale lead, unanswered quote, appointment no-show, or failed payment.
bookingUrlNoOptional booking URL to include in a recommended recovery message.
paymentUrlNoOptional secure payment-retry URL for payment_failed events.
businessNameNoOptional business name used to label the recovery packet.
priorAttemptsNoNumber of prior recovery outreach attempts already made.
preferredChannelNoPreferred recovery channel. Use auto to let KlearFlow select among SMS, email, or a human phone task.
customerFirstNameNoOptional customer first name used only when composing the recommended action text.
minutesSinceEventYesMinutes elapsed since the revenue-loss event occurred.
averageOpportunityValueNoEstimated gross value in USD of the customer opportunity.

Output Schema

NameRequiredDescriptionDefault
resultYesRecovery decision packet containing priority, recommended action, fallbacks, stop conditions, modeled economics, and safety boundaries.
paymentYes
proofIdYesUnique KlearFlow proof identifier for this settled paid execution.
priceUsdYesUSDC-denominated execution price settled through x402.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / businessName / description
      Added value: +"Optional business name used to label the recovery packet."
    • addedInput schema / properties / customerFirstName / description
      Added value: +"Optional customer first name used only when composing the recommended action text."
    • addedInput schema / properties / eventType / description
      Added value: +"Specific revenue-loss event to recover: missed call, stale lead, unanswered quote, appointment no-show, or failed payment."
    • addedInput schema / properties / industry / description
      Added value: +"Optional business industry or service category used to tailor the recovery action."
    • addedInput schema / properties / preferredChannel / description
      Added value: +"Preferred recovery channel. Use auto to let KlearFlow select among SMS, email, or a human phone task."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "payment": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "network": {
      +          "description": "Payment network identifier, currently Base mainnet eip155:8453.",
      +          "type": "string"
      +        },
      +        "payer": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Settled payer address when supplied by the payment facilitator."
      +        },
      +        "protocol": {
      +          "const": "x402",
      +          "type": "string"
      +        },
      +        "transaction": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Settlement transaction identifier when available."
      +        }
      +      },
      +      "required": [
      +        "protocol",
      +        "payer",
      +        "transaction",
      +        "network"
      +      ],
      +      "type": "object"
      +    },
      +    "priceUsd": {
      +      "description": "USDC-denominated execution price settled through x402.",
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "proofId": {
      +      "description": "Unique KlearFlow proof identifier for this settled paid execution.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "Recovery decision packet containing priority, recommended action, fallbacks, stop conditions, modeled economics, and safety boundaries.",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "proofId",
      +    "priceUsd",
      +    "payment",
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / averageOpportunityValue / description
      Added value: +"Estimated gross value in USD of the customer opportunity."
    • addedInput schema / properties / bookingUrl / description
      Added value: +"Optional booking URL to include in a recommended recovery message."
    • addedInput schema / properties / minutesSinceEvent / description
      Added value: +"Minutes elapsed since the revenue-loss event occurred."
    • addedInput schema / properties / paymentUrl / description
      Added value: +"Optional secure payment-retry URL for payment_failed events."
    • addedInput schema / properties / priorAttempts / description
      Added value: +"Number of prior recovery outreach attempts already made."
  3. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description reinforces this in domain terms: 'KlearFlow sends no external message', which is genuinely non-obvious for a tool named recover_revenue. It also discloses a real invocation constraint the annotations cannot express — a $0.05 charge settled via x402 Base USDC — plus that the output is a decision packet rather than a sent message.

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 short sentences, each doing distinct work: eligibility condition, output/side-effect guarantee, and cost. The most important routing constraint is front-loaded and there is no filler or restatement of the tool name.

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?

For a 10-parameter, fully documented schema with an output schema present, the description only needs to supply what structured fields cannot: timing eligibility, absence of external side effects, and the paid invocation cost. All three are covered, so an agent has everything required to select and call 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%, including enum values and per-parameter guidance, so the schema carries the full burden and the baseline 3 applies. The description adds no format, default, or interaction details beyond implying that eventType and minutesSinceEvent anchor the recovery decision.

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 the trigger and the output concretely: given a revenue-loss event that already occurred, it returns a prioritized recovery action packet. That is a specific behavior an agent can act on. It does not name or contrast the sibling tools (inspect_revenue_opportunity, route_task), so the agent must infer the boundary from the 'already happened' phrasing.

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?

The opening clause gives a clear usage condition: call this only after a specific revenue-loss event has occurred. This implicitly excludes pre-event inspection, which is the sibling's domain. However, no alternative tool is named explicitly and no exclusion is spelled out, so routing still requires 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.

Resources