Skip to content

Function: ToolInvocation()

ts
function ToolInvocation(props: Readonly<{
  toolName: string;
  state: ToolInvocationState;
  input?: unknown;
  output?: unknown;
  defaultOpen?: boolean;
  className?: string;
}> & RefAttributes<HTMLDivElement>): Block;

Defined in: src/renderer/blocks/index.ts:2339

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

ParameterType
propsReadonly<{ toolName: string; state: ToolInvocationState; input?: unknown; output?: unknown; defaultOpen?: boolean; className?: string; }> & RefAttributes<HTMLDivElement>

Returns

Block

Example

ts
ToolInvocation({
  toolName: 'search_web',
  state: 'completed',
  input: {query: 'matterway'},
  output: '5 results found',
});

Matterway Assistant SDK Documentation