{
	"name": "Test Altertable MCP",
	"active": false,
	"nodes": [
		{
			"name": "Manual trigger",
			"id": "089cbd95-5d32-40a9-bdf4-1505c648b5fb",
			"type": "n8n-nodes-base.manualTrigger",
			"typeVersion": 1,
			"position": [0, 0],
			"parameters": {}
		},
		{
			"name": "Initialize Altertable",
			"id": "da48fa5c-82bc-4fe9-9f7a-1bd7e8fe8370",
			"type": "@n8n/n8n-nodes-langchain.mcpClient",
			"typeVersion": 1.1,
			"position": [240, 0],
			"parameters": {
				"serverTransport": "httpStreamable",
				"endpointUrl": "https://mcp.altertable.ai/mcp",
				"authentication": "mcpOAuth2Api",
				"tool": {
					"__rl": true,
					"value": "initialize",
					"mode": "id"
				},
				"inputMode": "json",
				"jsonInput": "{}",
				"options": {}
			}
		},
		{
			"name": "Run sample query",
			"id": "67dc3a49-f2d4-4c35-8abd-bb0b2ef95298",
			"type": "@n8n/n8n-nodes-langchain.mcpClient",
			"typeVersion": 1.1,
			"position": [480, 0],
			"parameters": {
				"serverTransport": "httpStreamable",
				"endpointUrl": "https://mcp.altertable.ai/mcp",
				"authentication": "mcpOAuth2Api",
				"tool": {
					"__rl": true,
					"value": "query_lakehouse",
					"mode": "id"
				},
				"inputMode": "json",
				"jsonInput": "{\"statement\": \"SELECT 1 AS ok\"}",
				"options": {}
			}
		},
		{
			"name": "Format query result",
			"id": "5316d3e0-fdc1-4bb6-8c74-d8fdc4f41952",
			"type": "n8n-nodes-base.code",
			"typeVersion": 2,
			"position": [720, 0],
			"parameters": {
				"mode": "runOnceForAllItems",
				"jsCode": "return $input.all().flatMap((item, index) => {\n  const { columns, rows } = item.json.structuredContent;\n  return rows.map(row => ({\n    json: Object.fromEntries(columns.map((column, i) => [column.name, row[i]])),\n    pairedItem: { item: index },\n  }));\n});"
			}
		}
	],
	"connections": {
		"Manual trigger": {
			"main": [
				[
					{
						"node": "Initialize Altertable",
						"type": "main",
						"index": 0
					}
				]
			]
		},
		"Initialize Altertable": {
			"main": [
				[
					{
						"node": "Run sample query",
						"type": "main",
						"index": 0
					}
				]
			]
		},
		"Run sample query": {
			"main": [
				[
					{
						"node": "Format query result",
						"type": "main",
						"index": 0
					}
				]
			]
		}
	},
	"settings": {
		"executionOrder": "v1"
	}
}
