Deal programs: propose, win
The Deal Verbs propose, win as MCP do programs, with inputs, result, refusals and an example.
Reference for Deal, one group of Deal programs.
Deal.propose
Propose sends a Deal’s buyer a Quote they accept to place an Order. Verb page.
do: return await $.Deal.propose(input)Emits Deal.proposed.
Inputs
Returns
| Output | Type | Required | Description |
|---|---|---|---|
deal | Deal | required | The Deal with its Quote out. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Deal.propose({ deal: 'deal_NgACZ6DcII', quote: 'qt_GZnH5OK100' })"
}
}Deal.win
Win closes a Deal as won, which places its Order and makes the buyer a Customer. Verb page.
do: return await $.Deal.win(input)Emits Deal.won.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
deal | Deal | required | The proposed Deal. |
Returns
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.Deal.win({ deal: 'deal_NgACZ6DcII' })"
}
}