# insert_clause

> Put a clause from the workspace's clause library (search_clauses) into a Doc, word for word, as Insert clause in the editor does.

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.

Put a clause from the workspace's clause library (search_clauses) into a Doc, word for word, as Insert clause in the editor does. It goes after the block whose text you give in after (a heading means after its whole section), or at the end. The clause stays linked to the library, so a newer version can update it later. Saves the Doc and returns its new revision and the text inserted. No AI is used. To write a new clause instead use docs_ai_continue with kind clause.

## Inputs

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `doc_id` | string | yes | The Doc's id (from list_docs or get_doc). Up to 80 characters |
| `clause_id` | string | yes | clause_id from search_clauses. Up to 80 characters |
| `after` | string | no | Put it after the block with this text, copied from the Doc (a heading like "4. Fees" means after its whole section). Leave out for the end of the Doc. Up to 200 characters |
| `revision` | integer | no | The Doc's revision as you last read it (get_doc). Checked before any AI is spent: if the Doc has changed since, you get 409 revision_conflict with the current revision and nothing is spent or written. The tool holds the Doc's edit lock from that check until it has saved, so nobody can change it in between. Leave out to work on the Doc as it is now. At least 0 |
