Skip to main content
Glama

trigger_make_scenario

Execute Make.com automation scenarios to perform tasks like creating tasks, sending notifications, or processing data through webhook integrations with third-party services.

Instructions

触发Make.com scenario执行指定任务

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes要执行的动作类型
dataNo传递给scenario的数据

Implementation Reference

  • The main execution handler for the 'trigger_make_scenario' tool. Validates input, constructs payload, sends HTTP POST to Make.com webhook, and returns formatted response with execution details or error.
    private async triggerMakeScenario(args: any) {
      if (!this.makeWebhookUrl) {
        throw new Error('Make.com webhook URL未配置。请在.env文件中设置MAKE_WEBHOOK_URL');
      }
    
      // 验证输入参数
      this.validatePayload(args);
    
      const payload = {
        action: args.action,
        data: args.data || {},
        timestamp: new Date().toISOString(),
        source: 'claude-mcp',
        request_id: `mcp-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`
      };
    
      try {
        const response = await axios.post(this.makeWebhookUrl, payload, {
          headers: {
            'Content-Type': 'application/json',
            'User-Agent': 'Claude-MCP-Server/1.0.0'
          },
          timeout: 30000,
          validateStatus: (status) => status < 500 // 接受所有非5xx状态码
        });
    
        const executionId = response.data?.executionId || response.data?.id || 'N/A';
        const statusMessage = response.status >= 200 && response.status < 300 ? '✅ 成功' : '⚠️ 部分成功';
    
        return {
          content: [
            {
              type: 'text',
              text: `${statusMessage} Make scenario已触发\n` +
                    `动作类型: ${args.action}\n` +
                    `响应状态: ${response.status}\n` +
                    `执行ID: ${executionId}\n` +
                    `请求ID: ${payload.request_id}\n` +
                    `时间戳: ${payload.timestamp}`
            }
          ]
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          const status = error.response?.status || 'N/A';
          const statusText = error.response?.statusText || 'Unknown';
          const errorData = error.response?.data || 'No additional error info';
          
          throw new Error(
            `HTTP请求失败: ${status} - ${statusText}\n` +
            `错误详情: ${JSON.stringify(errorData)}\n` +
            `请检查Make.com scenario状态和webhook配置`
          );
        }
        throw error;
      }
    }
  • Input schema definition for the tool, specifying required 'action' enum and optional 'data' object.
    inputSchema: {
      type: 'object',
      properties: {
        action: {
          type: 'string',
          description: '要执行的动作类型',
          enum: ['create_task', 'send_notification', 'process_data', 'custom']
        },
        data: {
          type: 'object',
          description: '传递给scenario的数据',
          additionalProperties: true
        }
      },
      required: ['action']
    }
  • src/server.ts:90-108 (registration)
    Tool call request handler registration with switch statement dispatching 'trigger_make_scenario' calls to the handler function.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        switch (name) {
          case 'trigger_make_scenario':
            return await this.triggerMakeScenario(args);
          case 'get_scenario_status':
            return await this.getScenarioStatus(args);
          case 'test_webhook_connection':
            return await this.testWebhookConnection();
          default:
            throw new McpError(ErrorCode.MethodNotFound, `未知工具: ${name}`);
        }
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : '未知错误';
        throw new McpError(ErrorCode.InternalError, `工具执行失败: ${errorMessage}`);
      }
    });
  • src/server.ts:42-61 (registration)
    Tool specification registration in the ListTools response, including name, description, and schema.
    {
      name: 'trigger_make_scenario',
      description: '触发Make.com scenario执行指定任务',
      inputSchema: {
        type: 'object',
        properties: {
          action: {
            type: 'string',
            description: '要执行的动作类型',
            enum: ['create_task', 'send_notification', 'process_data', 'custom']
          },
          data: {
            type: 'object',
            description: '传递给scenario的数据',
            additionalProperties: true
          }
        },
        required: ['action']
      }
    },
  • Helper function to validate the 'action' parameter against allowed enum values, called by the handler.
    private validatePayload(args: any) {
      const allowedActions = ['create_task', 'send_notification', 'process_data', 'custom'];
      if (!allowedActions.includes(args.action)) {
        throw new Error(`无效的动作类型: ${args.action}. 允许的类型: ${allowedActions.join(', ')}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While '触发' (trigger) implies an action that initiates something, the description doesn't reveal whether this is a read-only or destructive operation, what permissions are required, whether it's idempotent, rate limits, error handling, or what happens after triggering. For a tool that likely performs external API calls with no annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the tool's function without unnecessary words. It's appropriately sized for a simple tool, though it could be slightly more specific to improve clarity without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool likely interacts with an external service (Make.com) to trigger scenarios, has no annotations, no output schema, and involves parameters that could have complex implications (like the data object), the description is incomplete. It doesn't cover what happens after triggering, potential side effects, error cases, or how to interpret results, leaving significant gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters (action with enum values and data object). The description doesn't add any meaningful parameter semantics beyond what's in the schema—it doesn't explain what '要执行的动作类型' (action type to execute) means in practice or how the data object should be structured for different actions. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool '触发Make.com scenario执行指定任务' (triggers Make.com scenario to execute specified tasks), which provides a basic verb+resource combination. However, it's somewhat vague about what 'specified tasks' means, and while it distinguishes from sibling tools like get_scenario_status and test_webhook_connection by focusing on execution rather than status checking or testing, it doesn't clearly differentiate the scope of triggering versus other potential execution tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions. Given the sibling tools (get_scenario_status, test_webhook_connection), there's no indication of when triggering execution is preferred over checking status or testing connections.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Joseph19820124/make-mcp-integration-playbook'

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