skedyul 1.2.10 → 1.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -3402,6 +3402,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
3402
3402
  if (pathname === "/mcp" && req.method === "POST") {
3403
3403
  try {
3404
3404
  const body = await parseJSONBody(req);
3405
+ if (body?.method === "tools/call") {
3406
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
3407
+ method: body.method,
3408
+ toolName: body.params?.name,
3409
+ hasArguments: !!body.params?.arguments,
3410
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
3411
+ hasEnv: !!body.params?.arguments?.env,
3412
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
3413
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
3414
+ }, null, 2));
3415
+ }
3405
3416
  if (body?.method === "tools/list") {
3406
3417
  sendJSON(res, 200, {
3407
3418
  jsonrpc: "2.0",
@@ -4071,11 +4082,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
4071
4082
  } else if (rpcMethod === "tools/call") {
4072
4083
  const toolName = params?.name;
4073
4084
  const rawArgs = params?.arguments ?? {};
4085
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
4086
+ toolName,
4087
+ hasArguments: !!params?.arguments,
4088
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
4089
+ hasEnv: "env" in rawArgs,
4090
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
4091
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
4092
+ }, null, 2));
4074
4093
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
4075
4094
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
4076
4095
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
4077
4096
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
4078
4097
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
4098
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
4099
+ hasSkedyulFormat,
4100
+ hasToolEnv: !!toolEnv,
4101
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
4102
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
4103
+ }, null, 2));
4079
4104
  let toolKey = null;
4080
4105
  let tool = null;
4081
4106
  for (const [key, t] of Object.entries(registry)) {
@@ -4304,11 +4329,20 @@ function createSkedyulServer(config, registry, webhookRegistry) {
4304
4329
  // outputSchema: outputZodSchema,
4305
4330
  },
4306
4331
  async (args2) => {
4332
+ console.log(`[mcpServer.registerTool] Tool ${toolName} received raw args:`, JSON.stringify(args2, null, 2));
4307
4333
  const rawArgs = args2;
4308
4334
  const toolInputs = rawArgs.inputs ?? {};
4309
4335
  const toolContext = rawArgs.context;
4310
4336
  const toolEnv = rawArgs.env;
4311
4337
  const toolInvocation = rawArgs.invocation;
4338
+ console.log(`[mcpServer.registerTool] Tool ${toolName} extracted:`, {
4339
+ hasInputs: !!rawArgs.inputs,
4340
+ hasContext: !!rawArgs.context,
4341
+ hasEnv: !!rawArgs.env,
4342
+ hasInvocation: !!rawArgs.invocation,
4343
+ envKeys: toolEnv ? Object.keys(toolEnv) : [],
4344
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
4345
+ });
4312
4346
  let validatedInputs = toolInputs;
4313
4347
  if (inputZodSchema) {
4314
4348
  try {
@@ -1234,6 +1234,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
1234
1234
  if (pathname === "/mcp" && req.method === "POST") {
1235
1235
  try {
1236
1236
  const body = await parseJSONBody(req);
1237
+ if (body?.method === "tools/call") {
1238
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
1239
+ method: body.method,
1240
+ toolName: body.params?.name,
1241
+ hasArguments: !!body.params?.arguments,
1242
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
1243
+ hasEnv: !!body.params?.arguments?.env,
1244
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
1245
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
1246
+ }, null, 2));
1247
+ }
1237
1248
  if (body?.method === "tools/list") {
1238
1249
  sendJSON(res, 200, {
1239
1250
  jsonrpc: "2.0",
@@ -1903,11 +1914,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1903
1914
  } else if (rpcMethod === "tools/call") {
1904
1915
  const toolName = params?.name;
1905
1916
  const rawArgs = params?.arguments ?? {};
1917
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
1918
+ toolName,
1919
+ hasArguments: !!params?.arguments,
1920
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
1921
+ hasEnv: "env" in rawArgs,
1922
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
1923
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
1924
+ }, null, 2));
1906
1925
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
1907
1926
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
1908
1927
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
1909
1928
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
1910
1929
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
1930
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
1931
+ hasSkedyulFormat,
1932
+ hasToolEnv: !!toolEnv,
1933
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
1934
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
1935
+ }, null, 2));
1911
1936
  let toolKey = null;
