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
↓ 8 callers
Method
discover_models_from_api
Discover available models from an OpenAI-compatible API. Args: api_base: API base URL api_key: API key
src/mcp_cli/model_management/provider_discovery.py:26
↓ 8 callers
Method
execute
(self, **kwargs)
tests/commands/test_base.py:151
↓ 8 callers
Function
format_performance
Format performance metrics with color coding. Args: ping_ms: Ping time in milliseconds (None if unavailable) Returns: T
src/mcp_cli/commands/utils.py:44
↓ 8 callers
Method
get_client
( self, provider: str | None = None, model: str | None = None, )
src/mcp_cli/planning/executor.py:47
↓ 8 callers
Function
get_env_list
Get environment variable as list of strings. Args: var: EnvVar enum member separator: String separator (default: comma) d
src/mcp_cli/config/env_vars.py:200
↓ 8 callers
Function
get_plan_tools_as_dicts
Return OpenAI-format tool definitions for plan tools.
src/mcp_cli/planning/tools.py:28
↓ 8 callers
Method
get_tool_confirmation
Get confirmation setting for a specific tool. Args: tool_name: Name of the tool Returns: 'always', 'never',
src/mcp_cli/utils/preferences.py:284
↓ 8 callers
Method
inject_assistant_message
Inject a synthetic assistant message for conversation flow control. Use this for system-generated messages (budget exhaustion, state
src/mcp_cli/chat/chat_context.py:692
↓ 8 callers
Method
list_tools
(self)
tests/tools/test_tool_manager.py:37
↓ 8 callers
Method
load_async
Load and parse MCP config file with token resolution (async). Uses asyncio.to_thread() to avoid blocking the event loop during file I/O.
src/mcp_cli/tools/config_loader.py:120
↓ 8 callers
Method
on_agent_state
Called when the agent's status changes.
src/mcp_cli/dashboard/bridge.py:167
↓ 8 callers
Method
on_message
Called when a complete conversation message is emitted.
src/mcp_cli/dashboard/bridge.py:187
↓ 8 callers
Method
record_tool_call
Record a tool call in session and procedural memory. Args: tool_name: Name of the tool called arguments: Arg
src/mcp_cli/chat/chat_context.py:724
↓ 8 callers
Method
remove_runtime_server
Remove a runtime server from preferences. Args: name: Server name to remove Returns: True if server was remo
src/mcp_cli/utils/preferences.py:576
↓ 8 callers
Function
run_command
Run a command and optionally show output.
examples/servers/custom_provider_working_demo.py:33
↓ 8 callers
Function
set_env
Set environment variable (type-safe). Args: var: EnvVar enum member value: Value to set Example: >>> set_env(EnvVar.
src/mcp_cli/config/env_vars.py:93
↓ 8 callers
Method
set_theme
Set and persist theme. Args: theme: Theme name to set Raises: ValueError: If theme is not valid
src/mcp_cli/utils/preferences.py:225
↓ 8 callers
Method
set_timeout
Type-safe timeout override.
src/mcp_cli/config/models.py:218
↓ 8 callers
Method
stage
Add an attachment to the staging area.
src/mcp_cli/chat/attachments.py:107
↓ 8 callers
Method
to_conversation_history
Convert result to conversation history string.
src/mcp_cli/tools/models.py:368
↓ 7 callers
Function
_extract_content_blocks
Extract text from a list of MCP content blocks. Content blocks can be dicts or objects with type/text attributes. Returns parsed JSON if the
src/mcp_cli/planning/backends.py:354
↓ 7 callers
Method
_extract_permissions
Extract permissions from resource _meta.ui.permissions.
src/mcp_cli/apps/host.py:479
↓ 7 callers
Method
_generate_system_prompt
Generate system prompt from available tools (cached with dirty flag).
src/mcp_cli/chat/chat_context.py:521
↓ 7 callers
Method
_get_provider_status
Get the status for a provider.
src/mcp_cli/commands/providers/providers.py:238
↓ 7 callers
Function
_make_chat_context
(tracker=None)
tests/commands/usage/test_usage_command.py:27
↓ 7 callers
Method
_make_exec_result
Create a mock PlanExecutionResult.
tests/commands/plan/test_plan_command.py:640
↓ 7 callers
Method
_make_processor
(self)
tests/chat/test_tool_processor_extended.py:695
↓ 7 callers
Method
_make_processor
(self)
tests/chat/test_tool_processor_extended.py:746
↓ 7 callers
Function
_mock_server
Return a mock DashboardServer whose start() resolves to the given port.
tests/dashboard/test_launcher.py:13
↓ 7 callers
Method
_on_tool_start
Callback when a tool starts execution.
src/mcp_cli/chat/tool_processor.py:443
↓ 7 callers
Method
_report_progress
Report progress via callback if set.
src/mcp_cli/tools/manager.py:212
↓ 7 callers
Method
_split_preview_into_lines
Split preview text into multiple lines at word boundaries. Args: text: Text to split (may start with '...') max_line_
src/mcp_cli/display/manager.py:594
↓ 7 callers
Function
_tool_call_response
Build a mock LLM response containing a tool call. Uses the chuk_llm native format (top-level tool_calls key), which is what the real client r
tests/planning/test_agentic_loop_integration.py:152
↓ 7 callers
Method
add_runtime_provider
Add a provider at runtime (not persisted). No network I/O. For automatic model discovery, use discover_runtime_provider() instead.
src/mcp_cli/model_management/model_manager.py:127
↓ 7 callers
Function
build_multimodal_content
Build the ``content`` field for a user message. Returns the plain string when there are no attachments or image URLs (backward compatible).
src/mcp_cli/chat/attachments.py:379
↓ 7 callers
Function
check_provider_token_status
Check the status of a provider's API key. Args: provider_name: Provider name token_manager: TokenManager instance (optional)
src/mcp_cli/auth/provider_tokens.py:107
↓ 7 callers
Method
clear
Clear all registered commands (useful for testing).
src/mcp_cli/commands/registry.py:162
↓ 7 callers
Method
clear_conversation_history
Clear conversation history by creating a new session.
src/mcp_cli/chat/chat_context.py:788
↓ 7 callers
Method
close
(self)
tests/apps/test_bridge.py:64
↓ 7 callers
Method
close_all
Shut down all app servers.
src/mcp_cli/apps/host.py:190
↓ 7 callers
Method
complete
Mark streaming as complete.
src/mcp_cli/display/models.py:313
↓ 7 callers
Method
count
(self)
src/mcp_cli/chat/attachments.py:126
↓ 7 callers
Method
demo_section
Display a demo section header.
examples/commands/command_system_e2e_demo.py:80
↓ 7 callers
Function
extract_server_names
Extract server names from config with HTTP server support, respecting disabled status from preferences.
src/mcp_cli/config/cli_options.py:74
↓ 7 callers
Method
from_raw_chunk
Parse a raw chunk from various LLM providers into normalized format. Supports multiple formats: - chuk-llm format: {'response': str,
src/mcp_cli/display/models.py:80
↓ 7 callers
Method
get_custom_provider_api_key
Get the API key for a custom provider from environment variables. Args: name: Provider name Returns: API key
src/mcp_cli/utils/preferences.py:701
↓ 7 callers
Method
get_disabled_servers
Get all disabled servers.
src/mcp_cli/utils/preferences.py:557
↓ 7 callers
Method
get_timeout
Get timeout value with priority resolution. Args: timeout_name: Name of timeout (e.g., "streaming_chunk", "tool_executio
src/mcp_cli/config/config_manager.py:592
↓ 7 callers
Method
get_timeout
(t)
tests/chat/test_streaming_handler.py:776
↓ 7 callers
Method
get_tool_count
Get number of available tools.
src/mcp_cli/chat/chat_context.py:959
↓ 7 callers
Method
get_tools_for_llm
Get tools filtered and validated for LLM. Results are cached per provider. Cache is invalidated on tool changes (disable/enable). Dyn
src/mcp_cli/tools/manager.py:952
↓ 7 callers
Method
is_custom_provider
Check if a provider is a custom provider.
src/mcp_cli/utils/preferences.py:660
↓ 7 callers
Function
load_runtime_config
Load runtime configuration with clean API. Args: config_path: Path to config file (default: server_config.json) cli_overrides: CL
src/mcp_cli/config/__init__.py:258
↓ 7 callers
Method
log_debug
Debug logging with rich formatting if available.
diagnostics/cli_tools_diagnostic.py:90
↓ 7 callers
Method
log_info
Log info message.
diagnostics/chained_tools_diagnostic.py:511
↓ 7 callers
Function
ok
(msg: str)
examples/safety/vm_relaxed_mode_demo.py:325
↓ 7 callers
Function
parse_inline_refs
Extract ``@file:path`` references from message text. Returns ------- (cleaned_text, list_of_paths) *cleaned_text* has the ``@file
src/mcp_cli/chat/attachments.py:342
↓ 7 callers
Method
recall
Retrieve memory entries by key, query, or list all.
src/mcp_cli/memory/store.py:76
↓ 7 callers
Method
refresh_models
Manually refresh models for a provider. Args: provider: Provider name (refreshes active provider if None) Retur
src/mcp_cli/model_management/model_manager.py:301
↓ 7 callers
Method
refresh_provider_models
Refresh models for a runtime provider by querying the API. Args: config: RuntimeProviderConfig to refresh Retur
src/mcp_cli/model_management/provider_discovery.py:91
↓ 7 callers
Function
render_streaming_status
Render streaming status with optional reasoning on separate line. Args: state: Current streaming state spinner: Current spinner f
src/mcp_cli/display/renderers.py:22
↓ 7 callers
Method
request_tool_approval
Send a tool approval request to the dashboard. The browser will show an approve/deny dialog and respond with TOOL_APPROVAL_RESPONSE.
src/mcp_cli/dashboard/bridge.py:757
↓ 7 callers
Method
stop
Shut down the server and close all client connections.
src/mcp_cli/dashboard/server.py:80
↓ 7 callers
Method
to_unified
Convert to immutable UnifiedServerConfig.
src/mcp_cli/config/server_models.py:198
↓ 7 callers
Method
update_from_dict
Update context from dictionary.
src/mcp_cli/chat/chat_context.py:995
↓ 6 callers
Method
_download_page
Download page content to a local file.
src/mcp_cli/commands/memory/memory.py:322
↓ 6 callers
Method
_extract_csp
Extract CSP configuration from resource _meta.ui.csp.
src/mcp_cli/apps/host.py:465
↓ 6 callers
Method
_extract_mcp_text_content
Extract text content from MCP SDK ToolResult structure.
src/mcp_cli/tools/models.py:316
↓ 6 callers
Method
_get_server_url
Get the URL for an HTTP/SSE server by name. Args: server_name: Name of the server Returns: Server URL or Non
src/mcp_cli/tools/manager.py:571
↓ 6 callers
Method
_handle_memory_tool
Execute a memory scope tool (remember, recall, forget). Memory tools are persistent-memory operations that bypass the MCP ToolManager
src/mcp_cli/chat/tool_processor.py:678
↓ 6 callers
Method
_handle_regular_completion
Handle regular (non-streaming) completion. Args: tools: Tool definitions to pass to the LLM, or None to disable tools Re
src/mcp_cli/chat/conversation.py:761
↓ 6 callers
Method
_health_poll_loop
Periodically check server health and log transitions.
src/mcp_cli/chat/conversation.py:83
↓ 6 callers
Function
_init_tool_manager
Create and initialize a ToolManager instance. Uses _create_tool_manager() which can be patched via set_tool_manager_factory() for testin
src/mcp_cli/run_command.py:85
↓ 6 callers
Method
_load
Load scope data from disk. Returns empty file if not found.
src/mcp_cli/memory/store.py:171
↓ 6 callers
Method
_make_context_with_notices
Create a MockContext with pending context notices.
tests/chat/test_conversation.py:1910
↓ 6 callers
Method
_make_ctx_with_vm_budget
(self, monkeypatch, vm_budget=128_000)
tests/chat/test_chat_context.py:2177
↓ 6 callers
Function
_make_server
Create a minimal ServerInfo for testing.
tests/context/test_context_manager.py:36
↓ 6 callers
Function
_make_tool
( name: str, namespace: str = "srv", has_app_ui: bool = True, app_resource_uri: str | None = "
tests/commands/apps/test_apps_command.py:24
↓ 6 callers
Function
_make_tracker
( turn_count: int = 3, summary: str = "3 turns, 500 tokens" )
tests/commands/usage/test_usage_command.py:18
↓ 6 callers
Method
_proc
(self)
tests/chat/test_tool_processor.py:2036
↓ 6 callers
Method
_proc
(self)
tests/chat/test_tool_processor.py:2080
↓ 6 callers
Method
_proc
(self)
tests/chat/test_tool_processor.py:2304
↓ 6 callers
Method
_register_user_literals_from_history
Extract and register numeric literals from recent user messages. Scans conversation history for the most recent user message(s) and r
src/mcp_cli/chat/conversation.py:1075
↓ 6 callers
Function
_run_coro
Helper to actually run a coroutine passed to asyncio.run.
tests/cli/test_main_coverage.py:1603
↓ 6 callers
Function
_safe_cleanup
Safely cleanup UI manager with enhanced error handling. Args: ui: UI manager to cleanup
src/mcp_cli/chat/chat_handler.py:611
↓ 6 callers
Method
_save_checkpoint
Save execution checkpoint for resume support.
src/mcp_cli/planning/executor.py:775
↓ 6 callers
Method
_user_msg
(self, content)
tests/chat/test_chat_context.py:2182
↓ 6 callers
Method
add_assistant_message
Add assistant message to conversation history.
tests/chat/test_conversation.py:49
↓ 6 callers
Method
add_message
Add a message to conversation history.
src/mcp_cli/context/context_manager.py:212
↓ 6 callers
Method
add_runtime_server
Add a runtime server to preferences. Args: name: Server name config: Server configuration (command, args, env, transp
src/mcp_cli/utils/preferences.py:566
↓ 6 callers
Function
create_mock_analysis
Create mock analysis when real servers aren't available.
diagnostics/mcp_server_diagnostic.py:655
↓ 6 callers
Method
drain_pending
Send queued notifications that accumulated while WS was down.
src/mcp_cli/apps/bridge.py:59
↓ 6 callers
Method
execute_tool
Execute tool via stream_manager.
src/mcp_cli/chat/testing.py:110
↓ 6 callers
Method
fix_array_schemas
Attempt to fix common array schema issues. Returns: Fixed parameters schema
src/mcp_cli/tools/validation.py:124
↓ 6 callers
Method
get_active_model
Get the currently active model.
src/mcp_cli/model_management/model_manager.py:343
↓ 6 callers
Method
get_client
Get or create a client for the specified provider and model. Args: provider: Provider name model: Model name
src/mcp_cli/model_management/client_factory.py:35
↓ 6 callers
Function
get_discovery_manager
Get the singleton DiscoveryManager instance.
src/mcp_cli/config/discovery.py:146
↓ 6 callers
Function
get_env_float
Get environment variable as float. Args: var: EnvVar enum member default: Default value if not set or invalid Returns:
src/mcp_cli/config/env_vars.py:157
↓ 6 callers
Method
get_env_var_name
Get the environment variable name for this provider's API key.
src/mcp_cli/utils/preferences.py:139
↓ 6 callers
Function
get_logger
Get a logger with the given name.
src/mcp_cli/config/logging.py:210
← previous
next →
301–400 of 6,849, ranked by callers