Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/IBM/mcp-cli
/ functions
Functions
6,849 in github.com/IBM/mcp-cli
⨍
Functions
6,849
◇
Types & classes
1,312
↳
Endpoints
189
↓ 18 callers
Function
_ws_connect
Return an async context manager that connects to the WS endpoint.
tests/dashboard/test_integration.py:27
↓ 18 callers
Method
disable_tool
Disable a tool for a specific reason - uses enum, no magic strings!
src/mcp_cli/tools/filter.py:79
↓ 18 callers
Method
send
(self, msg: str)
tests/apps/test_bridge.py:59
↓ 18 callers
Function
showToast
(level, message, duration)
src/mcp_cli/dashboard/static/js/utils.js:10
↓ 18 callers
Method
stream_response
Stream response from LLM client. Args: client: LLM client with streaming support messages: Conversation messages
src/mcp_cli/chat/streaming_handler.py:248
↓ 18 callers
Function
unwrap_tool_result
Unwrap middleware ``ToolExecutionResult`` wrappers and MCP result dicts. When middleware is enabled, ``ToolManager`` returns the result wrapped i
src/mcp_cli/utils/serialization.py:11
↓ 17 callers
Method
_extract_structured_content
Extract structuredContent from text blocks per MCP spec. The MCP spec says servers SHOULD include structuredContent serialised as JSO
src/mcp_cli/apps/bridge.py:367
↓ 17 callers
Function
_make_chat_context
( messages=None, session_id: str = "test-session", provider: str = "openai", model: str = "gpt
tests/commands/export/test_export_command.py:49
↓ 17 callers
Method
_make_host_and_app_info
(self, csp=None, permissions=None, html="<html/>")
tests/apps/test_host.py:897
↓ 17 callers
Function
_make_tool_manager
Return a mock ToolManager.
tests/commands/apps/test_apps_command.py:54
↓ 17 callers
Function
create_server_info
Create a ServerInfo instance for testing.
tests/commands/definitions/test_servers_command.py:9
↓ 17 callers
Method
execute_tool
Execute a tool via mcp-cli's ToolManager with guard checks. Args: request: Planner's execution request (tool_name, args, step_id)
src/mcp_cli/planning/backends.py:67
↓ 17 callers
Method
export
Export messages to JSON format. Args: messages: Conversation messages metadata: Optional session metadata
src/mcp_cli/chat/exporters.py:104
↓ 17 callers
Method
get_cache_size
Get the number of cached clients.
src/mcp_cli/model_management/client_factory.py:168
↓ 17 callers
Method
set_ws
Attach the active WebSocket connection, closing any previous one.
src/mcp_cli/apps/bridge.py:45
↓ 16 callers
Method
_format_tool_result
Normalise a tool result into MCP CallToolResult structure. Returns ``{"content": [...], "structuredContent": {...}}`` matching the MC
src/mcp_cli/apps/bridge.py:419
↓ 16 callers
Function
_make_message_dict
(role: str = "user", content: str = "hello")
tests/commands/export/test_export_command.py:27
↓ 16 callers
Function
_make_router
()
tests/agents/test_manager.py:20
↓ 16 callers
Function
_make_tool_manager
(health_result=None)
tests/commands/servers/test_health_command.py:21
↓ 16 callers
Function
_make_tool_manager
()
tests/agents/test_manager.py:33
↓ 16 callers
Function
get_agent_tool_state
Return a ToolStateManager scoped to the given *agent_id*. * ``"default"`` → delegates to the upstream global singleton * anything else → per-
src/mcp_cli/chat/agent_tool_state.py:20
↓ 16 callers
Method
get_default_model
Get the default model for a provider. NO HARDCODED MODELS - All come from configuration. Args: provider: Provid
src/mcp_cli/model_management/model_manager.py:263
↓ 16 callers
Method
list_commands
Get a list of all available chat commands. Returns: List of command names with descriptions.
src/mcp_cli/adapters/chat.py:293
↓ 16 callers
Method
set_context
Store a back-reference to ChatContext for history/config queries.
src/mcp_cli/dashboard/bridge.py:90
↓ 16 callers
Function
to_serializable
Convert an object to a JSON-serializable form. Handles MCP SDK ``ToolResult``, Pydantic models, and other non-serializable types. MCP ``Tool
src/mcp_cli/utils/serialization.py:47
↓ 15 callers
Method
_make_processor
(self)
tests/chat/test_tool_processor_extended.py:1968
↓ 15 callers
Function
_make_runtime_config
Build a mock RuntimeConfig.
tests/chat/test_streaming_handler.py:363
↓ 15 callers
Method
_resolve_static
Map a URL path to a file in the static directory. Returns None if not found.
src/mcp_cli/dashboard/server.py:234
↓ 15 callers
Function
format_args_preview
Format tool arguments for inline preview. Shows first N arguments, truncated to reasonable length. Args: arguments: Tool arguments d
src/mcp_cli/display/formatters.py:14
↓ 15 callers
Method
get_active_model
Get active model.
src/mcp_cli/utils/preferences.py:482
↓ 15 callers
Function
human_size
Convert size in bytes to human-readable string (KB/MB/GB). Args: size: Size in bytes (None if unavailable) Returns: Hum
src/mcp_cli/commands/utils.py:102
↓ 15 callers
Function
render_plan_dag
Render a plan as an ASCII DAG for terminal display. Shows steps with their tools, dependencies, and execution status. Parallel steps (same ba
src/mcp_cli/planning/executor.py:1058
↓ 14 callers
Method
_extract_from_content_list
Extract value from a list of MCP content blocks.
src/mcp_cli/chat/tool_processor.py:1340
↓ 14 callers
Method
_format_tool_response
Format tool response for conversation history.
src/mcp_cli/chat/tool_processor.py:1402
↓ 14 callers
Method
_get_custom_provider_client
Get a client for a custom OpenAI-compatible provider using chuk_llm. Args: provider: Provider name model: Mo
src/mcp_cli/model_management/client_factory.py:67
↓ 14 callers
Function
_make_model_manager
Build a mock ModelManager.
tests/chat/test_testing.py:46
↓ 14 callers
Function
_make_processor
Return a ToolProcessor with sensible defaults.
tests/chat/test_tool_processor.py:708
↓ 14 callers
Function
_make_stream_manager
Build a mock stream_manager with configurable behaviour.
tests/chat/test_testing.py:21
↓ 14 callers
Method
_prepare_messages_for_api
Serialize conversation history for API, with cleanup. Replaces inline ``[msg.to_dict() for msg in ...]`` + validate pattern. Strips o
src/mcp_cli/chat/conversation.py:942
↓ 14 callers
Function
_setup_command_logging
Set up logging and theme for individual commands.
src/mcp_cli/main.py:902
↓ 14 callers
Method
_unwrap_result
Unwrap nested ToolResult/dict structures from MCP responses. MCP tools can return deeply nested result structures. This method extrac
src/mcp_cli/tools/dynamic_tools.py:205
↓ 14 callers
Function
execute_tools_parallel
Execute multiple tool calls in parallel with optional callbacks. Uses chuk-tool-processor's ToolCall/ToolResult models for consistency.
src/mcp_cli/tools/execution.py:32
↓ 14 callers
Method
finalize
Finalize and validate all accumulated tool calls. Returns only valid, complete tool calls as dicts for API compatibility.
src/mcp_cli/chat/streaming_handler.py:187
↓ 14 callers
Method
get_active_provider
Get the currently active provider.
src/mcp_cli/model_management/model_manager.py:339
↓ 14 callers
Method
get_custom_provider
Get a specific custom provider configuration.
src/mcp_cli/utils/preferences.py:656
↓ 14 callers
Function
initialize_context
Convenience function to initialize the application context. Args: **kwargs: Arguments to pass to ApplicationContext.create() Re
src/mcp_cli/context/context_manager.py:309
↓ 14 callers
Method
on_tool_result
Called after every tool execution completes.
src/mcp_cli/dashboard/bridge.py:135
↓ 14 callers
Function
postToIframe
(iframe, type, payload)
src/mcp_cli/dashboard/static/js/views.js:274
↓ 14 callers
Method
reset
Reset all counters.
src/mcp_cli/tools/filter.py:49
↓ 14 callers
Method
reset
Reset the configuration (useful for testing).
src/mcp_cli/config/config_manager.py:408
↓ 14 callers
Method
set_tool_confirmation_mode
Set the global tool confirmation mode. Args: mode: One of 'always', 'never', or 'smart'
src/mcp_cli/utils/preferences.py:270
↓ 14 callers
Method
to_dict
(self)
tests/dashboard/test_bridge_extended.py:136
↓ 13 callers
Function
_compute_batches
Compute parallel execution batches via topological sort. Groups steps into batches where all steps in a batch have their dependencies satisfi
src/mcp_cli/planning/executor.py:819
↓ 13 callers
Function
_make_pref_manager
Build a mock PreferenceManager with the given current mode.
tests/commands/core/test_confirm.py:16
↓ 13 callers
Method
_validate_tool_messages
Ensure every assistant tool_call_id has a matching tool result. Defense-in-depth: repairs orphaned tool_calls before sending to the API.
src/mcp_cli/chat/conversation.py:1015
↓ 13 callers
Method
do_confirm_tool_execution
(self, tool_name, arguments)
tests/chat/test_tool_processor.py:58
↓ 13 callers
Method
execute
Execute the confirm command.
src/mcp_cli/commands/core/confirm.py:67
↓ 13 callers
Method
get_available_models
Get list of available models for a provider.
src/mcp_cli/core/model_resolver.py:119
↓ 13 callers
Function
handle_plan_tool
Execute a plan tool and return the result as a JSON string. Args: tool_name: One of plan_create, plan_execute, plan_create_and_execute.
src/mcp_cli/planning/tools.py:102
↓ 13 callers
Function
interactive_mode
Launch the interactive mode CLI with slash-menu autocompletion.
src/mcp_cli/interactive/shell.py:48
↓ 13 callers
Method
list_entries
List all entries in a scope.
src/mcp_cli/memory/store.py:115
↓ 13 callers
Method
push_tool_result
Push a tool result notification to the app.
src/mcp_cli/apps/bridge.py:269
↓ 13 callers
Method
save
Save session data to disk. Args: data: Session data to save Returns: Path to the saved file
src/mcp_cli/chat/session_store.py:72
↓ 13 callers
Method
stop_tool_execution
Stop tool execution display and show result. Args: result: Tool execution result success: Whether execution succeeded
src/mcp_cli/display/manager.py:280
↓ 13 callers
Method
validate_openai_schema
Validate a tool definition against OpenAI's function calling schema. SIMPLIFIED: Always attempt auto-fix instead of strict validation
src/mcp_cli/tools/validation.py:21
↓ 12 callers
Method
_extract_html
Extract HTML content from a resources/read response.
src/mcp_cli/apps/host.py:446
↓ 12 callers
Function
_is_error_result
Check if a ToolManager result is actually an error. ToolManager.execute_tool marks success=True when stream_manager.call_tool returns without
src/mcp_cli/planning/backends.py:244
↓ 12 callers
Method
_merge_json_strings
Merge two JSON strings intelligently. Tries multiple strategies: 1. Parse both and merge dicts 2. Concatenate and validate
src/mcp_cli/chat/streaming_handler.py:136
↓ 12 callers
Method
_on_client_connected
Send agent list and replay focused agent state to a new client.
src/mcp_cli/dashboard/router.py:298
↓ 12 callers
Method
_proc
(self)
tests/chat/test_tool_processor.py:1962
↓ 12 callers
Method
_result_contains_patch
Check whether a tool result carries a ui_patch structuredContent.
src/mcp_cli/chat/tool_processor.py:1073
↓ 12 callers
Function
_sanitize_for_display
Sanitize text for display by escaping control characters. Args: text: Raw text that may contain control characters Returns:
src/mcp_cli/display/renderers.py:110
↓ 12 callers
Method
_server
(self)
tests/dashboard/test_server.py:22
↓ 12 callers
Method
create_completion
Simulate an LLM that streams responses.
examples/streaming/mcp_cli_working_demo.py:37
↓ 12 callers
Function
display_tool_call_result
Display the result of a tool call using chuk-term.
src/mcp_cli/display/formatting.py:88
↓ 12 callers
Function
handle_agent_tool
Execute an agent orchestration tool. Parameters ---------- tool_name: One of the ``_AGENT_TOOL_NAMES``. arguments: To
src/mcp_cli/agents/tools.py:177
↓ 12 callers
Function
handle_chat_mode
Launch the interactive chat loop with streaming support. Runtime uses adaptive policy: strict core with smooth wrapper. - Always enforce
src/mcp_cli/chat/chat_handler.py:36
↓ 12 callers
Method
launch_app
Launch an MCP App in the browser. 1. Fetch the UI resource HTML from the MCP server 2. Start a local HTTP + WebSocket server
src/mcp_cli/apps/host.py:70
↓ 12 callers
Function
load_config
Load MCP server config file with fallback to bundled package config.
src/mcp_cli/config/cli_options.py:31
↓ 11 callers
Method
_get_connection_info
Get connection info string for display.
src/mcp_cli/commands/servers/servers.py:179
↓ 11 callers
Function
_get_token_manager
Get configured token manager instance with mcp-cli namespace.
src/mcp_cli/commands/tokens/token.py:34
↓ 11 callers
Method
_handle_oauth_flow
Handle OAuth authentication flow for a server. Uses _oauth_lock to prevent concurrent flows from racing (e.g. multiple parallel tool
src/mcp_cli/tools/manager.py:611
↓ 11 callers
Method
_load_tools
Load and adapt tools for the current provider. FIXED: Updated to use universal tool compatibility system.
src/mcp_cli/chat/conversation.py:805
↓ 11 callers
Method
_make_completer
(self, commands=None)
tests/interactive/test_shell_coverage.py:24
↓ 11 callers
Method
_proc
(self)
tests/chat/test_tool_processor.py:1863
↓ 11 callers
Method
_register_command
Register a single command with Typer.
src/mcp_cli/adapters/cli.py:51
↓ 11 callers
Method
_tool_call_response
Build a mock LLM response containing a tool call. Uses the chuk_llm native format (top-level tool_calls key).
tests/planning/test_executor.py:806
↓ 11 callers
Method
_truncate_tool_result
Truncate tool result if it exceeds max_chars. Keeps head + tail with a truncation notice in the middle. max_chars <= 0 disables trunc
src/mcp_cli/chat/tool_processor.py:1430
↓ 11 callers
Method
_update_reasoning_preview
Update cached reasoning preview with debouncing. Updates preview only if: - 1 second has passed since last update, OR - 10 ch
src/mcp_cli/display/manager.py:641
↓ 11 callers
Method
call_tool
(self, tool_name, arguments)
tests/chat/test_tool_processor.py:78
↓ 11 callers
Function
create_transparent_completion_style
Create a prompt_toolkit Style for autocomplete menu that matches terminal background. Args: theme_colors: Theme ColorScheme object w
src/mcp_cli/display/color_converter.py:101
↓ 11 callers
Method
disable_server
Disable a server in preferences.
src/mcp_cli/utils/preferences.py:553
↓ 11 callers
Method
failure
Create a failed validation result.
src/mcp_cli/tools/models.py:412
↓ 11 callers
Method
filter_tools
Filter tools, separating valid from invalid ones. AGGRESSIVE: Always try to auto-fix first, then validate. Returns:
src/mcp_cli/tools/filter.py:125
↓ 11 callers
Function
format_reasoning_preview
Format reasoning content for inline preview. Shows a clean excerpt of the reasoning with proper word boundaries. By default shows last N char
src/mcp_cli/display/formatters.py:57
↓ 11 callers
Method
get_command_names
Get all command names. Args: mode: Optional mode filter. include_aliases: Whether to include command aliases
src/mcp_cli/commands/registry.py:127
↓ 11 callers
Method
get_custom_providers
Get all custom providers.
src/mcp_cli/utils/preferences.py:652
↓ 11 callers
Function
get_provider_env_var_name
Get the standard environment variable name for a provider. Args: provider_name: Provider name (e.g., 'openai', 'anthropic') Ret
src/mcp_cli/auth/provider_tokens.py:41
↓ 11 callers
Method
get_tools_for_llm
(self)
tests/chat/test_chat_context.py:84
↓ 11 callers
Function
load_user_layouts
Load saved user layouts from disk. Returns empty list on any error.
src/mcp_cli/dashboard/config.py:124
← previous
next →
101–200 of 6,849, ranked by callers