Skip to main content
Glama
folderr-tech

Folderr

Official
by folderr-tech

execute_workflow

Run automated workflows in Folderr by providing workflow ID and required inputs to trigger predefined processes.

Instructions

Execute a workflow with the required inputs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYesID of the workflow
inputsYesInput values required by the workflow

Implementation Reference

  • The handler function that checks authentication, makes a POST request to /api/workflows/api-client/{workflow_id} with inputs, and returns the response or error.
    private async handleExecuteWorkflow(args: any) {
      if (!this.config.token) {
        throw new McpError(ErrorCode.InvalidRequest, 'Not logged in');
      }
    
      try {
        const response = await this.axiosInstance.post(
          `/api/workflows/api-client/${args.workflow_id}`,
          args.inputs
        );
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Failed to execute workflow: ${error.response?.data?.message || error.message}`,
            },
          ],
          isError: true,
        };
      }
    }
  • The input schema for the execute_workflow tool, defining workflow_id and inputs as required parameters.
    {
      name: 'execute_workflow',
      description: 'Execute a workflow with the required inputs',
      inputSchema: {
        type: 'object',
        properties: {
          workflow_id: {
            type: 'string',
            description: 'ID of the workflow',
          },
          inputs: {
            type: 'object',
            description: 'Input values required by the workflow',
            additionalProperties: true,
          },
        },
        required: ['workflow_id', 'inputs'],
      },
    },
  • src/index.ts:229-230 (registration)
    The switch case in CallToolRequestSchema handler that dispatches execute_workflow calls to the handleExecuteWorkflow method.
    case 'execute_workflow':
      return await this.handleExecuteWorkflow(request.params.arguments);
  • src/index.ts:109-213 (registration)
    The ListToolsRequestSchema handler that registers the execute_workflow tool by including it in the tools list.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: 'set_api_token',
          description: 'Set an API token for authentication (alternative to login)',
          inputSchema: {
            type: 'object',
            properties: {
              token: {
                type: 'string',
                description: 'API token generated from Folderr developers section',
              },
            },
            required: ['token'],
          },
        },
        {
          name: 'login',
          description: 'Login to Folderr with email and password',
          inputSchema: {
            type: 'object',
            properties: {
              email: {
                type: 'string',
                description: 'User email',
              },
              password: {
                type: 'string',
                description: 'User password',
              },
            },
            required: ['email', 'password'],
          },
        },
        {
          name: 'list_assistants',
          description: 'List all available assistants',
          inputSchema: {
            type: 'object',
            properties: {},
            required: [],
          },
        },
        {
          name: 'ask_assistant',
          description: 'Ask a question to a specific assistant',
          inputSchema: {
            type: 'object',
            properties: {
              assistant_id: {
                type: 'string',
                description: 'ID of the assistant to ask',
              },
              question: {
                type: 'string',
                description: 'Question to ask the assistant',
              },
            },
            required: ['assistant_id', 'question'],
          },
        },
        {
          name: 'list_workflows',
          description: 'List all available workflows',
          inputSchema: {
            type: 'object',
            properties: {},
            required: [],
          },
        },
        {
          name: 'get_workflow_inputs',
          description: 'Get the required inputs for a workflow',
          inputSchema: {
            type: 'object',
            properties: {
              workflow_id: {
                type: 'string',
                description: 'ID of the workflow',
              },
            },
            required: ['workflow_id'],
          },
        },
        {
          name: 'execute_workflow',
          description: 'Execute a workflow with the required inputs',
          inputSchema: {
            type: 'object',
            properties: {
              workflow_id: {
                type: 'string',
                description: 'ID of the workflow',
              },
              inputs: {
                type: 'object',
                description: 'Input values required by the workflow',
                additionalProperties: true,
              },
            },
            required: ['workflow_id', 'inputs'],
          },
        },
      ],
    }));

Latest Blog Posts

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/folderr-tech/folderr-mcp-server'

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