Appearance
Function: ToolInvocation()
ts
function ToolInvocation(props: Readonly<{
state: ToolInvocationState;
toolName: string;
className?: string;
defaultOpen?: boolean;
input?: unknown;
output?: unknown;
}> & RefAttributes<HTMLDivElement>): Block;Defined in: packages/sdk/src/renderer/blocks/index.ts:2424
Experimental
ToolInvocation — display a tool execution with status icon, name, and collapsible input/output panels. Renamed from upstream's "Tool" to avoid colliding with the Matterway "tool" vocabulary.
Parameters
| Parameter | Type |
|---|---|
props | Readonly<{ state: ToolInvocationState; toolName: string; className?: string; defaultOpen?: boolean; input?: unknown; output?: unknown; }> & RefAttributes<HTMLDivElement> |
Returns
Example
ts
ToolInvocation({
toolName: 'search_web',
state: 'completed',
input: {query: 'matterway'},
output: '5 results found',
});