naftiko: 1.0.0-alpha2 info: label: Twilio - Studio — Flows description: 'Twilio - Studio — Flows. 19 operations. Lead operation: Flows. Self-contained Naftiko capability covering one Twilio business surface.' tags: - Twilio - Flows created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TWILIO_API_KEY: TWILIO_API_KEY capability: consumes: - type: http namespace: studio-flows baseUri: https://studio.twilio.com description: Twilio - Studio — Flows business capability. Self-contained, no shared references. resources: - name: v2-Flows path: /v2/Flows operations: - name: createflow method: POST description: Create a Flow. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: listflow method: GET description: Retrieve a list of all Flows. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: PageSize in: query type: integer description: How many resources to return in each list page. The default is 50, and the maximum is 1000. - name: Page in: query type: integer description: The page index. This value is simply for client state. - name: PageToken in: query type: string description: The page token. This is provided by the API. - name: v2-Flows-Validate path: /v2/Flows/Validate operations: - name: updateflowvalidate method: POST description: Validate flow JSON definition outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: false - name: v2-Flows-FlowSid-Executions path: /v2/Flows/{FlowSid}/Executions operations: - name: listexecution method: GET description: Retrieve a list of all Executions for the Flow. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Execution resources to read. required: true - name: DateCreatedFrom in: query type: string description: Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. - name: DateCreatedTo in: query type: string description: Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`. - name: PageSize in: query type: integer description: How many resources to return in each list page. The default is 50, and the maximum is 1000. - name: Page in: query type: integer description: The page index. This value is simply for client state. - name: PageToken in: query type: string description: The page token. This is provided by the API. - name: createexecution method: POST description: Triggers a new Execution for the Flow outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Excecution's Flow. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: v2-Flows-FlowSid-Executions-ExecutionSid-Context path: /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Context operations: - name: fetchexecutioncontext method: GET description: Retrieve the most recent context for an Execution. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Execution context to fetch. required: true - name: ExecutionSid in: path type: string description: The SID of the Execution context to fetch. required: true - name: v2-Flows-FlowSid-Executions-ExecutionSid-Steps path: /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps operations: - name: listexecutionstep method: GET description: Retrieve a list of all Steps for an Execution. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Steps to read. required: true - name: ExecutionSid in: path type: string description: The SID of the Execution with the Steps to read. required: true - name: PageSize in: query type: integer description: How many resources to return in each list page. The default is 50, and the maximum is 1000. - name: Page in: query type: integer description: The page index. This value is simply for client state. - name: PageToken in: query type: string description: The page token. This is provided by the API. - name: v2-Flows-FlowSid-Executions-ExecutionSid-Steps-Sid path: /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{Sid} operations: - name: fetchexecutionstep method: GET description: Retrieve a Step. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Step to fetch. required: true - name: ExecutionSid in: path type: string description: The SID of the Execution resource with the Step to fetch. required: true - name: Sid in: path type: string description: The SID of the ExecutionStep resource to fetch. required: true - name: v2-Flows-FlowSid-Executions-ExecutionSid-Steps-StepSid-Context path: /v2/Flows/{FlowSid}/Executions/{ExecutionSid}/Steps/{StepSid}/Context operations: - name: fetchexecutionstepcontext method: GET description: Retrieve the context for an Execution Step. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Step to fetch. required: true - name: ExecutionSid in: path type: string description: The SID of the Execution resource with the Step to fetch. required: true - name: StepSid in: path type: string description: The SID of the Step to fetch. required: true - name: v2-Flows-FlowSid-Executions-Sid path: /v2/Flows/{FlowSid}/Executions/{Sid} operations: - name: fetchexecution method: GET description: Retrieve an Execution outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Execution resource to fetch required: true - name: Sid in: path type: string description: The SID of the Execution resource to fetch. required: true - name: deleteexecution method: DELETE description: Delete the Execution and all Steps relating to it. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Execution resources to delete. required: true - name: Sid in: path type: string description: The SID of the Execution resource to delete. required: true - name: updateexecution method: POST description: Update the status of an Execution to `ended`. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: FlowSid in: path type: string description: The SID of the Flow with the Execution resources to update. required: true - name: Sid in: path type: string description: The SID of the Execution resource to update. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: v2-Flows-Sid path: /v2/Flows/{Sid} operations: - name: updateflow method: POST description: Update a Flow. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: The SID of the Flow resource to fetch. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: fetchflow method: GET description: Retrieve a specific Flow. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: The SID of the Flow resource to fetch. required: true - name: deleteflow method: DELETE description: Delete a specific Flow. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: The SID of the Flow resource to delete. required: true - name: v2-Flows-Sid-Revisions path: /v2/Flows/{Sid}/Revisions operations: - name: listflowrevision method: GET description: Retrieve a list of all Flows revisions. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: The SID of the Flow resource to fetch. required: true - name: PageSize in: query type: integer description: How many resources to return in each list page. The default is 50, and the maximum is 1000. - name: Page in: query type: integer description: The page index. This value is simply for client state. - name: PageToken in: query type: string description: The page token. This is provided by the API. - name: v2-Flows-Sid-Revisions-Revision path: /v2/Flows/{Sid}/Revisions/{Revision} operations: - name: fetchflowrevision method: GET description: Retrieve a specific Flow revision. outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: The SID of the Flow resource to fetch. required: true - name: Revision in: path type: string description: Specific Revision number or can be `LatestPublished` and `LatestRevision`. required: true - name: v2-Flows-Sid-TestUsers path: /v2/Flows/{Sid}/TestUsers operations: - name: fetchtestuser method: GET description: Fetch flow test users outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: Unique identifier of the flow. required: true - name: updatetestuser method: POST description: Update flow test users outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Sid in: path type: string description: Unique identifier of the flow. required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: basic username: '{{env.TWILIO_USER}}' password: '{{env.TWILIO_PASS}}' exposes: - type: rest namespace: studio-flows-rest port: 8080 description: REST adapter for Twilio - Studio — Flows. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/v2/flows name: v2-flows description: REST surface for v2-Flows. operations: - method: POST name: createflow description: Create a Flow. call: studio-flows.createflow with: body: rest.body outputParameters: - type: object mapping: $. - method: GET name: listflow description: Retrieve a list of all Flows. call: studio-flows.listflow with: PageSize: rest.PageSize Page: rest.Page PageToken: rest.PageToken outputParameters: - type: object mapping: $. - path: /v1/v2/flows/validate name: v2-flows-validate description: REST surface for v2-Flows-Validate. operations: - method: POST name: updateflowvalidate description: Validate flow JSON definition call: studio-flows.updateflowvalidate with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{flowsid}/executions name: v2-flows-flowsid-executions description: REST surface for v2-Flows-FlowSid-Executions. operations: - method: GET name: listexecution description: Retrieve a list of all Executions for the Flow. call: studio-flows.listexecution with: FlowSid: rest.FlowSid DateCreatedFrom: rest.DateCreatedFrom DateCreatedTo: rest.DateCreatedTo PageSize: rest.PageSize Page: rest.Page PageToken: rest.PageToken outputParameters: - type: object mapping: $. - method: POST name: createexecution description: Triggers a new Execution for the Flow call: studio-flows.createexecution with: FlowSid: rest.FlowSid body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{flowsid}/executions/{executionsid}/context name: v2-flows-flowsid-executions-executionsid-context description: REST surface for v2-Flows-FlowSid-Executions-ExecutionSid-Context. operations: - method: GET name: fetchexecutioncontext description: Retrieve the most recent context for an Execution. call: studio-flows.fetchexecutioncontext with: FlowSid: rest.FlowSid ExecutionSid: rest.ExecutionSid outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{flowsid}/executions/{executionsid}/steps name: v2-flows-flowsid-executions-executionsid-steps description: REST surface for v2-Flows-FlowSid-Executions-ExecutionSid-Steps. operations: - method: GET name: listexecutionstep description: Retrieve a list of all Steps for an Execution. call: studio-flows.listexecutionstep with: FlowSid: rest.FlowSid ExecutionSid: rest.ExecutionSid PageSize: rest.PageSize Page: rest.Page PageToken: rest.PageToken outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{flowsid}/executions/{executionsid}/steps/{sid} name: v2-flows-flowsid-executions-executionsid-steps-sid description: REST surface for v2-Flows-FlowSid-Executions-ExecutionSid-Steps-Sid. operations: - method: GET name: fetchexecutionstep description: Retrieve a Step. call: studio-flows.fetchexecutionstep with: FlowSid: rest.FlowSid ExecutionSid: rest.ExecutionSid Sid: rest.Sid outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{flowsid}/executions/{executionsid}/steps/{stepsid}/context name: v2-flows-flowsid-executions-executionsid-steps-stepsid-context description: REST surface for v2-Flows-FlowSid-Executions-ExecutionSid-Steps-StepSid-Context. operations: - method: GET name: fetchexecutionstepcontext description: Retrieve the context for an Execution Step. call: studio-flows.fetchexecutionstepcontext with: FlowSid: rest.FlowSid ExecutionSid: rest.ExecutionSid StepSid: rest.StepSid outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{flowsid}/executions/{sid} name: v2-flows-flowsid-executions-sid description: REST surface for v2-Flows-FlowSid-Executions-Sid. operations: - method: GET name: fetchexecution description: Retrieve an Execution call: studio-flows.fetchexecution with: FlowSid: rest.FlowSid Sid: rest.Sid outputParameters: - type: object mapping: $. - method: DELETE name: deleteexecution description: Delete the Execution and all Steps relating to it. call: studio-flows.deleteexecution with: FlowSid: rest.FlowSid Sid: rest.Sid outputParameters: - type: object mapping: $. - method: POST name: updateexecution description: Update the status of an Execution to `ended`. call: studio-flows.updateexecution with: FlowSid: rest.FlowSid Sid: rest.Sid body: rest.body outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{sid} name: v2-flows-sid description: REST surface for v2-Flows-Sid. operations: - method: POST name: updateflow description: Update a Flow. call: studio-flows.updateflow with: Sid: rest.Sid body: rest.body outputParameters: - type: object mapping: $. - method: GET name: fetchflow description: Retrieve a specific Flow. call: studio-flows.fetchflow with: Sid: rest.Sid outputParameters: - type: object mapping: $. - method: DELETE name: deleteflow description: Delete a specific Flow. call: studio-flows.deleteflow with: Sid: rest.Sid outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{sid}/revisions name: v2-flows-sid-revisions description: REST surface for v2-Flows-Sid-Revisions. operations: - method: GET name: listflowrevision description: Retrieve a list of all Flows revisions. call: studio-flows.listflowrevision with: Sid: rest.Sid PageSize: rest.PageSize Page: rest.Page PageToken: rest.PageToken outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{sid}/revisions/{revision} name: v2-flows-sid-revisions-revision description: REST surface for v2-Flows-Sid-Revisions-Revision. operations: - method: GET name: fetchflowrevision description: Retrieve a specific Flow revision. call: studio-flows.fetchflowrevision with: Sid: rest.Sid Revision: rest.Revision outputParameters: - type: object mapping: $. - path: /v1/v2/flows/{sid}/testusers name: v2-flows-sid-testusers description: REST surface for v2-Flows-Sid-TestUsers. operations: - method: GET name: fetchtestuser description: Fetch flow test users call: studio-flows.fetchtestuser with: Sid: rest.Sid outputParameters: - type: object mapping: $. - method: POST name: updatetestuser description: Update flow test users call: studio-flows.updatetestuser with: Sid: rest.Sid body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: studio-flows-mcp port: 9090 transport: http description: MCP adapter for Twilio - Studio — Flows. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-flow description: Create a Flow. hints: readOnly: false destructive: false idempotent: false call: studio-flows.createflow with: body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-list-all-flows description: Retrieve a list of all Flows. hints: readOnly: true destructive: false idempotent: true call: studio-flows.listflow with: PageSize: tools.PageSize Page: tools.Page PageToken: tools.PageToken outputParameters: - type: object mapping: $. - name: validate-flow-json-definition description: Validate flow JSON definition hints: readOnly: true destructive: false idempotent: false call: studio-flows.updateflowvalidate with: body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-list-all-executions-flow description: Retrieve a list of all Executions for the Flow. hints: readOnly: true destructive: false idempotent: true call: studio-flows.listexecution with: FlowSid: tools.FlowSid DateCreatedFrom: tools.DateCreatedFrom DateCreatedTo: tools.DateCreatedTo PageSize: tools.PageSize Page: tools.Page PageToken: tools.PageToken outputParameters: - type: object mapping: $. - name: triggers-new-execution-flow description: Triggers a new Execution for the Flow hints: readOnly: false destructive: false idempotent: false call: studio-flows.createexecution with: FlowSid: tools.FlowSid body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-most-recent-context-execution description: Retrieve the most recent context for an Execution. hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchexecutioncontext with: FlowSid: tools.FlowSid ExecutionSid: tools.ExecutionSid outputParameters: - type: object mapping: $. - name: retrieve-list-all-steps-execution description: Retrieve a list of all Steps for an Execution. hints: readOnly: true destructive: false idempotent: true call: studio-flows.listexecutionstep with: FlowSid: tools.FlowSid ExecutionSid: tools.ExecutionSid PageSize: tools.PageSize Page: tools.Page PageToken: tools.PageToken outputParameters: - type: object mapping: $. - name: retrieve-step description: Retrieve a Step. hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchexecutionstep with: FlowSid: tools.FlowSid ExecutionSid: tools.ExecutionSid Sid: tools.Sid outputParameters: - type: object mapping: $. - name: retrieve-context-execution-step description: Retrieve the context for an Execution Step. hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchexecutionstepcontext with: FlowSid: tools.FlowSid ExecutionSid: tools.ExecutionSid StepSid: tools.StepSid outputParameters: - type: object mapping: $. - name: retrieve-execution description: Retrieve an Execution hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchexecution with: FlowSid: tools.FlowSid Sid: tools.Sid outputParameters: - type: object mapping: $. - name: delete-execution-and-all-steps description: Delete the Execution and all Steps relating to it. hints: readOnly: false destructive: true idempotent: true call: studio-flows.deleteexecution with: FlowSid: tools.FlowSid Sid: tools.Sid outputParameters: - type: object mapping: $. - name: update-status-execution-ended description: Update the status of an Execution to `ended`. hints: readOnly: false destructive: false idempotent: false call: studio-flows.updateexecution with: FlowSid: tools.FlowSid Sid: tools.Sid body: tools.body outputParameters: - type: object mapping: $. - name: update-flow description: Update a Flow. hints: readOnly: false destructive: false idempotent: false call: studio-flows.updateflow with: Sid: tools.Sid body: tools.body outputParameters: - type: object mapping: $. - name: retrieve-specific-flow description: Retrieve a specific Flow. hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchflow with: Sid: tools.Sid outputParameters: - type: object mapping: $. - name: delete-specific-flow description: Delete a specific Flow. hints: readOnly: false destructive: true idempotent: true call: studio-flows.deleteflow with: Sid: tools.Sid outputParameters: - type: object mapping: $. - name: retrieve-list-all-flows-revisions description: Retrieve a list of all Flows revisions. hints: readOnly: true destructive: false idempotent: true call: studio-flows.listflowrevision with: Sid: tools.Sid PageSize: tools.PageSize Page: tools.Page PageToken: tools.PageToken outputParameters: - type: object mapping: $. - name: retrieve-specific-flow-revision description: Retrieve a specific Flow revision. hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchflowrevision with: Sid: tools.Sid Revision: tools.Revision outputParameters: - type: object mapping: $. - name: fetch-flow-test-users description: Fetch flow test users hints: readOnly: true destructive: false idempotent: true call: studio-flows.fetchtestuser with: Sid: tools.Sid outputParameters: - type: object mapping: $. - name: update-flow-test-users description: Update flow test users hints: readOnly: true destructive: false idempotent: false call: studio-flows.updatetestuser with: Sid: tools.Sid body: tools.body outputParameters: - type: object mapping: $.