# save_library_as_template

> Keep an AppliFlo library contract or official government form (a "lib_..." template_id from list_templates) as one of the workspace's OWN saved templates, as the app's Templates page does, so the workspace can edit its roles, settings and boxes.

Tool of the AppliFlo MCP server at `https://appliflo.com/api/mcp`. Kind: asks first: it changes something in your workspace, so clients ask you first.

Keep an AppliFlo library contract or official government form (a "lib_..." template_id from list_templates) as one of the workspace's OWN saved templates, as the app's Templates page does, so the workspace can edit its roles, settings and boxes. Only needed for that: to use a library item or form as it is, call create_from_template or send_template with its lib_ id directly. An item AppliFlo has set up (status ready) is copied by an owner or admin as a Ready template (mode copied), with its roles and boxes; a form's one-time set-up (business details, "Who sends this?") can then be given in the app or with update_template_settings. An official form AppliFlo hasn't set up (status draft), or any official form when a member saves it, is saved from the form's own fillable fields as a Draft template (mode saved_from_form, with `roles` if given) that an owner or admin sets up and finalises (set_template_roles, finalise_template). A member can't copy an AppliFlo contract (403). Returns `template` in get_template's shape (kind saved). An AppliFlo library contract no lawyer has reviewed is refused (409 contract_risk_required) until the person accepts the own-risk terms: ask them, then call again with risk_accepted: true.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `template_id` | string | yes | A library or official template_id ("lib_...") from list_templates. Up to 64 characters |
| `name` | string | no | The new template's name. Defaults to the item's title or the form's label. Up to 120 characters |
| `roles` | string[] | no | Saved from the form's fields only (mode saved_from_form): role names in signing order, e.g. ["Client", "Agent"]. A copy keeps AppliFlo's roles. Up to 4 items |
| `risk_accepted` | boolean | no | The person accepts AppliFlo's own-risk terms (Terms section 8A) for a library contract no lawyer has reviewed. Set it only after asking the person |
