[
  {
    "name": "MCP Hub",
    "nodes": [
      {
        "id": "mcp-trigger-001",
        "name": "MCP Server Trigger",
        "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
        "typeVersion": 1,
        "position": [400, 300],
        "webhookId": "replace-with-your-webhook-id",
        "parameters": {}
      },
      {
        "id": "call-fetch-news-001",
        "name": "Tool: Fetch Top News",
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [640, 200],
        "parameters": {
          "name": "fetch_top_news",
          "description": "Fetch the top 5 stories from Hacker News right now. Returns a JSON array with title, URL, and score for each story.",
          "workflowId": {
            "__rl": true,
            "value": "oBXkYa94iXXOdiAT",
            "mode": "id"
          },
          "fields": {
            "values": []
          }
        }
      },
      {
        "id": "call-notify-slack-001",
        "name": "Tool: Notify Slack",
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [640, 400],
        "parameters": {
          "name": "notify_slack",
          "description": "Send a notification message to the Slack #general channel. Use this to deliver summaries, alerts, or results back to the team.",
          "workflowId": {
            "__rl": true,
            "value": "1Le5feQie2ouGD9S",
            "mode": "id"
          },
          "fields": {
            "values": [
              {
                "name": "message",
                "stringValue": "={{ $fromAI('message', 'The message to send to Slack') }}"
              }
            ]
          }
        }
      }
    ],
    "connections": {
      "MCP Server Trigger": {
        "ai_tool": [
          [
            {
              "node": "Tool: Fetch Top News",
              "type": "ai_tool",
              "index": 0
            }
          ],
          [
            {
              "node": "Tool: Notify Slack",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null
  },
  {
    "name": "Tool: Fetch Top News",
    "nodes": [
      {
        "id": "exec-trigger-001",
        "name": "When Executed by Another Workflow",
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [0, 300],
        "parameters": {
          "respondWith": "usingResponseNode"
        }
      },
      {
        "id": "http-hn-001",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [220, 300],
        "parameters": {
          "method": "GET",
          "url": "https://hn.algolia.com/api/v1/search?tags=front_page&hitsPerPage=10",
          "options": {}
        }
      },
      {
        "id": "code-top5-001",
        "name": "Extract Top 5",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [440, 300],
        "parameters": {
          "jsCode": "const hits = $input.first().json.hits;\nconst top5 = hits.slice(0, 5).map(h => ({\n  title: h.title,\n  url: h.url,\n  score: h.points\n}));\nreturn [{ json: { stories: top5 } }];"
        }
      },
      {
        "id": "respond-001",
        "name": "Respond to Webhook",
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.1,
        "position": [660, 300],
        "parameters": {
          "respondWith": "json",
          "responseBody": "={{ $json }}"
        }
      }
    ],
    "connections": {
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Extract Top 5",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Extract Top 5": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null
  },
  {
    "name": "Tool: Notify Slack",
    "nodes": [
      {
        "id": "exec-trigger-002",
        "name": "When Executed by Another Workflow",
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [0, 300],
        "parameters": {
          "respondWith": "usingResponseNode"
        }
      },
      {
        "id": "slack-001",
        "name": "Slack",
        "type": "n8n-nodes-base.slack",
        "typeVersion": 2.3,
        "position": [220, 300],
        "credentials": {
          "slackOAuth2Api": {
            "id": "REPLACE_WITH_YOUR_SLACK_CREDENTIAL_ID",
            "name": "Slack account"
          }
        },
        "parameters": {
          "resource": "message",
          "operation": "post",
          "select": "channel",
          "channelId": {
            "__rl": true,
            "value": "general",
            "mode": "name"
          },
          "messageType": "text",
          "text": "={{ $json.message }}"
        }
      },
      {
        "id": "respond-002",
        "name": "Respond to Webhook",
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.1,
        "position": [440, 300],
        "parameters": {
          "respondWith": "json",
          "responseBody": "={ \"ok\": true }"
        }
      }
    ],
    "connections": {
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "Slack",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Slack": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null
  }
]
