Для AI-агентов: markdown этой страницы — /docs/mcp-tool-site-form-declare.mdиндекс документации — /llms.txt
site_form_declare
Обновлено
Declare a form and its submit URL BEFORE BUILDING THE PAGES: it returns `clientSlug` and `code`, the pages POST to `https://fn.telegafirst.ru/f/\{clientSlug\}/\{code\}\` (`fn.telegafirst.com` when `zone` is `com`). Pass the returned `seqNum` to UPDATE it (`clientSlug` + `code` stay, live pages keep working); omit it for a NEW form at a NEW address. It configures the ENVELOPE (delivery, origins, captcha), NOT fields: draw any inputs in your HTML; answers are stored as submitted. `destinations` items: `{"kind":"telegram","topicId":<topic id>}`, `{"kind":"webhook","url":"https://…"}`, or `{"kind":"external_api","url":"https://…","method":"POST","headerName":"X-Api-Key","secretName":"<name from secret_put>"}` (secret NAME, never value). `allowedOrigins` must list the site's own addresses (`https://acme.ru\`), or no submission is accepted. Stop accepting with `enabled: false`; there is no delete (answers keep their config). `afterSubmit` = what the visitor sees after sending: `{"mode":"auto"}` shows your `title`/`text` (or zone defaults) with a way back to the chat, `{"mode":"redirect","redirectUrl":"https://…"}` redirects to a URL on the site's own hosts or `allowedOrigins`; `description` and `submitLabel` dress the hosted page. `variants` run after a submission: each names a funnel step by `stepSeqNum` plus a condition — `when` for `funnelMode: "deterministic"` (first match by `sort` wins) or `hint` (plain language) for `funnelMode: "ai_agent"`; exactly one per entry. `defaultStepSeqNum` if none matches. `managerFollowUp: true` adds an AI Manager answer after the step. `callOperatorOnSubmit: true` (or an entry's `callsOperator: true`) calls a live operator. ⚠️ Not a patch: an optional omitted on re-declaration (`variants`, `afterSubmit`…) RESETS — always send the complete declaration. Optional `submissionSchema`, e.g. `[{"name":"phone","type":"tel","required":true}]`, validates: a non-matching submission is refused naming the field; names must match your HTML inputs.
Права и условия
required_scopes: ALL.
| Поле | Значение |
|---|---|
| description | "Declare a form and its submit URL BEFORE BUILDING THE PAGES: it returns `clientSlug` and `code`, the pages POST to `https://fn.telegafirst.ru/f/\{clientSlug\}/\{code\}\` (`fn.telegafirst.com` when `zone` is `com`). Pass the returned `seqNum` to UPDATE it (`clientSlug` + `code` stay, live pages keep working); omit it for a NEW form at a NEW address. It configures the ENVELOPE (delivery, origins, captcha), NOT fields: draw any inputs in your HTML; answers are stored as submitted. `destinations` items: `{\"kind\":\"telegram\",\"topicId\":<topic id>}`, `{\"kind\":\"webhook\",\"url\":\"https://…\"}`, or `{\"kind\":\"external_api\",\"url\":\"https://…\",\"method\":\"POST\",\"headerName\":\"X-Api-Key\",\"secretName\":\"<name from secret_put>\"}` (secret NAME, never value). `allowedOrigins` must list the site's own addresses (`https://acme.ru\`), or no submission is accepted. Stop accepting with `enabled: false`; there is no delete (answers keep their config). `afterSubmit` = what the visitor sees after sending: `{\"mode\":\"auto\"}` shows your `title`/`text` (or zone defaults) with a way back to the chat, `{\"mode\":\"redirect\",\"redirectUrl\":\"https://…\"}` redirects to a URL on the site's own hosts or `allowedOrigins`; `description` and `submitLabel` dress the hosted page. `variants` run after a submission: each names a funnel step by `stepSeqNum` plus a condition — `when` for `funnelMode: \"deterministic\"` (first match by `sort` wins) or `hint` (plain language) for `funnelMode: \"ai_agent\"`; exactly one per entry. `defaultStepSeqNum` if none matches. `managerFollowUp: true` adds an AI Manager answer after the step. `callOperatorOnSubmit: true` (or an entry's `callsOperator: true`) calls a live operator. ⚠️ Not a patch: an optional omitted on re-declaration (`variants`, `afterSubmit`…) RESETS — always send the complete declaration. Optional `submissionSchema`, e.g. `[{\"name\":\"phone\",\"type\":\"tel\",\"required\":true}]`, validates: a non-matching submission is refused naming the field; names must match your HTML inputs." |
| domain | "site" |
| name | "site_form_declare" |
| platform_version | "1.0.20" |
| required_scopes | ["site:write"] |
| risk | "write" |
| scope | "site:write" |
| title | "Site Form Declare" |
Входные параметры
site_form_declare: inputSchema
Результат
null