McpToolsFormat
Category: Commands
Source: mcp_tools_format.dart
Shared formatter for glue mcp tools (CLI) and /mcp tools (slash): renders a grouped, human-readable listing of tools by MCP server.
Pure: takes simple value objects so it's unit-testable without spinning up a real McpClientPool.
Enums
McpServerListingStatus
| Value | Description |
|---|---|
connected | |
connecting | |
reconnecting | |
disconnected | |
needsAuth | |
dead | |
disabled |
Classes
McpToolEntry
Constructor
dart
const McpToolEntry({required this.name, this.description = ''})Properties
| Property | Type | Description |
|---|---|---|
name | String | |
description | String |
McpServerToolListing
Constructor
dart
const McpServerToolListing({
required this.id,
required this.status,
this.tools = const [],
this.error,
})Properties
| Property | Type | Description |
|---|---|---|
id | String | |
status | McpServerListingStatus | |
tools | List<McpToolEntry> | |
error | String? |
Functions
`String formatMcpToolsByServer(
Iterable<McpServerToolListing> servers, { bool? ansiEnabled, })`
McpServerToolListing listingFromSnapshot(McpServerSnapshot s)
Project an [McpServerSnapshot] into the simple value object the formatter takes. Keeps the pool's runtime types out of the formatter.