Skip to main content
Docs menu
All MCP tools

MCP tools · Compose flows

flow_setup_agent

Create a voice agent and set it up in one go: the agent (a draft until published in Finn), its handbook, knowledge base documents, voice and speech settings, turning its call flow on, and optionally renting a phone number (costs money; Admins only). Always call it first without run: it answers the full plan and its checks and changes nothing. Show the user that plan; only after they say yes, call again with the same input and run: true. Steps that cost money or reach a person are held for a person in the organization to approve in Finn; the run stops there with the approval link.

Scope needed
operator:build
Acts as
You, the signed-in member, with your role's permissions.
Changes data
Yes
Held for approval
Can be. The call returns a pending approval and an approve link, and nothing happens until a person in your organization approves it in Finn.
Available to
Switched on per organization (compose flow tools)

Inputs

NameTypeDescription
agentrequiredobjectThe new agent: the same body as creating an agent on /v1 (POST /v1/finns), e.g. { name, ... }.
handbookobjectThe agent handbook (PATCH /v1/finns/{id}/handbook body).
knowledge_basearray of objectUp to 10 knowledge base documents, each { url } or { title, text }.
speech_settingsobjectVoice and speech settings (PATCH /v1/finns/{id}/speech_settings body), e.g. { voice_id }.
enable_flowbooleanTurn the agent's call flow on at the end.
phone_numberobjectA number to rent (POST /v1/phone_numbers body). Costs money; held for approval; Admins only.
org_idstringOrganization id. Optional when the user belongs to one organization; otherwise the error lists theirs.
runbooleanLeave out (or false) to get the plan only: nothing is changed. Set true only after you have shown the user the plan and they said yes.
resume_keystringWith run: true, the resume_key an earlier run returned, to finish it after an approval without repeating done steps.