defrr is an MCP server published by com.defrr, hosted at defrr.com. When last checked on 2026-11-22 it was working: it answers and lists its tools. It declares 9 tools, including defrr_create_contract, defrr_create_waterfall, defrr_process_renewal, defrr_reprice_renewal, defrr_reprice_contract.
RevRec schedules, renewals, credits, usage pricing, multi-currency, back-dated. Saves drafts.
201 connections through 5 shared values. Tap any node.
Inferred from the host name and headers: what a server runs on, not who runs it.
Use when a new deal is signed and you need its revenue and billing schedule worked out from the terms, without saving it anywhere. Returns every month's billing, revenue and deferred balance, and the contract's totals. For a deal priced in a foreign currency, send currency and exchangeRate and the term prices in that currency. For a contract that started in months that are already closed (a back-dated contract), pass lockedThrough: the months from its start through that month are caught up as one lump of revenue in the first open month, the way defrr's app does, and the result says how much (foreign currency works; a single-term contract needs a quantity of 1, renewals are fine). Nothing is corrected, credited or saved: to record the contract in the user's defrr organization, use defrr_save_contract instead, if you have it. Costs 1 credit (refunded if it fails).
| Parameter | Type | Description |
|---|---|---|
| currency | string | Only when the deal is priced in a foreign currency: its three-letter code, such as EUR. Then every term's price is in that currency. |
| schedule * | object |
None yet. Changes appear after a server's second daily check.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
| The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false. |
| exchangeRate | number | Required with currency: how much of the organization's base currency ONE unit of that currency is worth (1 EUR = 1.8 NZD is 1.8). The schedule and totals come back in the base currency, with the foreign prices beside them. |
| lockedThrough | string | Only for a back-dated contract: the latest closed month, as YYYY-MM (it must be on or after the contract's start month and before its last month). Revenue for the months through it is recognised together in the next month. |
{
"name": "defrr_create_contract",
"title": "Create a contract",
"description": "Use when a new deal is signed and you need its revenue and billing schedule worked out from the terms, without saving it anywhere. Returns every month's billing, revenue and deferred balance, and the contract's totals. For a deal priced in a foreign currency, send currency and exchangeRate and the term prices in that currency. For a contract that started in months that are already closed (a back-dated contract), pass lockedThrough: the months from its start through that month are caught up as one lump of revenue in the first open month, the way defrr's app does, and the result says how much (foreign currency works; a single-term contract needs a quantity of 1, renewals are fine). Nothing is corrected, credited or saved: to record the contract in the user's defrr organization, use defrr_save_contract instead, if you have it. Costs 1 credit (refunded if it fails).",
"inputSchema": {
"type": "object",
"required": [
"schedule"
],
"properties": {
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only when the deal is priced in a foreign currency: its three-letter code, such as EUR. Then every term's price is in that currency."
},
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
},
"exchangeRate": {
"type": "number",
"description": "Required with currency: how much of the organization's base currency ONE unit of that currency is worth (1 EUR = 1.8 NZD is 1.8). The schedule and totals come back in the base currency, with the foreign prices beside them.",
"exclusiveMinimum": 0
},
"lockedThrough": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "Only for a back-dated contract: the latest closed month, as YYYY-MM (it must be on or after the contract's start month and before its last month). Revenue for the months through it is recognised together in the next month."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when you need the deferred revenue roll-forward for a set of contracts: send up to 50 contracts' terms and get back, for each contract and for all of them together, every month's billing, revenue and ending deferred balance (opening deferred balance + billing - revenue = ending). Each contract is built like defrr_create_contract. Everything or nothing: if one contract is rejected the call fails and nothing is charged. Costs 1 credit per contract (refunded if it fails). Nothing you send is stored. For more than 50 contracts, send them in batches of up to 50, each saying which batch it is (batch: number and of) and passing in the carry returned by the batch before; the last batch returns grandTotal for all of them. For a very large set, call the REST API from a script instead of through the model.
| Parameter | Type | Description |
|---|---|---|
| batch | object | Only when sending more than 50 contracts in several calls: which call this is. Send batch 1 first, then 2, and so on, in order. |
| carry | string | From batch 2 on: the carry returned by the previous batch, passed back exactly as it was given. Not used on batch 1. |
| shape | string | 'wide' (the default) gives each contract's months as lists. 'rows' gives one row per contract per month, ready for a spreadsheet or a database. |
| contracts * | array | The contracts to include, up to 50. Each is charged 1 credit. |
{
"name": "defrr_create_waterfall",
"title": "Create a revenue waterfall for several contracts",
"description": "Use when you need the deferred revenue roll-forward for a set of contracts: send up to 50 contracts' terms and get back, for each contract and for all of them together, every month's billing, revenue and ending deferred balance (opening deferred balance + billing - revenue = ending). Each contract is built like defrr_create_contract. Everything or nothing: if one contract is rejected the call fails and nothing is charged. Costs 1 credit per contract (refunded if it fails). Nothing you send is stored. For more than 50 contracts, send them in batches of up to 50, each saying which batch it is (batch: number and of) and passing in the carry returned by the batch before; the last batch returns grandTotal for all of them. For a very large set, call the REST API from a script instead of through the model.",
"inputSchema": {
"type": "object",
"required": [
"contracts"
],
"properties": {
"batch": {
"type": "object",
"required": [
"number",
"of"
],
"properties": {
"of": {
"type": "integer",
"maximum": 400,
"minimum": 1,
"description": "How many batches there are in all."
},
"number": {
"type": "integer",
"minimum": 1,
"description": "This batch's position, starting at 1."
}
},
"description": "Only when sending more than 50 contracts in several calls: which call this is. Send batch 1 first, then 2, and so on, in order."
},
"carry": {
"type": "string",
"description": "From batch 2 on: the carry returned by the previous batch, passed back exactly as it was given. Not used on batch 1."
},
"shape": {
"enum": [
"wide",
"rows"
],
"type": "string",
"description": "'wide' (the default) gives each contract's months as lists. 'rows' gives one row per contract per month, ready for a spreadsheet or a database."
},
"contracts": {
"type": "array",
"items": {
"type": "object",
"required": [
"schedule"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Your own reference for the contract (a customer or contract id). Returned with its rows so you can match them up. Optional; each must be different."
},
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
}
}
},
"maxItems": 50,
"minItems": 1,
"description": "The contracts to include, up to 50. Each is charged 1 credit."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when customers renew and you need the renewal worked out: send each contract's terms as they stand, and the renewal's end date and the price for the renewal term. Returns the renewal term and how its price compares with the term before it (in total and per month, since a renewal can be a different length), the billing entry to post, the revised month-by-month schedule, and the total to post by month. With the latest closed month, a renewal processed after it started has its billing and catch-up revenue posted in the first open month instead. The renewal is recognised on the contract's own basis: a different basis is a new contract (defrr_create_contract). Up to 50 renewals per call, each with your own id. Costs 1 credit per renewal (refunded if the call fails). Nothing you send is stored.
| Parameter | Type | Description |
|---|---|---|
| renewals * | array | The renewals to process, up to 50. Each is charged 1 credit. |
| lockedThrough | ["string","null"] | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |
{
"name": "defrr_process_renewal",
"title": "Process renewals",
"description": "Use when customers renew and you need the renewal worked out: send each contract's terms as they stand, and the renewal's end date and the price for the renewal term. Returns the renewal term and how its price compares with the term before it (in total and per month, since a renewal can be a different length), the billing entry to post, the revised month-by-month schedule, and the total to post by month. With the latest closed month, a renewal processed after it started has its billing and catch-up revenue posted in the first open month instead. The renewal is recognised on the contract's own basis: a different basis is a new contract (defrr_create_contract). Up to 50 renewals per call, each with your own id. Costs 1 credit per renewal (refunded if the call fails). Nothing you send is stored.",
"inputSchema": {
"type": "object",
"required": [
"renewals"
],
"properties": {
"renewals": {
"type": "array",
"items": {
"type": "object",
"required": [
"schedule",
"renewal"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Your own reference for the renewal (a contract or renewal id). Returned with its result so you can match them up. Optional; each must be different."
},
"renewal": {
"type": "object",
"required": [
"endDate",
"priceForRenewalTerm"
],
"properties": {
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. The renewal term's end date: after the contract's current last end date."
},
"exchangeRate": {
"type": "number",
"description": "Required when the schedule has a currency: how much of your base currency one unit of it is worth on the renewal's start date. priceForRenewalTerm is then in that currency.",
"exclusiveMinimum": 0
},
"priceForRenewalTerm": {
"type": "number",
"description": "The renewal term's own total price (not a monthly or yearly rate, and not an increase): a renewal can be shorter or longer than the term before it.",
"exclusiveMinimum": 0
}
},
"description": "The renewal. It starts the day after the contract's last term ends."
},
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
},
"exchangeRate": {
"type": "number",
"description": "With currency: how much of your base currency ONE unit of the foreign currency was worth when this term was booked. Corrections use it, so they agree with what was billed.",
"exclusiveMinimum": 0
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only for a contract priced in a foreign currency: its code, such as EUR. Every term's price is then in that currency, and each term needs an exchangeRate."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"exchangeRate": {
"type": "number",
"description": "With currency: the rate for every term that has none of its own.",
"exclusiveMinimum": 0
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
}
}
},
"maxItems": 50,
"minItems": 1,
"description": "The renewals to process, up to 50. Each is charged 1 credit."
},
"lockedThrough": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when a renewal was priced too high and needs a credit. Returns the credit note, the revenue to reverse for months already closed, and the corrected revenue month by month. Costs 2 credits (refunded if it fails).
| Parameter | Type | Description |
|---|---|---|
| schedule * | object | The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false. |
| termIndex * | integer | Which term: 1 is the first renewal, 2 the second, and so on. Only the latest renewal can be corrected for now, so give the position of the last term. |
| lockedThrough | ["string","null"] | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |
| correctedPrice * | number | What the renewal should have cost, in the schedule's currency. Must be lower than its current price. |
{
"name": "defrr_reprice_renewal",
"title": "Reprice a renewal",
"description": "Use when a renewal was priced too high and needs a credit. Returns the credit note, the revenue to reverse for months already closed, and the corrected revenue month by month. Costs 2 credits (refunded if it fails).",
"inputSchema": {
"type": "object",
"required": [
"schedule",
"termIndex",
"correctedPrice"
],
"properties": {
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
},
"exchangeRate": {
"type": "number",
"description": "With currency: how much of your base currency ONE unit of the foreign currency was worth when this term was booked. Corrections use it, so they agree with what was billed.",
"exclusiveMinimum": 0
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only for a contract priced in a foreign currency: its code, such as EUR. Every term's price is then in that currency, and each term needs an exchangeRate."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"exchangeRate": {
"type": "number",
"description": "With currency: the rate for every term that has none of its own.",
"exclusiveMinimum": 0
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
},
"termIndex": {
"type": "integer",
"minimum": 1,
"description": "Which term: 1 is the first renewal, 2 the second, and so on. Only the latest renewal can be corrected for now, so give the position of the last term."
},
"lockedThrough": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed."
},
"correctedPrice": {
"type": "number",
"minimum": 0,
"description": "What the renewal should have cost, in the schedule's currency. Must be lower than its current price."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when the contract's ORIGINAL term (its first term, before any renewal) was priced too high and needs a credit. Renewals keep their own prices; to correct a renewal use defrr_reprice_renewal. Returns the credit note, the revenue to reverse for months already closed, and the corrected revenue month by month. Costs 2 credits (refunded if it fails).
| Parameter | Type | Description |
|---|---|---|
| schedule * | object | The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false. |
| lockedThrough | ["string","null"] | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |
| correctedPrice * | number | What the original term should have cost, in the schedule's currency. Must be lower than its current price. |
{
"name": "defrr_reprice_contract",
"title": "Reprice the original term of a contract",
"description": "Use when the contract's ORIGINAL term (its first term, before any renewal) was priced too high and needs a credit. Renewals keep their own prices; to correct a renewal use defrr_reprice_renewal. Returns the credit note, the revenue to reverse for months already closed, and the corrected revenue month by month. Costs 2 credits (refunded if it fails).",
"inputSchema": {
"type": "object",
"required": [
"schedule",
"correctedPrice"
],
"properties": {
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
},
"exchangeRate": {
"type": "number",
"description": "With currency: how much of your base currency ONE unit of the foreign currency was worth when this term was booked. Corrections use it, so they agree with what was billed.",
"exclusiveMinimum": 0
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only for a contract priced in a foreign currency: its code, such as EUR. Every term's price is then in that currency, and each term needs an exchangeRate."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"exchangeRate": {
"type": "number",
"description": "With currency: the rate for every term that has none of its own.",
"exclusiveMinimum": 0
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
},
"lockedThrough": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed."
},
"correctedPrice": {
"type": "number",
"minimum": 0,
"description": "What the original term should have cost, in the schedule's currency. Must be lower than its current price."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when the latest renewal is cancelled and refunded in full. Returns the credit note, the reversal for closed months and the revenue month by month. Costs 2 credits (refunded if it fails).
| Parameter | Type | Description |
|---|---|---|
| schedule * | object | The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false. |
| termIndex * | integer | Which term: 1 is the first renewal, 2 the second, and so on. Only the latest renewal can be corrected for now, so give the position of the last term. |
| lockedThrough | ["string","null"] | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |
{
"name": "defrr_cancel_renewal",
"title": "Cancel a renewal",
"description": "Use when the latest renewal is cancelled and refunded in full. Returns the credit note, the reversal for closed months and the revenue month by month. Costs 2 credits (refunded if it fails).",
"inputSchema": {
"type": "object",
"required": [
"schedule",
"termIndex"
],
"properties": {
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
},
"exchangeRate": {
"type": "number",
"description": "With currency: how much of your base currency ONE unit of the foreign currency was worth when this term was booked. Corrections use it, so they agree with what was billed.",
"exclusiveMinimum": 0
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only for a contract priced in a foreign currency: its code, such as EUR. Every term's price is then in that currency, and each term needs an exchangeRate."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"exchangeRate": {
"type": "number",
"description": "With currency: the rate for every term that has none of its own.",
"exclusiveMinimum": 0
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
},
"termIndex": {
"type": "integer",
"minimum": 1,
"description": "Which term: 1 is the first renewal, 2 the second, and so on. Only the latest renewal can be corrected for now, so give the position of the last term."
},
"lockedThrough": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when a whole contract is voided and refunded. Reverses everything recognised in closed months and removes the rest. Costs 2 credits (refunded if it fails).
| Parameter | Type | Description |
|---|---|---|
| schedule * | object | The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false. |
| lockedThrough | ["string","null"] | The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed. |
{
"name": "defrr_cancel_contract",
"title": "Cancel a contract",
"description": "Use when a whole contract is voided and refunded. Reverses everything recognised in closed months and removes the rest. Costs 2 credits (refunded if it fails).",
"inputSchema": {
"type": "object",
"required": [
"schedule"
],
"properties": {
"schedule": {
"type": "object",
"required": [
"recognition",
"terms"
],
"properties": {
"terms": {
"type": "array",
"items": {
"type": "object",
"required": [
"endDate",
"price"
],
"properties": {
"price": {
"type": "number",
"minimum": 0,
"description": "The term's total price: for all its units, not per unit."
},
"endDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD."
},
"quantity": {
"type": "integer",
"minimum": 1,
"description": "Optional: how many units (seats) the term's total price covers, 1 if you leave it out. It doesn't change the schedule, which follows the total; it is recorded with the contract so its unit price can be seen."
},
"startDate": {
"type": "string",
"format": "date",
"description": "YYYY-MM-DD. Required on the first term; leave out on renewals."
},
"exchangeRate": {
"type": "number",
"description": "With currency: how much of your base currency ONE unit of the foreign currency was worth when this term was booked. Corrections use it, so they agree with what was billed.",
"exclusiveMinimum": 0
}
}
},
"maxItems": 12,
"minItems": 1,
"description": "The original term first, then each renewal in order."
},
"currency": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "Only for a contract priced in a foreign currency: its code, such as EUR. Every term's price is then in that currency, and each term needs an exchangeRate."
},
"recognition": {
"enum": [
"exact",
"smooth"
],
"type": "string",
"description": "How revenue is recognised: 'exact' per day, or 'smooth' as equal months."
},
"exchangeRate": {
"type": "number",
"description": "With currency: the rate for every term that has none of its own.",
"exclusiveMinimum": 0
},
"endDateIncluded": {
"type": "boolean",
"description": "Always send it. True if a term's end date is its last day (a year from 1 Mar 2026 ends 2027-02-28): use true unless the user's own dates show otherwise. False if the end date is the first day of the next term, as when the user gives the same calendar day a whole number of months later (10 Feb 2027 to 10 Feb 2028, so the last covered day is 9 Feb 2028). Defaults to true if left out."
}
},
"description": "The contract's terms. The first term needs a startDate; each later term (a renewal) starts the day after the previous one ends when endDateIncluded is true (the default), or on the day the previous one ends when it is false."
},
"lockedThrough": {
"type": [
"string",
"null"
],
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "The latest month already closed for changes, as YYYY-MM. Revenue in that month and earlier cannot be changed, so the correction is posted in the next month. Leave out or null if no month is closed."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use when customers are billed on what they use and you need the usage turned into what it costs, month by month. Send each customer-and-product's pricing (flat or volume tiers, a prepaid credit balance, or a hybrid: a fixed monthly fee with included units and a price per unit above them) and the quantity used in each month; get back each month's revenue, the total across all of them, and any prepaid overage (units beyond the balance, flagged and not priced). A hybrid line returns revenue (the fixed fee, which excludes overage), overage (units over the allowance, priced) and revenueInclOverage for each month. Without a startDate the allowance starts again each month you list. With a startDate (and dated usage entries) the cycles follow the contract's anniversary: the fee is booked in full in the month each cycle starts, whether or not anything was used, and the overage in the month the cycle ends; the response also lists each cycle. Quantities are what was used in that month, not a running total. Tiers price band by band, and the bands start again each month. Costs 1 credit per line (refunded if it fails). Nothing you send is stored.
| Parameter | Type | Description |
|---|---|---|
| lines * | array | The customer-and-product lines to price, up to 50. Each is charged 1 credit. |
| breakdown | boolean | True to list, for each flat or volume month, the units and amount in each band. Defaults to false. |
{
"name": "defrr_usage_billing",
"title": "Price usage",
"description": "Use when customers are billed on what they use and you need the usage turned into what it costs, month by month. Send each customer-and-product's pricing (flat or volume tiers, a prepaid credit balance, or a hybrid: a fixed monthly fee with included units and a price per unit above them) and the quantity used in each month; get back each month's revenue, the total across all of them, and any prepaid overage (units beyond the balance, flagged and not priced). A hybrid line returns revenue (the fixed fee, which excludes overage), overage (units over the allowance, priced) and revenueInclOverage for each month. Without a startDate the allowance starts again each month you list. With a startDate (and dated usage entries) the cycles follow the contract's anniversary: the fee is booked in full in the month each cycle starts, whether or not anything was used, and the overage in the month the cycle ends; the response also lists each cycle. Quantities are what was used in that month, not a running total. Tiers price band by band, and the bands start again each month. Costs 1 credit per line (refunded if it fails). Nothing you send is stored.",
"inputSchema": {
"type": "object",
"required": [
"lines"
],
"properties": {
"lines": {
"type": "array",
"items": {
"type": "object",
"required": [
"pricing",
"usage"
],
"properties": {
"id": {
"type": "string",
"maxLength": 64,
"minLength": 1,
"description": "Your own reference for the line (a customer and product). Returned with its months so you can match them up. Optional; each must be different."
},
"usage": {
"type": "array",
"items": {
"type": "object",
"required": [
"quantity"
],
"properties": {
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "The day the units were used, YYYY-MM-DD. Only with a startDate, on or after it."
},
"period": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "The month, YYYY-MM. Not used with a startDate."
},
"quantity": {
"type": "number",
"minimum": 0,
"description": "Units used in that month (or on that day): not a running total."
}
}
},
"maxItems": 1000,
"minItems": 0,
"description": "Without a startDate: the units used in each month, up to 24 months, one entry per month (a month listed twice is refused). With a startDate (hybrid): dated entries, up to 1000, each assigned to the contract cycle its date falls in; the same date may appear more than once and is added up."
},
"pricing": {
"type": "object",
"required": [
"model"
],
"properties": {
"cycle": {
"enum": [
"monthly"
],
"type": "string",
"description": "For hybrid: the cycle length. Only monthly is supported, and it is the default."
},
"model": {
"enum": [
"flat",
"volume",
"prepaid_credit",
"hybrid"
],
"type": "string",
"description": "flat and volume are both priced band by band, the way the defrr app prices them."
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"required": [
"price"
],
"properties": {
"limit": {
"type": [
"number",
"null"
],
"description": "The most units this tier covers in a month, counted from zero (so tiers of 100000 and 500000 mean the first 100000 units, then the next 400000). Null for the last tier.",
"exclusiveMinimum": 0
},
"price": {
"type": "number",
"minimum": 0,
"description": "Price per unit in this tier."
}
}
},
"maxItems": 20,
"minItems": 1,
"description": "For flat and volume: each tier prices only the units inside it. Exactly one tier, the last, has no limit (limit null)."
},
"baseFee": {
"type": "number",
"minimum": 0,
"description": "For hybrid: the fixed fee for each month listed. It is the month's revenue and excludes overage."
},
"unitPrice": {
"type": "number",
"minimum": 0,
"description": "For prepaid_credit: the price of one unit drawn down."
},
"includedUnits": {
"type": "number",
"minimum": 0,
"description": "For hybrid: the units each month's fee includes."
},
"openingBalance": {
"type": "number",
"minimum": 0,
"description": "For prepaid_credit: the units left before the first month listed. Defaults to 0."
},
"overageUnitPrice": {
"type": "number",
"minimum": 0,
"description": "For hybrid: the price of each unit above includedUnits in a month."
}
},
"description": "How the usage is priced. flat and volume use tiers; prepaid_credit uses unitPrice and openingBalance; hybrid uses baseFee, includedUnits and overageUnitPrice."
},
"through": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Hybrid with a startDate only: price every cycle that starts on or before this date, YYYY-MM-DD, including cycles with no usage. Defaults to the date of the last usage entry. To stop a subscription that has ended or isn't being paid, set it to the date it stopped or to the start of the last paid cycle."
},
"startDate": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Hybrid only: the date the contract starts, YYYY-MM-DD. The cycles then follow the contract: each starts on the anniversary of this date (the same day each month, or the month's last day when it has no such day). The fee is the revenue of the month a cycle starts in, in full and whether or not anything was used; the overage of a cycle falls in the month it ends in. With a startDate, usage entries carry a date instead of a period."
}
}
},
"maxItems": 50,
"minItems": 1,
"description": "The customer-and-product lines to price, up to 50. Each is charged 1 credit."
},
"breakdown": {
"type": "boolean",
"description": "True to list, for each flat or volume month, the units and amount in each band. Defaults to false."
}
}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Use to see how many credits the account has left before running a calculation. Free.
No parameters.
{
"name": "defrr_get_credit_balance",
"title": "Check your credit balance",
"description": "Use to see how many credits the account has left before running a calculation. Free.",
"inputSchema": {
"type": "object",
"properties": {}
},
"annotations": {
"readOnlyHint": true,
"openWorldHint": false
}
}defrr works out contract revenue and billing from the terms you send, with nothing stored. It can build a new contract's month-by-month schedule (defrr_create_contract) or the deferred revenue roll-forward for up to 50 contracts at a time, with their total (defrr_create_waterfall); process contract renewals, with the billing entry and any catch-up for closed months (defrr_process_renewal); price a customer's usage under flat, volume, prepaid-credit or fixed-fee-plus-overage pricing, month by month (defrr_usage_billing); and work out what a price correction or a cancellation does to a contract (the reprice and cancel tools). For a correction, send the contract's terms (dates and prices) and the latest month already closed for changes; defrr returns the credit note, the reversal to post for closed months, and the corrected revenue by month. Each calculation costs credits; defrr_get_credit_balance is free. A call that fails is refunded. This session has no API key, so the tools can be listed here but not called. Create a free key at https://defrr.com/developers/account and send it as 'Authorization: Bearer dfr_live_...' to run them.
Names, descriptions and schemas were written by the server and are shown as data.
Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators.