# useDefaultRenderTool

> Register a wildcard default renderer for unhandled tool calls

## Overview [#overview]

`useDefaultRenderTool` is a convenience wrapper around `useRenderTool` with `name: "*"`.

This is part of the v2 tool rendering hook set with [`useComponent`](/reference/hooks/useComponent), [`useRenderTool`](/reference/hooks/useRenderTool), and [`useRenderToolCall`](/reference/hooks/useRenderToolCall).

- With no config, it registers CopilotKit's built-in default tool-call UI.
- With `render`, it replaces that default UI with your own wildcard renderer.

Use this for catch-all rendering of tool calls that do not have a specific named renderer.

## Signature [#signature]

```tsx
import { useDefaultRenderTool } from "@copilotkit/react-core/v2";

function useDefaultRenderTool(
  config?: {
    render?: (props: {
      name: string;
      toolCallId: string;
      parameters: unknown;
      status: "inProgress" | "executing" | "complete";
      result: string | undefined;
    }) => React.ReactElement | null;
    group?: boolean;
  },
  deps?: ReadonlyArray<unknown>,
): void;
```

## Behavior [#behavior]

- Internally calls `useRenderTool({ name: "*", ... })`.
- If `config.render` is omitted, uses an expandable default card UI that shows status, parameters, and result.
- If `config.render` is provided, your renderer is used instead.
- Your renderer can return `null` to draw nothing. Use this to render only the tool calls you care about and suppress the rest.
- `config.group` lets the chat group the calls that your renderer draws. The chat groups the calls of the built-in card in the same way (see [`toolCallDisplay`](/reference/components/CopilotChatMessageView#toolcalldisplay)). It's on for the built-in card and off by default for a custom `render`, since a renderer that draws nothing would leave an empty group.
- Inherits `useRenderTool` registration behavior and dependency semantics.
- Tool calls the agent makes in a row are grouped by default (see [`toolCallDisplay`](/reference/components/CopilotChatMessageView#toolcalldisplay)). Inside a group, the built-in card draws itself as a compact row: status, tool name and main argument, opening to the arguments and result. A custom `render` is drawn as-is inside the group.

## Usage [#usage]

### Built-in default renderer [#built-in-default-renderer]

```tsx
function App() {
  useDefaultRenderTool();
  return null;
}
```

### Custom wildcard renderer [#custom-wildcard-renderer]

```tsx
function App() {
  useDefaultRenderTool(
    {
      render: ({ name, status, result }) => (
        <div>
          <strong>{name}</strong>: {status}
          {status === "complete" && result ? <pre>{result}</pre> : null}
        </div>
      ),
    },
    [],
  );

  return null;
}
```
