{
  "name": "wFirma MCP Client Tool Example",
  "description": "Przykład użycia MCP Client Tool z wFirma MCP Server",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "command": "node",
        "args": "={{ [\"E:\\\\_PROJEKTY\\\\MCP_wFirma\\\\dist\\\\index.js\"] }}",
        "workingDirectory": "E:\\_PROJEKTY\\MCP_wFirma",
        "environment": {
          "WFIRMA_ACCESS_KEY": "={{ $env.WFIRMA_ACCESS_KEY }}",
          "WFIRMA_SECRET_KEY": "={{ $env.WFIRMA_SECRET_KEY }}",
          "WFIRMA_APP_KEY": "={{ $env.WFIRMA_APP_KEY }}",
          "WFIRMA_COMPANY_ID": "={{ $env.WFIRMA_COMPANY_ID }}",
          "WFIRMA_API_URL": "={{ $env.WFIRMA_API_URL }}"
        },
        "toolsToInclude": [
          "get_invoices",
          "create_invoice",
          "get_contractors",
          "get_contractor",
          "get_contractor_by_tax_no",
          "search_contractors",
          "create_contractor",
          "get_stock",
          "get_financial_summary",
          "get_expenses",
          "get_payments"
        ]
      },
      "id": "mcp-client-tool",
      "name": "wFirma MCP Client Tool",
      "type": "n8n-nodes-mcp.mcpClientTool",
      "typeVersion": 1,
      "position": [460, 300]
    },
    {
      "parameters": {
        "toolName": "get_invoices",
        "arguments": "={{ {\n  \"limit\": 10,\n  \"date_from\": \"2024-01-01\",\n  \"date_to\": \"2024-12-31\"\n} }}"
      },
      "id": "get-invoices",
      "name": "Get Invoices",
      "type": "n8n-nodes-mcp.mcpToolCall",
      "typeVersion": 1,
      "position": [680, 300]
    },
    {
      "parameters": {
        "values": {
          "string": [
            {
              "name": "status",
              "value": "={{ $json.result ? 'success' : 'error' }}"
            },
            {
              "name": "invoices_count",
              "value": "={{ $json.result?.content?.[0]?.text ? JSON.parse($json.result.content[0].text).data?.length || 0 : 0 }}"
            },
            {
              "name": "raw_response",
              "value": "={{ $json }}"
            }
          ]
        },
        "options": {}
      },
      "id": "process-results",
      "name": "Process Results",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [900, 300]
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "wFirma MCP Client Tool",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "wFirma MCP Client Tool": {
      "main": [
        [
          {
            "node": "Get Invoices",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invoices": {
      "main": [
        [
          {
            "node": "Process Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": ["wfirma", "mcp", "invoices"],
  "triggerCount": 0,
  "updatedAt": "2024-10-07T13:00:00.000Z",
  "versionId": "1"
}

