dual-mode / hello

hello - cli-mcp examples/dual-mode

NAME

hello - print a greeting

SYNOPSIS

hello

[--lang]=[value]
[--loud]

DESCRIPTION

Prints a greeting. Reachable as the CLI subcommand dual-mode hello or the MCP tool hello. Input schema: loud (bool), lang (string, default "en"), args (string array).

Examples:

# CLI form
./dual-mode hello world
# hello, world

# MCP form, stdio
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"hello","arguments":{"args":["world"]}}}' | ./dual-mode mcp serve

# MCP form, HTTP
./dual-mode mcp serve-http --addr 127.0.0.1:8080 &
curl -sS -X POST http://127.0.0.1:8080/mcp ...

Both invocation paths run the same Action body. There is no special case for "called via MCP", so behavior is identical and surprises are minimized.

Usage:

hello [GLOBAL OPTIONS] [command [COMMAND OPTIONS]] [ARGUMENTS...]

GLOBAL OPTIONS

--lang="": language: en or es (default: "en")

--loud: shout the greeting