Skip to content

Agreement programs: sign, terminate

The Agreement Verbs sign, terminate as MCP do programs, with inputs, result, refusals and an example.

Reference for Agreement, one group of Agreement programs.

Agreement.sign

Sign executes an Agreement for one Party and records the signature, the signer and the time. Verb page.

Text
do: return await $.Agreement.sign(input)

Emits Agreement.signed.

Inputs

InputTypeRequiredDescription
agreementAgreementrequiredThe Agreement to sign.

Returns

OutputTypeRequiredDescription
agreementAgreementrequiredThe Agreement, in force once every party signs.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse 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.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.Agreement.sign({ agreement: 'agreement_zHIUnX8LwY' })"
  }
}

Agreement.terminate

Terminate ends an Agreement under its own term, records the reason and the date, and keeps the signed record. Verb page.

Text
do: return await $.Agreement.terminate(input)

Emits Agreement.terminated.

Inputs

InputTypeRequiredDescription
agreementAgreementrequiredThe Agreement in force.
reasontextrequiredThe term it ends under and why.

Returns

OutputTypeRequiredDescription
agreementAgreementrequiredThe terminated Agreement, kept forever.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
The record changed since it was read, so the write would overwrite a newer version.conflictRead the record again, then retry the write against its current state.None.
The record is not in a state that allows this Verb, so the call is refused.refusedRead the record, run the Verb that moves it to an allowed state, then retry.None.

Example

JSON
{
  "name": "do",
  "arguments": {
    "code": "return await $.Agreement.terminate({ agreement: 'agreement_zHIUnX8LwY', reason: 'Example reason' })"
  }
}