Skip to main content
Glama

mcp-google-sheets

delete-branch.ts955 B
import { FlowActionType, RouterAction } from '../actions/action' import { FlowVersion } from '../flow-version' import { flowStructureUtil } from '../util/flow-structure-util' import { DeleteBranchRequest } from '.' function _deleteBranch(flowVersion: FlowVersion, request: DeleteBranchRequest): FlowVersion { return flowStructureUtil.transferFlow(flowVersion, (parentStep) => { if (parentStep.name !== request.stepName || parentStep.type !== FlowActionType.ROUTER) { return parentStep } const routerAction = parentStep as RouterAction return { ...routerAction, settings: { ...routerAction.settings, branches: routerAction.settings.branches.filter((_, index) => index !== request.branchIndex), }, children: routerAction.children.filter((_, index) => index !== request.branchIndex), } }) } export { _deleteBranch }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server