Show all recorded resources.
(
config_file: str = typer.Option(
"server_config.json", help="Configuration file path"
),
server: str | None = typer.Option(None, help="Server to connect to"),
provider: str = typer.Option("openai", help="LLM provider name"),
model: str | None = typer.Option(None, help="Model name"),
disable_filesystem: bool = typer.Option(False, help="Disable filesystem access"),
quiet: bool = typer.Option(False, "-q", "--quiet", help="Suppress most log output"),
verbose: bool = typer.Option(
False, "-v", "--verbose", help="Enable verbose logging"
),
log_level: str = typer.Option("WARNING", "--log-level", help="Set log level"),
theme: str = typer.Option("default", "--theme", help="UI theme"),
)
| 1203 | # Resources command |
| 1204 | @app.command("resources", help="List available resources") |
| 1205 | def resources_command( |
| 1206 | config_file: str = typer.Option( |
| 1207 | "server_config.json", help="Configuration file path" |
| 1208 | ), |
| 1209 | server: str | None = typer.Option(None, help="Server to connect to"), |
| 1210 | provider: str = typer.Option("openai", help="LLM provider name"), |
| 1211 | model: str | None = typer.Option(None, help="Model name"), |
| 1212 | disable_filesystem: bool = typer.Option(False, help="Disable filesystem access"), |
| 1213 | quiet: bool = typer.Option(False, "-q", "--quiet", help="Suppress most log output"), |
| 1214 | verbose: bool = typer.Option( |
| 1215 | False, "-v", "--verbose", help="Enable verbose logging" |
| 1216 | ), |
| 1217 | log_level: str = typer.Option("WARNING", "--log-level", help="Set log level"), |
| 1218 | theme: str = typer.Option("default", "--theme", help="UI theme"), |
| 1219 | ) -> None: |
| 1220 | """Show all recorded resources.""" |
| 1221 | # Configure logging and theme for this command |
| 1222 | _setup_command_logging(quiet, verbose, log_level, theme) |
| 1223 | |
| 1224 | servers, _, server_names = process_options( |
| 1225 | server, disable_filesystem, provider, model, config_file |
| 1226 | ) |
| 1227 | |
| 1228 | # Use unified command system via CLI adapter |
| 1229 | from mcp_cli.adapters.cli import cli_execute |
| 1230 | |
| 1231 | async def _resources_wrapper(**params): |
| 1232 | return await cli_execute("resources") |
| 1233 | |
| 1234 | run_command_sync( |
| 1235 | _resources_wrapper, |
| 1236 | config_file, |
| 1237 | servers, |
| 1238 | extra_params={"server_names": server_names}, |
| 1239 | ) |
| 1240 | |
| 1241 | |
| 1242 | direct_registered.append("resources") |
nothing calls this directly
no test coverage detected