Skip to content

feat(cli): add connection spinner for tool commands#89

Merged
appcypher merged 1 commit intomainfrom
appcypher/add-connection-spinner
Feb 4, 2026
Merged

feat(cli): add connection spinner for tool commands#89
appcypher merged 1 commit intomainfrom
appcypher/add-connection-spinner

Conversation

@appcypher
Copy link
Copy Markdown
Member

Summary

  • Add loading spinner during MCP server connection for tool info, call, and run commands
  • Provides visual feedback when servers take time to start (e.g., downloading dependencies)
  • Spinner only displays in human-readable mode, preserving clean output for json/concise modes
  • Improves user experience by indicating the CLI is working during slow connections

Changes

  • Modified lib/handlers/tool/info.rs: Added Spinner import and wrapped get_tool_info() call with spinner that shows "Connecting to {tool_name}..." in human-readable mode
  • Modified lib/handlers/tool/call.rs: Added Spinner import and wrapped call_tool() call with spinner that shows "Connecting to {tool_name}..." in human-readable mode
  • Modified lib/handlers/tool/run.rs: Replaced verbose-only "Connecting to backend MCP server..." message with an always-on spinner
  • All error paths properly call spinner.fail() before displaying error messages
  • Success paths call spinner.done() to clear the spinner cleanly

Test Plan

  • Run tool info <tool> and verify spinner displays while connecting
  • Run tool call <tool> -m <method> and verify spinner displays while connecting
  • Run tool run <tool> and verify spinner displays while connecting
  • Test with --json flag to verify no spinner appears
  • Test with --concise flag to verify no spinner appears
  • Test connection failure scenarios to verify spinner shows failure state

Add a loading spinner during MCP server connection for tool info,
tool call, and tool run commands. This provides visual feedback when
servers take time to start (e.g., downloading dependencies).

- Show spinner in human-readable mode only (not json/concise)
- Display "Connecting to {tool_name}..." while connecting
- Clear spinner on success, show failure indicator on error
- Replace verbose-only message in tool run with always-on spinner
@appcypher appcypher merged commit 1e01657 into main Feb 4, 2026
6 checks passed
@appcypher appcypher deleted the appcypher/add-connection-spinner branch February 4, 2026 20:50
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