# MCP: chains

Source: <https://telegafirst.com/docs/mcp-chains>
Locale: ru
releaseGitSha: 0bb11ef116e17ec64c802d5476eaff442e53d252
sourceContentDigest: 4757483ed63ee92b8dbf0943d54f189ddd733335ff0040d56e34a41e4ad9a3d0
Version: 9

# MCP: chains

Определения инструментов. Обновляйте tools/list после изменения прав. required\_scopes: ALL.

## create\_chain\_step

Add a step to a tenant message chain. The platform assigns the step \`seqNum\`; use it for all later references. The first step becomes an entry point. Add content through the existing content-publish workflow when needed.

Scopes (ALL): \["chains:write"]. Risk: "write".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-create-chain-step)

## create\_message\_chain

Create a message chain (a shell — add its steps afterwards in the Settings supergroup / Mini App). Provide a title. Returns the created chain with its assigned \`seqNum\`.

Scopes (ALL): \["chains:write"]. Risk: "write".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-create-message-chain)

## delete\_chain\_step

Soft-delete a chain step by tenant-local chain and step sequence numbers. Repeating a successful deletion is idempotent.

Scopes (ALL): \["chains:write"]. Risk: "destructive".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-delete-chain-step)

## delete\_message\_chain

Soft-delete a message chain by \`seqNum\`. Idempotent (deleting an absent/already-deleted chain returns deleted:true).

Scopes (ALL): \["chains:write"]. Risk: "destructive".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-delete-message-chain)

## execute\_chain\_batch\_entry

Enter users into the chain identified by a matching prepared scenario. Call this tool only after final human confirmation of the prepared scenario.

Scopes (ALL): \["chains:write"]. Risk: "write".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-execute-chain-batch-entry)

## list\_chain\_runs

List recorded message-chain runs for the current tenant. Optionally filter by the customer \`user\_seq\_num\`; all returned entity references use tenant-scoped sequence numbers.

Scopes (ALL): \["chains:read"]. Risk: "read".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-list-chain-runs)

## list\_chain\_steps

List steps of one message chain. Every result carries tenant-local \`seqNum\`; pass that number (never a database id) to update or delete a step. The chain graph is computed from these step rows. 0-cost read.

Scopes (ALL): \["chains:read"]. Risk: "read".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-list-chain-steps)

## list\_message\_chains

List the tenant message chains (automated message sequences). Returns each with its \`seqNum\` (the id you pass to update/delete), title, computed active flag and engine-assigned deeplink code. 0-cost read. (Chain STEPS are managed separately in the Settings supergroup / Mini App.)

Scopes (ALL): \["chains:read"]. Risk: "read".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-list-message-chains)

## prepare\_chain\_batch\_entry

Prepare entry of up to 50 users into a message chain. You MUST name \`on\_active\`: \`noop\` preserves a live run, \`deliver\` sends the selected step without moving it, and \`restart\` abandons it before a new run. Show the immutable prepared scenario to a human before executing it.

Scopes (ALL): \["chains:write"]. Risk: "write".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-prepare-chain-batch-entry)

## update\_chain\_step

Patch one chain step by \`chain\_seq\_num\` plus \`step\_seq\_num\`. Steps own title, buttons and targets, timeout and timeout target, entry-point and active state, delay, message lifetime and prior-message deletion. Navigation and timeout targets are step seqNums in the same chain. The chain shell has no stored active state: its graph is computed from steps.

Scopes (ALL): \["chains:write"]. Risk: "write".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-update-chain-step)

## update\_message\_chain

Update a message chain by its \`seqNum\` (a partial patch — send only the fields you change). Idempotent. Returns the updated chain. Errors NOT\_FOUND if the seqNum does not exist for your tenant.

Scopes (ALL): \["chains:write"]. Risk: "write".

[Вход, результат и права](https://telegafirst.com/docs/mcp-tool-update-message-chain)