1912
1937
  let tool = null;
1913
1938
  for (const [key, t] of Object.entries(registry)) {
@@ -2136,11 +2161,20 @@ function createSkedyulServer(config, registry, webhookRegistry) {
2136
2161
  // outputSchema: outputZodSchema,
2137
2162
  },
2138
2163
  async (args) => {
2164
+ console.log(`[mcpServer.registerTool] Tool ${toolName} received raw args:`, JSON.stringify(args, null, 2));
2139
2165
  const rawArgs = args;
2140
2166
  const toolInputs = rawArgs.inputs ?? {};
2141
2167
  const toolContext = rawArgs.context;
2142
2168
  const toolEnv = rawArgs.env;
2143
2169
  const toolInvocation = rawArgs.invocation;
2170
+ console.log(`[mcpServer.registerTool] Tool ${toolName} extracted:`, {
2171
+ hasInputs: !!rawArgs.inputs,
2172
+ hasContext: !!rawArgs.context,
2173
+ hasEnv: !!rawArgs.env,
2174
+ hasInvocation: !!rawArgs.invocation,
2175
+ envKeys: toolEnv ? Object.keys(toolEnv) : [],
2176
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
2177
+ });
2144
2178
  let validatedInputs = toolInputs;
2145
2179
  if (inputZodSchema) {
2146
2180
  try {
@@ -2902,6 +2902,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
2902
2902
  if (pathname === "/mcp" && req.method === "POST") {
2903
2903
  try {
2904
2904
  const body = await parseJSONBody(req);
2905
+ if (body?.method === "tools/call") {
2906
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
2907
+ method: body.method,
2908
+ toolName: body.params?.name,
2909
+ hasArguments: !!body.params?.arguments,
2910
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
2911
+ hasEnv: !!body.params?.arguments?.env,
2912
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
2913
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
2914
+ }, null, 2));
2915
+ }
2905
2916
  if (body?.method === "tools/list") {
2906
2917
  sendJSON(res, 200, {
2907
2918
  jsonrpc: "2.0",
@@ -3571,11 +3582,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
3571
3582
  } else if (rpcMethod === "tools/call") {
3572
3583
  const toolName = params?.name;
3573
3584
  const rawArgs = params?.arguments ?? {};
3585
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
3586
+ toolName,
3587
+ hasArguments: !!params?.arguments,
3588
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
3589
+ hasEnv: "env" in rawArgs,
3590
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
3591
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
3592
+ }, null, 2));
3574
3593
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
3575
3594
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
3576
3595
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
3577
3596
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
3578
3597
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
3598
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
3599
+ hasSkedyulFormat,
3600
+ hasToolEnv: !!toolEnv,
3601
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
3602
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
3603
+ }, null, 2));
3579
3604
  let toolKey = null;
3580
3605
  let tool = null;
