set_template_roles
Replace a saved template's roles (the people who fill and sign it), in signing order, as the builder's Recipients step: 1 to 10.
destructiveSends, cancels or emails people. Clients ask you before running it.
What it does
Replace a saved template's roles (the people who fill and sign it), in signing order, as the builder's Recipients step: 1 to 10. A role passed with its existing key is kept (its boxes stay its own); one without a key is new and gets a fresh key; a role left out is removed and its boxes lose their owner (assign them in the app's builder before finalising). Read the current roles with get_template first. It changes the template's DRAFT of its next version (what the app's builder shows): sends keep using the current version until the draft is finalised (finalise_template, with expected_base_version = current_version from this result; issues with severity blocking must be fixed first). Owners and admins only (403 otherwise). Returns the draft's roles, settings and remaining issues.
Inputs
| Name | Type | Description |
|---|---|---|
template_idrequired | string | A saved template's template_id from list_templates (kind saved).Up to 64 characters |
rolesrequired | object[] | Every role, in signing order.1 to 10 items |
key | string | An existing role's key to keep it (its boxes stay its own). Leave out for a new role. |
labelrequired | string | The role's name, e.g. Client. Each must differ.Up to 60 characters |
kindrequired | string | signer = fills and signs; filler = fills only.One of: signer, filler |
colour | string | Defaults to the role's own colour, or the first colour no other role uses.One of: blue, green, violet, teal, rose |
party_type | string | What the party is (a tag beside the name). Defaults to the role's own, or one its name suggests.One of: applicant, applicant_secondary, director, sponsor, employer, employee, agent, witness, guarantor, guardian, interpreter, other |
crm_source | string | null | The CRM this role's contact is picked from at send; null = typed at send; leave out to keep it. |
Call it
Your MCP client builds this request for you. This is what it sends to https://appliflo.com/api/mcp, with the required inputs filled with placeholders.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_template_roles",
"arguments": {
"template_id": "<template_id>",
"roles": []
}
}
}Input schema
The JSON Schema the server lists for this tool in tools/list.
{
"type": "object",
"properties": {
"template_id": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "A saved template's template_id from list_templates (kind saved)."
},
"roles": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,39}$",
"description": "An existing role's key to keep it (its boxes stay its own). Leave out for a new role."
},
"label": {
"type": "string",
"maxLength": 60,
"description": "The role's name, e.g. Client. Each must differ."
},
"kind": {
"type": "string",
"enum": [
"signer",
"filler"
],
"description": "signer = fills and signs; filler = fills only."
},
"colour": {
"type": "string",
"enum": [
"blue",
"green",
"violet",
"teal",
"rose"
],
"description": "Defaults to the role's own colour, or the first colour no other role uses."
},
"party_type": {
"type": "string",
"enum": [
"applicant",
"applicant_secondary",
"director",
"sponsor",
"employer",
"employee",
"agent",
"witness",
"guarantor",
"guardian",
"interpreter",
"other"
],
"description": "What the party is (a tag beside the name). Defaults to the role's own, or one its name suggests."
},
"crm_source": {
"anyOf": [
{
"type": "string",
"enum": [
"globalyos",
"hubspot",
"agentcis",
"salesforce"
]
},
{
"type": "null"
}
],
"description": "The CRM this role's contact is picked from at send; null = typed at send; leave out to keep it."
}
},
"required": [
"label",
"kind"
],
"additionalProperties": false
},
"description": "Every role, in signing order."
}
},
"required": [
"template_id",
"roles"
],
"additionalProperties": false
}update_template_settings
Change a saved template's send settings, as the builder's Settings step: only the settings you pass change. routing (sequential = one role after another, parallel = everyone at once), subject and message (may use {{placeholders}} such as {{Recipient 1 name}}, {{Template name}}, {{Workspace}}), reminder_cadence, expiry_days (null = links never expire), warn_before_expiry, cc (replaces the fixed copies), sender_role ("Who sends this?": a role key from the template's roles, always the person sending; null = none of them; only the person's own choice, never guess it).
finalise_template
Finalise a saved template's draft as its next version, as the builder's Finalise: the draft's boxes, roles and settings become an unchangeable version with its own PDF copy, the template is Ready, and every send from now on uses it (envelopes already sent keep their version).