# site\_form\_declare

Source: <https://telegafirst.com/docs/mcp-tool-site-form-declare>
Locale: ru
releaseGitSha: 0bb11ef116e17ec64c802d5476eaff442e53d252
sourceContentDigest: f703c69d3cf090f551756a9b3a4743500184b95ef33365d64b33acffc683f089
Version: 8

# 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](https://telegafirst.com/docs/schema-bf5f927f382b80381658580a09d4ab37656fb67d16ee57ed44e9c010db0aa8ad)

## Результат

null
