{"serverId":"mcp-registry/io.github.revclamp/revclamp-mcp","tools":[{"name":"revclamp_evaluate_ghost_usage","fixed":{"name":"revclamp_evaluate_ghost_usage","description":"Evaluate whether a specific customer's AI or API usage event constitutes unpaid ghost usage across multi-subscription Stripe 2025-03-31.basil state, enforcing fail-closed pagination (has_more must be explicitly false) and configurable 0-14 day dunning grace windows. Executes as a stateless, read-only entitlement evaluator with zero side effects. Returns structuredContent containing ok, mode, statelessEphemeralAudit, tenantId, and evaluation (isGhostLeak, isGhostUsage, reason). Use this tool for ","inputSchema":{"type":"object","properties":{"demo":{"type":"boolean","description":"Optional simulation flag (boolean) for deterministic ghost-usage preview."},"timestamp":{"description":"Optional alias for occurredAt (ISO-8601 string, Unix epoch seconds, or Unix epoch milliseconds).","type":"string"},"customerId":{"type":"string","description":"Stripe customer identifier to evaluate (format example: 'cus_9s6XKzkNRiz8i3', max 64 chars)."},"occurredAt":{"description":"Optional usage event timestamp as ISO-8601 string, Unix epoch seconds, or Unix epoch milliseconds.","type":"string"},"usageEvent":{"type":"object","description":"Optional metered usage event object containing customer_id (or stripe_customer_id), event_name, and occurred_at (or occurred_at_sec)."},"occurred_at":{"description":"Optional snake_case alias for occurredAt (ISO-8601 string, Unix epoch seconds, or Unix epoch milliseconds).","type":"string"},"occurredAtSec":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Optional alias for usageTimestampSec: event timestamp as Unix epoch seconds, Unix epoch milliseconds, numeric string, or ISO-8601 string when the usage event occurred (used when usageTimestampSec is omitted)."},"subscriptions":{"description":"Optional Stripe customer subscriptions payload: either a Stripe list object ({ data: [...], has_more: false }) or a raw array of up to 50 subscription objects containing id, status ('active', 'trialing', 'past_due', 'canceled', 'unpaid'), current_period_end, or items.data[].current_period_end in Unix seconds.","type":"string"},"currentPeriodEnd":{"description":"Optional camelCase alias for current_period_end (Unix epoch seconds, epoch milliseconds, or ISO-8601 string).","type":"string"},"usageTimestampSec":{"anyOf":[{"type":"integer"},{"type":"string"}],"description":"Optional event timestamp as Unix epoch seconds, Unix epoch milliseconds, numeric string, or ISO-8601 string when the AI/API usage event occurred (defaults to current server Unix timestamp if omitted)."},"current_period_end":{"description":"Optional flat subscription current_period_end (Unix epoch seconds, epoch milliseconds, or ISO-8601 string).","type":"string"},"subscriptionStatus":{"type":"string","description":"Optional flat Stripe subscription status shorthand ('active', 'trialing', 'past_due', 'canceled', 'unpaid', 'incomplete', 'incomplete_expired', 'paused') when subscriptions is omitted."},"currentPeriodEndSec":{"type":"integer","minimum":1,"description":"Optional flat subscription current_period_end in Unix epoch integer seconds."},"subscription_status":{"type":"string","description":"Optional snake_case alias for subscriptionStatus."},"subscriptionsHasMore":{"type":"boolean","description":"Pagination completeness flag (boolean). Must be explicitly set to false when passing a raw subscriptions array so RevClamp can verify no active subscription was truncated on a later page."},"dunningGracePeriodDays":{"type":"integer","maximum":14,"minimum":0,"description":"Dunning grace window in integer days (valid range: 0 to 14, default: 3) after latest_invoice_failed_at during which past_due subscriptions remain entitled."},"latestInvoiceFailedAtSec":{"type":"integer","minimum":1,"description":"Optional flat latest_invoice_failed_at timestamp in Unix epoch integer seconds for past_due grace evaluation."},"latest_invoice_failed_at":{"description":"Optional flat latest_invoice_failed_at timestamp (Unix epoch seconds, epoch milliseconds, or ISO-8601 string).","type":"string"}},"additionalProperties":false},"annotations":{"title":"Evaluate Single-Customer Stripe Basil Ghost Usage","readOnlyHint":true,"openWorldHint":false,"idempotentHint":true,"destructiveHint":false},"title":"Evaluate Single-Customer Stripe Basil Ghost Usage"},"changes":[{"kind":"schema","detail":"Added \"type\":\"string\" to untyped parameters: timestamp, occurredAt, occurred_at, subscriptions, currentPeriodEnd, current_period_end, latest_invoice_failed_at. Change to number/boolean/array where that's what you accept.","verify":true}],"tokensBefore":1112,"tokensAfter":1143}],"toolsChanged":1,"tokensSaved":0,"todo":[],"note":"Deterministic fixes. Changes marked verify need a human look before shipping (renames, inferred annotations, inferred types, removed text). Parameter descriptions in `todo` need to be written by someone who knows the API."}