pub fn parse_request(args: &[String]) -> Result<Request, ParseError>Expand description
Parse an argv slice into a typed Request. Accepts either
shape:
- With a program-name prefix (
["objectiveai", "agents", "list"]) — matchesstd::env::args()and binary entry-point usage. - Without one (
["agents", "list"]) — matchessuper::CommandRequest::into_command’s output shape and the “command-only” shape MCP callers send.
If args[0] is "objectiveai" we pass it straight through;
otherwise we prepend so clap (which always treats argv[0] as the
program name) sees a well-formed argv. Hides clap behind the SDK
boundary so downstream crates can dispatch arbitrary argv without
taking a clap dep themselves.