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

# サーバーツール

> ウェブ検索や日時など、リアルタイムの機能をモデルに提供します。Server Tools は ARouter がモデルに代わって実行するため、クライアント側のロジックは不要です。

Server Tools は、推論中に ARouter がモデルに代わって実行する機能です。ユーザー定義の関数呼び出し（コードが関数を実行する）とは異なり、Server Tools は ARouter が完全に処理します——モデルがいつ呼び出すかを決定し、ARouter がそれを実行し、結果は自動的に会話に注入されます。

<Note>
  Server Tools は現在 **ベータ版** です。インターフェースは安定していますが、追加のツールが追加中です。
</Note>

## 利用可能な Server Tools

| ツール ID       | 説明                       | 価格      |
| ------------ | ------------------------ | ------- |
| `web_search` | ウェブを検索し、引用付きの構造化された結果を返す | 検索クエリごと |
| `datetime`   | 任意のタイムゾーンの現在の日付と時刻を返す    | 無料      |

## Server Tools vs Plugins vs ユーザー定義ツール

|               | Server Tools | Plugins        | ユーザー定義ツール |
| ------------- | ------------ | -------------- | --------- |
| 誰が実行するか？      | ARouter      | ARouter        | あなたのアプリ   |
| モデルが呼び出しを制御？  | はい           | いいえ（毎リクエストに適用） | はい        |
| 構造化された引用？     | はい           | はい（ウェブのみ）      | N/A       |
| ストリーミングで利用可能？ | はい           | はい             | はい        |

## クイックスタート

```json theme={null}
{
  "model": "openai/gpt-5.4",
  "messages": [{"role": "user", "content": "What are the top AI news stories today?"}],
  "tools": [{"type": "arouter", "arouter": {"id": "web_search"}}]
}
```

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const response = await client.chat.completions.create({
      model: "openai/gpt-5.4",
      messages: [{ role: "user", content: "What are the top AI news stories today?" }],
      tools: [{ type: "arouter", arouter: { id: "web_search" } } as any],
    });
    console.log(response.choices[0].message.content);
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    response = client.chat.completions.create(
        model="openai/gpt-5.4",
        messages=[{"role": "user", "content": "What are the top AI news stories today?"}],
        tools=[{"type": "arouter", "arouter": {"id": "web_search"}}],
    )
    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl https://api.arouter.ai/v1/chat/completions \
      -H "Authorization: Bearer lr_live_xxxx" \
      -H "Content-Type: application/json" \
      -d '{"model": "openai/gpt-5.4", "messages": [{"role": "user", "content": "Top AI news today?"}], "tools": [{"type": "arouter", "arouter": {"id": "web_search"}}]}'
    ```
  </Tab>
</Tabs>

## 使用量の追跡

```json theme={null}
{
  "usage": {
    "prompt_tokens": 450, "completion_tokens": 210, "total_tokens": 660, "cost": 0.00234,
    "server_tool_calls": {"web_search": 2}
  }
}
```

## 次のステップ

* [ウェブ検索ツール](/jp/guides/features/server-tools/web-search)
* [日時ツール](/jp/guides/features/server-tools/datetime)
