This commit is contained in:
Andrew Pareles 2025-05-23 01:45:21 -07:00
parent 09f5f1fad1
commit f0f536bc2d
2 changed files with 11 additions and 2 deletions

View file

@ -1868,7 +1868,13 @@ const MCPToolWrapper = ({ toolMessage }: WrapperProps<string>) => {
const { rawParams, params } = toolMessage
const componentParams: ToolHeaderParams = { title, desc1, isError, icon, isRejected, }
componentParams.info = `MCP server "${toolMessage.mcpServerName}"`
const paramsStr = JSON.stringify(params, null, 2)
componentParams.desc2 = <CopyButton codeStr={paramsStr} toolTipName={`Copy inputs: ${paramsStr}`} />
componentParams.info = !toolMessage.mcpServerName ? 'MCP tool not found' : undefined
// Add copy inputs button in desc2
if (toolMessage.type === 'success' || toolMessage.type === 'tool_request') {
const { result } = toolMessage

View file

@ -943,7 +943,10 @@ const MCPServerComponent = ({ name, server }: { name: string, server: MCPServer
<span
key={tool.name}
className="px-2 py-0.5 bg-black/5 dark:bg-white/5 rounded text-xs"
title={tool.description || ''}
data-tooltip-id='void-tooltip'
data-tooltip-content={tool.description || ''}
data-tooltip-class-name='void-max-w-[20px]'
>
{tool.name}
</span>