data/tools/mcp_tool library

Classes

MCPProgress
Progress update from an MCP tool execution.
MCPServerInfo
Information about an MCP server that provides a tool.
MCPTool
Generic MCP tool wrapper.
McpToolClassification
Result of classifying an MCP tool for UI collapse behavior.

Constants

mcpDescription → const String
MCP tool description.
mcpMaxResultSizeChars → const int
Maximum result size before disk persistence (100K chars).
mcpPrompt → const String
MCP tool prompt.
mcpToolBaseName → const String
Tool name base for MCP tools.

Functions

classifyMcpToolForCollapse(String serverName, String toolName) McpToolClassification
Classify an MCP tool as a search/read operation for UI collapsing. Tool name is normalized from camelCase/kebab-case to snake_case before lookup. Unknown tool names return isSearch=false, isRead=false (conservative -- they won't collapse).
isOutputLineTruncated(String output) bool
Check if an output string appears to have been truncated. Matches the isOutputLineTruncated utility from the TS codebase.