> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# startTool

> TypeScript SDK 레퍼런스

<div id="starttool">
  # startTool
</div>

▸ **startTool**(`opts`): [`Tool`](../classes/tool)

Tool span을 시작합니다. 상위 항목 결정 방식은 다음과 같습니다(설계의 "기본적으로는 평면 구조, 중첩하면 계층 구조"와 일치).

* LLM이 활성화되어 있으면 Tool은 그 하위에 중첩됩니다.
* 그렇지 않으면 Tool은 현재 Turn과 같은 수준의 항목이 됩니다.

Turn과 LLM이 모두 활성화되어 있지 않으면 예외를 발생시킵니다.

<div id="parameters">
  #### 매개변수
</div>

| 이름     | 유형                                   |
| :----- | :----------------------------------- |
| `opts` | [`ToolInit`](../interfaces/toolinit) |

<div id="returns">
  #### 반환값
</div>

[`Tool`](../classes/tool)

`예시`

```ts twoslash theme={null}
// @noErrors
weave.startTool({
  name: 'get_weather',
  args: JSON.stringify({city: 'Tokyo'}),
  toolCallId: 'call_t1',
});
```

`예시`

```ts twoslash theme={null}
// @noErrors
weave.startTool({
  name: 'get_weather',
  args: JSON.stringify({city: 'Tokyo'}),
  toolCallId: 'call_t1',
  startTime: new Date('2026-05-29T10:00:00.800Z'),
});
```

<div id="defined-in">
  #### 정의된 위치
</div>

[src/genai/api.ts:103](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/genai/api.ts#L103)

***
