MCPNEW
McpToolCall
Tool execution card: idle → running → done/error with retry.
Available in
reactPreview
Live previewreal component
unknown
idleInstall
TerminalBash
npx @mcp-elements/cli add mcp-tool-callUsage
mcp-tool-call-example.tsxTSX
import { McpToolCall } from '@mcp-elements/react'
import { createToolState } from '@mcp-elements/core'
const state = createToolState()
state.start('search', { query: 'MCP protocol' })
export function Example() {
return <McpToolCall state={state} />
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
state * | ToolStateApi | — | ToolStateApi instance from createToolState() |
toolName | string | — | Fallback tool name when state.tool is undefined |
args | Record<string, unknown> | — | Fallback args when state.args is undefined |
onRetry | () => void | — | Callback for the Retry button shown on error |