Skip to content

fix: show error message when tool list gets invalid connection name#681

Merged
calclavia merged 1 commit intomainfrom
calclavia/tool-list-typo-error
Feb 28, 2026
Merged

fix: show error message when tool list gets invalid connection name#681
calclavia merged 1 commit intomainfrom
calclavia/tool-list-typo-error

Conversation

@calclavia
Copy link
Contributor

What's added in this PR?

Added a prominent red error message in text mode when smithery tool list <name> is called with a non-existent connection ID. Previously, the error only existed in the JSON payload and was ignored in text mode, resulting in a silent failure with just a dimmed tip.

Now when a user misspells a connection name (e.g., betterstak instead of betterstack), they see:

Connection "betterstak" not found
smithery mcp list - List all connections

What's the issues or discussion related to this PR?

Previous behavior: Running smithery tool list betterstak (a typo) silently displayed only the dimmed tip "smithery mcp list - List all connections" with no indication the connection name was invalid.

New behavior: A clear red error message tells the user the connection wasn't found, making it obvious they need to check the connection name or list available connections.

This matches the existing error handling pattern used elsewhere in the codebase (e.g., tool.ts, get.ts, event commands).

When running `smithery tool list <name>` with a typo (e.g. betterstak instead
of betterstack), the CLI silently showed only a dimmed tip with no indication
that the connection name was invalid. The error message existed only in the
JSON payload and was ignored in text mode.

Now display a prominent red error message in text mode when getConnection()
fails, matching the error handling pattern used elsewhere in the codebase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor Author

calclavia commented Feb 28, 2026

Merge activity

  • Feb 28, 9:33 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 28, 9:33 AM UTC: @calclavia merged this pull request with Graphite.

@calclavia calclavia merged commit 50ecb00 into main Feb 28, 2026
4 checks passed
@calclavia calclavia deleted the calclavia/tool-list-typo-error branch February 28, 2026 09:33
@smithery-chore-bot smithery-chore-bot bot mentioned this pull request Feb 28, 2026
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.

1 participant