3581
3606
  for (const [key, t] of Object.entries(registry)) {
@@ -3804,11 +3829,20 @@ function createSkedyulServer(config, registry, webhookRegistry) {
3804
3829
  // outputSchema: outputZodSchema,
3805
3830
  },
3806
3831
  async (args) => {
3832
+ console.log(`[mcpServer.registerTool] Tool ${toolName} received raw args:`, JSON.stringify(args, null, 2));
3807
3833
  const rawArgs = args;
3808
3834
  const toolInputs = rawArgs.inputs ?? {};
3809
3835
  const toolContext = rawArgs.context;
3810
3836
  const toolEnv = rawArgs.env;
3811
3837
  const toolInvocation = rawArgs.invocation;
3838
+ console.log(`[mcpServer.registerTool] Tool ${toolName} extracted:`, {
3839
+ hasInputs: !!rawArgs.inputs,
3840
+ hasContext: !!rawArgs.context,
3841
+ hasEnv: !!rawArgs.env,
3842
+ hasInvocation: !!rawArgs.invocation,
3843
+ envKeys: toolEnv ? Object.keys(toolEnv) : [],
3844
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
3845
+ });
3812
3846
  let validatedInputs = toolInputs;
3813
3847
  if (inputZodSchema) {
3814
3848
  try {
package/dist/index.js CHANGED
@@ -3067,6 +3067,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
3067
3067
  if (pathname === "/mcp" && req.method === "POST") {
3068
3068
  try {
3069
3069
  const body = await parseJSONBody(req);
3070
+ if (body?.method === "tools/call") {
3071
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
3072
+ method: body.method,
3073
+ toolName: body.params?.name,
3074
+ hasArguments: !!body.params?.arguments,
3075
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
3076
+ hasEnv: !!body.params?.arguments?.env,
3077
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
3078
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
3079
+ }, null, 2));
3080
+ }
3070
3081
  if (body?.method === "tools/list") {
3071
3082
  sendJSON(res, 200, {
3072
3083
  jsonrpc: "2.0",
@@ -3736,11 +3747,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
3736
3747
  } else if (rpcMethod === "tools/call") {
3737
3748
  const toolName = params?.name;
3738
3749
  const rawArgs = params?.arguments ?? {};
3750
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
3751
+ toolName,
3752
+ hasArguments: !!params?.arguments,
3753
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
3754
+ hasEnv: "env" in rawArgs,
3755
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
3756
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
3757
+ }, null, 2));
3739
3758
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
3740
3759
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
3741
3760
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
3742
3761
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
3743
3762
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
3763
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
3764
+ hasSkedyulFormat,
3765
+ hasToolEnv: !!toolEnv,
3766
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
3767
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
3768
+ }, null, 2));
3744
3769
  let toolKey = null;
3745
3770
  let tool = null;
3746
3771
  for (const [key, t] of Object.entries(registry)) {
@@ -3969,11 +3994,20 @@ function createSkedyulServer(config, registry, webhookRegistry) {
3969
3994
  // outputSchema: outputZodSchema,
3970
3995
  },
3971
3996
  async (args) => {
3997
+ console.log(`[mcpServer.registerTool] Tool ${toolName} received raw args:`, JSON.stringify(args, null, 2));
3972
3998
  const rawArgs = args;
3973
3999
  const toolInputs = rawArgs.inputs ?? {};
3974
4000
  const toolContext = rawArgs.context;
3975
4001
  const toolEnv = rawArgs.env;
3976
4002
  const toolInvocation = rawArgs.invocation;
4003
+ console.log(`[mcpServer.registerTool] Tool ${toolName} extracted:`, {
4004
+ hasInputs: !!rawArgs.inputs,
4005
+ hasContext: !!rawArgs.context,
4006
+ hasEnv: !!rawArgs.env,
4007
+ hasInvocation: !!rawArgs.invocation,
4008
+ envKeys: toolEnv ? Object.keys(toolEnv) : [],
4009
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
4010
+ });
3977
4011
  let validatedInputs = toolInputs;
3978
4012
  if (inputZodSchema) {
3979
4013
  try {
package/dist/server.js CHANGED
@@ -1234,6 +1234,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
1234
1234
  if (pathname === "/mcp" && req.method === "POST") {
1235
1235
  try {
1236
1236
  const body = await parseJSONBody(req);
1237
+ if (body?.method === "tools/call") {
1238
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
1239
+ method: body.method,
1240
+ toolName: body.params?.name,
1241
+ hasArguments: !!body.params?.arguments,
1242
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
1243
+ hasEnv: !!body.params?.arguments?.env,
1244
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
1245
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
1246
+ }, null, 2));
1247
+ }
1237
1248
  if (body?.method === "tools/list") {
1238
1249
  sendJSON(res, 200, {
1239
1250
  jsonrpc: "2.0",
@@ -1903,11 +1914,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1903
1914
  } else if (rpcMethod === "tools/call") {
1904
1915
  const toolName = params?.name;
1905
1916
  const rawArgs = params?.arguments ?? {};
1917
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
1918
+ toolName,
1919
+ hasArguments: !!params?.arguments,
1920
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
1921
+ hasEnv: "env" in rawArgs,
1922
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
1923
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
1924
+ }, null, 2));
1906
1925
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
1907
1926
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
1908
1927
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
1909
1928
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
1910
1929
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
1930
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
1931
+ hasSkedyulFormat,
1932
+ hasToolEnv: !!toolEnv,
1933
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
1934
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
1935
+ }, null, 2));
1911
1936
  let toolKey = null;
