Skip to content

feat(cli): add non-interactive list-tools command#29

Open
syf2211 wants to merge 1 commit into
wong2:mainfrom
syf2211:feat/list-tools
Open

feat(cli): add non-interactive list-tools command#29
syf2211 wants to merge 1 commit into
wong2:mainfrom
syf2211:feat/list-tools

Conversation

@syf2211

@syf2211 syf2211 commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Add list-tools <server_name> for non-interactive discovery of MCP tools from a configured server.

Fixes #17

Motivation

Scripting and automation workflows need a way to enumerate tools without entering the interactive inspector. Issue #17 requests a command alongside call-tool for this purpose.

Changes

  • Route list-tools <server_name> through the existing config-based non-interactive connection path
  • Dispatch to client.listTools() and print JSON to stdout (same error handling as call-tool)
  • Document usage in README and CHANGELOG

Tests

  • node --check src/cli.js
  • node --check src/mcp.js

Notes

  • Stdio/config mode only, matching existing non-interactive commands (call-tool, read-resource, get-prompt)
  • composer-2.5 review: APPROVE after consolidating into runWithConfigNonInteractive

Fixes wong2#17

Add list-tools <server_name> beside call-tool for scripting and
automation. Reuses the existing config-based non-interactive connection
path and prints listTools() JSON to stdout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List tools non-interactively

1 participant