@mcp-use/cli 3.2.0-canary.12 → 3.2.0-canary.13

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/index.js CHANGED
@@ -3259,6 +3259,11 @@ function parseDeviceScaleFactor(raw) {
3259
3259
  }
3260
3260
  return n;
3261
3261
  }
3262
+ function requiresArguments(inputSchema) {
3263
+ if (!inputSchema || typeof inputSchema !== "object") return false;
3264
+ const required = inputSchema.required;
3265
+ return Array.isArray(required) && required.length > 0;
3266
+ }
3262
3267
  var AD_HOC_SESSION_NAME = "__screenshot_ad_hoc__";
3263
3268
  async function resolveSessionForScreenshot(options, sessionName, headers) {
3264
3269
  if (sessionName) {
@@ -3387,6 +3392,18 @@ async function screenshotCommand(options, argsList, context) {
3387
3392
  exitCode = 1;
3388
3393
  return;
3389
3394
  }
3395
+ } else if (requiresArguments(tool.inputSchema)) {
3396
+ console.error(formatError("This tool requires arguments."));
3397
+ console.log("");
3398
+ console.log(formatInfo("Provide arguments as key=value pairs:"));
3399
+ console.log(
3400
+ ` npx ${context.usagePrefix} --tool ${options.tool} key=value [key2=value2 ...]`
3401
+ );
3402
+ console.log("");
3403
+ console.log(formatInfo("Tool schema:"));
3404
+ console.log(formatSchema(tool.inputSchema));
3405
+ exitCode = 1;
3406
+ return;
3390
3407
  }
3391
3408
  const toolOutput = await session.callTool(options.tool, toolArgs);
3392
3409
  const result = await captureToolScreenshot(