К содержанию
TelegaFirst

Для AI-агентов: markdown этой страницы — /docs/mcp-chains.mdиндекс документации — /llms.txt

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права

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".

Вход, результат и права