Skip to Content

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

NameTypeDescription
template_idrequiredstringA saved template's template_id from list_templates (kind saved).Up to 64 characters
rolesrequiredobject[]Every role, in signing order.1 to 10 items
keystringAn existing role's key to keep it (its boxes stay its own). Leave out for a new role.
labelrequiredstringThe role's name, e.g. Client. Each must differ.Up to 60 characters
kindrequiredstringsigner = fills and signs; filler = fills only.One of: signer, filler
colourstringDefaults to the role's own colour, or the first colour no other role uses.One of: blue, green, violet, teal, rose
party_typestringWhat 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_sourcestring | nullThe 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
}

On this page