1912
1937
  let tool = null;
1913
1938
  for (const [key, t] of Object.entries(registry)) {
@@ -2136,11 +2161,20 @@ function createSkedyulServer(config, registry, webhookRegistry) {
2136
2161
  // outputSchema: outputZodSchema,
2137
2162
  },
2138
2163
  async (args) => {
2164
+ console.log(`[mcpServer.registerTool] Tool ${toolName} received raw args:`, JSON.stringify(args, null, 2));
2139
2165
  const rawArgs = args;
2140
2166
  const toolInputs = rawArgs.inputs ?? {};
2141
2167
  const toolContext = rawArgs.context;
2142
2168
  const toolEnv = rawArgs.env;
2143
2169
  const toolInvocation = rawArgs.invocation;
2170
+ console.log(`[mcpServer.registerTool] Tool ${toolName} extracted:`, {
2171
+ hasInputs: !!rawArgs.inputs,
2172
+ hasContext: !!rawArgs.context,
2173
+ hasEnv: !!rawArgs.env,
2174
+ hasInvocation: !!rawArgs.invocation,
2175
+ envKeys: toolEnv ? Object.keys(toolEnv) : [],
2176
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
2177
+ });
2144
2178
  let validatedInputs = toolInputs;
2145
2179
  if (inputZodSchema) {
2146
2180
  try {
@@ -1173,6 +1173,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
1173
1173
  if (pathname === "/mcp" && req.method === "POST") {
1174
1174
  try {
1175
1175
  const body = await parseJSONBody(req);
1176
+ if (body?.method === "tools/call") {
1177
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
1178
+ method: body.method,
1179
+ toolName: body.params?.name,
1180
+ hasArguments: !!body.params?.arguments,
1181
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
1182
+ hasEnv: !!body.params?.arguments?.env,
1183
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
1184
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
1185
+ }, null, 2));
1186
+ }
1176
1187
  if (body?.method === "tools/list") {
1177
1188
  sendJSON(res, 200, {
1178
1189
  jsonrpc: "2.0",
@@ -1842,11 +1853,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1842
1853
  } else if (rpcMethod === "tools/call") {
1843
1854
  const toolName = params?.name;
1844
1855
  const rawArgs = params?.arguments ?? {};
1856
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
1857
+ toolName,
1858
+ hasArguments: !!params?.arguments,
1859
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
1860
+ hasEnv: "env" in rawArgs,
1861
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
1862
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
1863
+ }, null, 2));
1845
1864
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
1846
1865
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
1847
1866
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
1848
1867
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
1849
1868
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
1869
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
1870
+ hasSkedyulFormat,
1871
+ hasToolEnv: !!toolEnv,
1872
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
1873
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
1874
+ }, null, 2));
1850
1875
  let toolKey = null;
1851
1876
  let tool = null;
1852
1877
  for (const [key, t] of Object.entries(registry)) {
@@ -2075,11 +2100,20 @@ function createSkedyulServer(config, registry, webhookRegistry) {
2075
2100
  // outputSchema: outputZodSchema,
2076
2101
  },
2077
2102
  async (args) => {
2103
+ console.log(`[mcpServer.registerTool] Tool ${toolName} received raw args:`, JSON.stringify(args, null, 2));
2078
2104
  const rawArgs = args;
2079
2105
  const toolInputs = rawArgs.inputs ?? {};
2080
2106
  const toolContext = rawArgs.context;
2081
2107
  const toolEnv = rawArgs.env;
2082
2108
  const toolInvocation = rawArgs.invocation;
2109
+ console.log(`[mcpServer.registerTool] Tool ${toolName} extracted:`, {
2110
+ hasInputs: !!rawArgs.inputs,
2111
+ hasContext: !!rawArgs.context,
2112
+ hasEnv: !!rawArgs.env,
2113
+ hasInvocation: !!rawArgs.invocation,
2114
+ envKeys: toolEnv ? Object.keys(toolEnv) : [],
2115
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
2116
+ });
2083
2117
  let validatedInputs = toolInputs;
2084
2118
  if (inputZodSchema) {
2085
2119
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.2.10",
3
+ "version": "1.2.12",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",