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

# 建立工具

> 為專案建立新的工具

## 請求

```bash theme={null}
POST https://api.pathors.com/v1/projects/{projectId}/tools
```

### 路徑參數

<ParamField path="projectId" type="string" required>專案 ID</ParamField>

### 標頭

<ParamField header="Authorization" type="string" required>
  使用您的 Developer Key 進行 Bearer 令牌認證
</ParamField>

### 請求主體

<ParamField body="type" type="string" required>
  工具類型（例如 `restful`、`mcp`、`google-calendar-create`、`smtp`、`duckduckgo-search`、`agent`）
</ParamField>

<ParamField body="metadata" type="object">
  特定類型的配置。可用的類型及其結構描述請參閱 `GET /v1/projects/{projectId}/tools/types`。
</ParamField>

## 回應

回傳建立的工具，狀態碼為 `201`。

### 範例

```bash theme={null}
curl -X POST https://api.pathors.com/v1/projects/{projectId}/tools \
  -H "Authorization: Bearer dk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "restful",
    "metadata": {
      "url": "https://api.example.com/search",
      "method": "GET"
    }
  }'
```
