> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-3071-org-scoped-api-keys.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# startTool

> TypeScript SDK 레퍼런스

> **startTool**(`opts`): [`Tool`](../interfaces/tool)

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

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

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

정의 위치: [src/genai/api.ts:110](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/api.ts#L110)

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

<div id="opts">
  ### opts
</div>

[`ToolInit`](../interfaces/toolinit)

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

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

<div id="examples">
  ## 예시
</div>

```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'),
});
```
