NAME
App::MCP::CLI::Command::list - List all tools available on an MCP server
VERSION
This module is distributed as part of App::MCP::CLI v0.0.1.
SYNOPSIS
# Print a table of every tool the server exposes
mcpcli list --server perl-math-server
# The only configured server is used when --server is omitted
mcpcli list
# Use a script, a raw command, or an SSE URL instead of a config name
mcpcli list --server ./stdio_server.pl
mcpcli list --server "node server.js"
mcpcli list --server http://localhost:8080/sse
DESCRIPTION
App::MCP::CLI::Command::list implements the list sub-command of the mcpcli application. It connects to the MCP server over stdio or HTTP/SSE (through App::MCP::CLI::Client), completes the initialize handshake, sends tools/list (following pagination), and renders the resulting tool catalogue as a plain ASCII table using Text::Table::Tiny.
The table has two columns:
Tool Name - the
namefield from the tool descriptor.Description - the
descriptionfield, orN/Awhen absent.
If the server returns an empty tool list the message No tools found on the server. is printed instead.
USAGE
mcpcli list [--server <name|path|url|command>] [--config <file>] [--timeout <seconds>]
OPTIONS
--server|-sname-
Server name from the config file, a
.plscript, a URL, or a command. May be omitted when the config file defines exactly one server. --config|-cpath-
Path to the JSON configuration file. See App::MCP::CLI::Config.
--timeout|-tseconds-
How long to wait for the server (default 30;
0waits forever).
EXIT STATUS
0 on success, 1 if the server could not be started or reached, did not answer in time, or the configuration is invalid. Errors are printed to STDERR.
INTERNAL METHODS
opt_spec
Defines the command-line option specification passed to Getopt::Long::Descriptive via App::Cmd.
description
Returns a one-line description used in the top-level mcpcli help listing.
abstract
Returns the same one-line description for the App::Cmd abstract slot.
execute( $opt, $args )
Main entry point. Connects to the MCP server, retrieves the tool list, and prints the ASCII table (or a "none found" notice).
SEE ALSO
AUTHOR
Mohammad Sajid Anwar, <mohammad.anwar at yahoo.com>
REPOSITORY
https://github.com/manwar/App-MCP-CLI
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/manwar/App-MCP-CLI/issues. I will be notified and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc App::MCP::CLI
You can also look for information at:
BUG Report
Search MetaCPAN
LICENSE AND COPYRIGHT
Copyright (C) 2026 Mohammad Sajid Anwar.
This program is free software; you can redistribute it and / or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
http://www.perlfoundation.org/artistic_license_2_0
Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License.By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.
If your Modified Version has been derived from a Modified Version made by someone other than you,you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.
This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.
This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement,then this Artistic License to you shall terminate on the date that such litigation is filed.
Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.