mcp-cli-skill 0.4.4__tar.gz → 0.4.6__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp-cli-skill
3
- Version: 0.4.4
3
+ Version: 0.4.6
4
4
  Summary: Call any MCP server tool from the command line with shell composition support
5
5
  Project-URL: Homepage, https://github.com/wise-toddler/mcp-cli-skill
6
6
  Project-URL: Repository, https://github.com/wise-toddler/mcp-cli-skill
@@ -39,7 +39,7 @@ mcp-call <server> --tools # discover tools (human-readable
39
39
  mcp-call <server> --discover # discover tools as JSON with schemas
40
40
  mcp-call <server> <tool> --schema # show tool's input schema as JSON
41
41
  mcp-call <server> <tool> --key=value ... # call a tool
42
- mcp-call <server> <tool> --json '{"key":"val"}' # call with JSON args
42
+ mcp-call <server> <tool> --input-json '{"k":"v"}' # call with JSON args
43
43
  echo '{}' | mcp-call <server> <tool> # call with stdin JSON
44
44
  ```
45
45
 
@@ -23,7 +23,7 @@ mcp-call <server> --tools # discover tools (human-readable
23
23
  mcp-call <server> --discover # discover tools as JSON with schemas
24
24
  mcp-call <server> <tool> --schema # show tool's input schema as JSON
25
25
  mcp-call <server> <tool> --key=value ... # call a tool
26
- mcp-call <server> <tool> --json '{"key":"val"}' # call with JSON args
26
+ mcp-call <server> <tool> --input-json '{"k":"v"}' # call with JSON args
27
27
  echo '{}' | mcp-call <server> <tool> # call with stdin JSON
28
28
  ```
29
29
 
@@ -17,7 +17,7 @@ mcp-call <server> --tools # list tools (human-readab
17
17
  mcp-call <server> --discover # list tools as JSON with schemas
18
18
  mcp-call <server> <tool> --schema # show tool's input schema as JSON
19
19
  mcp-call <server> <tool> --key=value ... # call a tool
20
- mcp-call <server> <tool> --json '{"key":"val"}' # call with JSON args
20
+ mcp-call <server> <tool> --input-json '{"key":"val"}' # call with JSON args
21
21
  echo '{}' | mcp-call <server> <tool> # call with stdin JSON
22
22
  mcp-call --add <name> <cmd> [args] [--env K=V ...] # add stdio server
23
23
  mcp-call --add-http <name> <url> # add HTTP server
@@ -101,7 +101,7 @@ def parse_args():
101
101
  break
102
102
  sys.exit(0)
103
103
  if not args or args[0] in ("-h", "--help"):
104
- print("Usage: mcp-call <server> <tool> [--key=value ...] [--json '{...}']", file=sys.stderr)
104
+ print("Usage: mcp-call <server> <tool> [--key=value ...] [--input-json '{...}']", file=sys.stderr)
105
105
  print(" mcp-call --servers", file=sys.stderr)
106
106
  print(" mcp-call <server> --tools", file=sys.stderr)
107
107
  print(" mcp-call <server> --discover", file=sys.stderr)
@@ -151,16 +151,21 @@ def parse_args():
151
151
  arg = args[i]
152
152
  if arg == "--schema":
153
153
  return server, "__schema__", {"_tool": tool}
154
- elif arg == "--json" and i + 1 < len(args):
154
+ elif arg == "--input-json" and i + 1 < len(args):
155
155
  tool_args.update(json.loads(args[i + 1]))
156
156
  i += 2
157
157
  continue
158
- elif arg.startswith("--json="):
159
- tool_args.update(json.loads(arg[7:]))
158
+ elif arg.startswith("--input-json="):
159
+ tool_args.update(json.loads(arg[13:]))
160
160
  elif arg.startswith("--") and "=" in arg:
161
161
  key, val = arg[2:].split("=", 1)
162
162
  tool_args[key] = parse_value(val)
163
163
  elif arg.startswith("--"):
164
+ # --flag value (space-separated) or --flag (boolean)
165
+ if i + 1 < len(args) and not args[i + 1].startswith("--"):
166
+ tool_args[arg[2:]] = parse_value(args[i + 1])
167
+ i += 2
168
+ continue
164
169
  tool_args[arg[2:]] = True
165
170
  i += 1
166
171
  # read JSON from stdin if no args provided and stdin is piped
@@ -1,2 +1,2 @@
1
1
  """MCP CLI - Call any MCP server tool from the command line."""
2
- __version__ = "0.4.4"
2
+ __version__ = "0.4.6"
@@ -101,7 +101,7 @@ def parse_args():
101
101
  break
102
102
  sys.exit(0)
103
103
  if not args or args[0] in ("-h", "--help"):
104
- print("Usage: mcp-call <server> <tool> [--key=value ...] [--json '{...}']", file=sys.stderr)
104
+ print("Usage: mcp-call <server> <tool> [--key=value ...] [--input-json '{...}']", file=sys.stderr)
105
105
  print(" mcp-call --servers", file=sys.stderr)
106
106
  print(" mcp-call <server> --tools", file=sys.stderr)
107
107
  print(" mcp-call <server> --discover", file=sys.stderr)
@@ -151,16 +151,21 @@ def parse_args():
151
151
  arg = args[i]
152
152
  if arg == "--schema":
153
153
  return server, "__schema__", {"_tool": tool}
154
- elif arg == "--json" and i + 1 < len(args):
154
+ elif arg == "--input-json" and i + 1 < len(args):
155
155
  tool_args.update(json.loads(args[i + 1]))
156
156
  i += 2
157
157
  continue
158
- elif arg.startswith("--json="):
159
- tool_args.update(json.loads(arg[7:]))
158
+ elif arg.startswith("--input-json="):
159
+ tool_args.update(json.loads(arg[13:]))
160
160
  elif arg.startswith("--") and "=" in arg:
161
161
  key, val = arg[2:].split("=", 1)
162
162
  tool_args[key] = parse_value(val)
163
163
  elif arg.startswith("--"):
164
+ # --flag value (space-separated) or --flag (boolean)
165
+ if i + 1 < len(args) and not args[i + 1].startswith("--"):
166
+ tool_args[arg[2:]] = parse_value(args[i + 1])
167
+ i += 2
168
+ continue
164
169
  tool_args[arg[2:]] = True
165
170
  i += 1
166
171
  # read JSON from stdin if no args provided and stdin is piped