FlowCastle
by flowcastle.ai in Email & messaging
Build, edit, and deploy Telegram bots on FlowCastle's hosted visual flow platform.
https://api.flowcastle.ai/api/mcp
Last 30 days
- Uptime
- 100%
- Response time
- 180 ms typical, 180 ms slowest 5%
- Last check
- 4 h ago
- Next check
- in 2 h
How to call it
Add it to any MCP client that supports remote servers.
{
"mcpServers": {
"flowcastle": {
"type": "http",
"url": "https://api.flowcastle.ai/api/mcp"
}
}
}57 tools
- list_applications
List the applications this API key can access, with the caller role and the permissions it grants. Start here when using a personal API key (usr_...): every other tool needs an explicit applicationId, which this tool supplies. Read-only, takes no arguments. Returns an array of {
- create_application
Create a new application (workspace) owned by the caller. Requires a personal API key (usr_...) — application-scoped keys cannot create applications. Seeds default flows unless skipDefaultFlows is true. Creates persistent state and is NOT idempotent: calling it twice creates two
- update_application
Update application-level settings (name, active state, default language, language for everyone else, incoming-message behavior). Requires the manage_settings permission in that application. Only the fields you pass are changed; omitted fields keep their current value, so the call
- import_website_knowledge
Crawl a website into a knowledge base so an AI_TOOL_ROUTER can answer from it. Creates a new base (named after the host) unless knowledgeBaseId is given. Honours robots.txt, skips junk and duplicate pages, keeps blog posts by default, and caps at maxPages. Returns at once with a
- get_website_import
Status of a website import started by import_website_knowledge or an import_website_into_knowledge_base action: stage, progress, counters, warnings and the pages that were not imported. Read-only. Poll until status is DONE, DONE_WITH_ERRORS or FAILED.
- list_watched_groups
List the group/channel chats a telegram_mtproto userbot monitors. Read-only. The watched list is the single source of truth for which chats the userbot processes: messages from unlisted group/channel chats are dropped (fail closed) and their contacts never materialize; DMs always
- list_telegram_operations
Discover supported Telegram MTProto account operations, input schemas, permissions and limits. Requires manage_broadcasts. All current operations read public data; this catalog does not connect to Telegram. botId may be omitted when the application has exactly one userbot.
- execute_telegram_operation
Submit one supported read operation on the connected telegram_mtproto account. Call list_telegram_operations for the input schema. Returns a requestId; poll get_telegram_operation until completed, error or timed_out. Requires manage_broadcasts. Nothing is sent, joined, marked as
- get_telegram_operation
Read a Telegram operation status and result using its requestId and the same applicationId/botId used for submission. Requires manage_broadcasts for the owning application. Poll every two seconds. Results expire one hour after their last update. timed_out means no result arrived
- set_watched_groups
Replace a telegram_mtproto userbot's watched-groups list — the chats it monitors. Requires the manage_settings permission. SET semantics: send the COMPLETE desired list every time (call list_watched_groups first and include existing entries you want to keep — omitting one removes
- sync_dialog_contacts
Import a telegram_mtproto userbot's existing chats as contacts — DM partners, groups, and channels — so everything the account already talks to becomes a contact send_message can target without waiting for each chat to message first. Importing does not allow sending: send_message
- get_workspace_summary
Return a compact application, flow, sequence, operation, and bot summary — the cheapest way to orient in a workspace. Read-only, no side effects. Deliberately omits variables and full flow graphs: use get_variable_context for variables, get_flow_context for a flow's topology, and
- get_variable_context
Search variable definitions by scope and keyword. Read-only. Returns { variables, total, returned, truncated } — compare returned against total to detect a cut-off result set and re-call with a higher limit. Values are withheld unless includeValues is true; variables marked secre
- get_application_context
Return the full application-level automation context in one read-only call: every flow (with folders), connected bots, variables, sequences, and operations. This is the broad orientation call — prefer get_workspace_summary when you only need names and counts, since this response
- get_module_catalog
Return a compact index of both installed and available marketplace modules, with each module's key, versions, description, actions, and triggers. Read-only. Start here when you need a capability the core action kinds do not cover; then call get_module_details for the exact input
- get_module_details
Return everything needed to use one module: action input fields and their types, trigger configuration, manual setup fields (credentials an operator must fill in the dashboard), and references to already-installed actions. Read-only. Call get_module_catalog first to obtain module
- install_module
Install an exact marketplace module version into an application and create any missing installed-template actions. Requires the manage_automation permission. Call get_module_catalog first to select the module and version, then get_module_details after installation to inspect setu
- search_flows
Find every flow and block whose contents contain a keyword. Read-only. Searches message text and its translations, button labels and URLs, action names and configs, action input/output field paths and values, condition operands, trigger commands and payloads, custom-code files, a
- get_flow_context
Return one flow's graph topology: its blocks in reading order from the start block, a short summary per block, and where each block and each menu button leads (links[].to, menu.buttons[].to). Read-only. Deliberately omits block data, action configs and the ids of buttons, actions
- get_block_details
Return the complete contents of one block: block data, action configs, HTTP request bodies, custom-code files, triggers, menu payloads, and media paths. Read-only. This is the heaviest read in the API — call get_flow_context first to find the block you need rather than walking a
- get_action_schema
Read-only, needs no API key. The action-authoring contract apply_actions batches are validated against. With NO arguments, returns an INDEX of block types, actions, action kinds and topics with descriptions and sizes. Then request only what this bot uses. Detail responses include
- get_design_guidelines
Return the flow-design rules that validation does NOT enforce: when to split a branch into its own flow, how navigation and menus must be wired, and worked examples. Read-only, needs no API key. Called with NO arguments it returns a compact INDEX: the short rules every batch need
- get_funnel_analytics
Return the measured conversion funnels of the workspace's ENTRY flows over the last 30 days, busiest first: how many new contacts entered, which blocks they reached, the share who stop at each block, which buttons lead nowhere (pressed then silence), and how many recorded a goal.
- get_flow_analytics
Measure how NAMED flows are actually used over the last 30 days: how many contacts entered each one, where inside it they stop (per block, with the stop RATE), how many were answered by a human agent afterwards, and how many hit an error. Unlike get_funnel_analytics this works fo
- get_survey_results
Read what customers ANSWERED in this workspace's surveys. A survey is any flow marked isSurvey: its choice questions record which option each contact tapped, and its free-text questions store the reply the contact typed. Called with NO flowId it lists every survey flow with how m
- search_flow_examples
Search the library of reusable flow examples covering common business cases (lead capture, onboarding, payments, reminders). Read-only, needs no API key. Returns summaries to choose by — id, title, summary, useWhen, tags, requiredModules, hasSchemaExample — with no flow body; pas
- get_flow_example
Return one reusable flow example by id, optionally with a complete action batch you can adapt and pass to apply_actions. Read-only, needs no API key. Call search_flow_examples first to find the id.
- validate_actions
Dry-run validation of a proposed batch of flow-builder actions. Mutates nothing and is safe to repeat. OPTIONAL: apply_actions runs this exact validation itself and applies nothing when invalid, so calling validate_actions first is redundant — use it only to check a draft you do
- apply_actions
Validate and apply a batch of flow-builder actions — the single write path for editing flows, blocks, variables, broadcasts, sequences, and folders. Call this directly; a separate validate_actions call beforehand is unnecessary. Broadcasts have no dedicated tool and are managed h
- deploy_application
Publish the workspace to its bots — the API equivalent of the dashboard's Deploy button. This is the step that makes edits live. apply_actions writes to the DRAFT graph. Until this runs the connected bots keep serving the previously published version, so a change that looks appli
- run_flow_autotest
Runs deterministic behavioural tests against flows that are ALREADY applied (compiles them to an AST and simulates a user). Call after apply_actions to verify a build; read `summary` and the failed checks, patch with apply_actions, re-run. Mutates nothing. The smoke layer runs on
- send_message
Send a message to ONE contact right now, outside any flow. For reaching many contacts use a broadcast instead. Target the contact with contactId (globally unique — preferred), or with platformId (the platform-side id, e.g. the Telegram user id). platformId is NOT globally unique:
- send_flow_to_contacts
Run an EXISTING interactive flow for each listed contact right now, outside any trigger — as if each of them had just triggered it. Use it when the WHOLE message is the flow — its first block's text, media and buttons are what the recipient sees. To send your own custom text with
- read_messages
Read the message transcript: what users sent the bot and what the bot sent back, newest first. Source is the runtime's own message ledger, written by the bot as it handled each turn — inbound messages are recorded before any routing decision, so messages that matched no trigger a
- list_contacts
List and search contacts in the application, paginated, newest first. Read-only. Filters combine as AND; search matches name, username, email, phone, and platformId; `tags` / `tagIds` keep only contacts carrying at least one of those tags (UTM attribution tags are named "utm: <sl
- list_contact_tags
List the contact tags in use in the application (or one bot) with how many contacts carry each, most-used first. Read-only. This is the attribution view: UTM tags ("utm: <slug>", set by ?start=utm--<slug> deep links, one per ad or campaign) show how many contacts each source brou
- get_contact
Return one contact's full profile plus every contact-variable value stored for them. Read-only. Values may hold personal data; variables of type SECRET are always redacted. Call list_contacts first to find the contactId.
- get_contact_activity
Return one contact's engagement history: goals they achieved and buttons they clicked, newest first, plus all-time goal totals. Read-only. This is the per-contact companion to get_broadcast_analytics (which is aggregate). Clicks are inline/menu button presses inside the bot — typ
- list_event_contacts
The reverse lookup: which contacts triggered one analytics event — achieved a goal (kind GOAL + goalKey), clicked a button (BUTTON_CLICK + blockId, optionally buttonId/buttonIndex), were sent a block (BLOCK_SENT + blockId), or received a broadcast (BROADCAST_DELIVERED + broadcast
- create_contact
Create a contact manually — for imports or externally-sourced audiences; contacts who message a bot are created automatically. Requires the manage_broadcasts permission. platformId must be unique within the bot (duplicate fails with 409); botId may be omitted only when the applic
Security scan
- Unusually long description in tool:apply_actions
apply_actions Validate and apply a batch of flow-builder actions — the single wr… - Unusually long description in tool:send_message
send_message Send a message to ONE contact right now, outside any flow. For reac…
Recent checks
| When | Result | HTTP | Time |
|---|---|---|---|
| 4 h ago | Passed | 200 | 180 ms |
| 13 h ago | Passed | 200 | 266 ms |