> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/api/api-doc-ja/api-reference/gong-ju-he-lian-jie-qi.md).

# ツールとコネクタ

### ツールの作成 <a href="#undefined" id="undefined"></a>

POST `/api/tools/`

#### リクエスト内容

**リクエストパラメータ**

| フィールド               | 型            | 必須 | 説明                                                                                                      |
| ------------------- | ------------ | -- | ------------------------------------------------------------------------------------------------------- |
| name                | string       | 任意 | ツール名には半角英字、数字、アンダースコア(\_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 |
| displayName         | string       | 必須 | 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。                                                                        |
| description         | string       | 任意 | ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。                                                               |
| prompt              | string       | 任意 | LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。                        |
| toolType            | object       | 任意 |                                                                                                         |
| apiUrl              | string (uri) | 任意 |                                                                                                         |
| httpMethod          | object       | 任意 |                                                                                                         |
| rawHeaders          | object       | 任意 |                                                                                                         |
| rawParametersSchema | object       | 任意 |                                                                                                         |
| functionCode        | string       | 任意 |                                                                                                         |
| mcpUrl              | string       | 任意 |                                                                                                         |
| mcpAllowedTools     | object       | 任意 |                                                                                                         |
| rawMcpHeader        | object       | 任意 | Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます                                                |

**リクエスト構造の例**

```typescript
{
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
}
```

**リクエスト例の値**

```json
{
  "name": "サンプル名称",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "prompt": "サンプル文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": null,
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "サンプル文字列",
  "mcpUrl": "サンプル文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X POST "https://api.maiagent.ai/api/tools/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  };

axios.post("https://api.maiagent.ai/api/tools/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "name": "サンプル名称",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "prompt": "サンプル文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": null,
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "サンプル文字列",
      "mcpUrl": "サンプル文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null
    }

response = requests.post(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/tools/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "name": "サンプル名称",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "prompt": "サンプル文字列",
            "toolType": {},
            "apiUrl": "https://example.com/file.jpg",
            "httpMethod": null,
            "rawHeaders": null,
            "rawParametersSchema": null,
            "functionCode": "サンプル文字列",
            "mcpUrl": "サンプル文字列",
            "mcpAllowedTools": null,
            "rawMcpHeader": null
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 201**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### ツールの作成 <a href="#undefined" id="undefined"></a>

POST `/api/v1/tools/`

#### リクエスト内容

**リクエストパラメータ**

| フィールド               | 型            | 必須 | 説明                                                                                                      |
| ------------------- | ------------ | -- | ------------------------------------------------------------------------------------------------------- |
| name                | string       | 任意 | ツール名には半角英字、数字、アンダースコア(\_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 |
| displayName         | string       | 必須 | 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。                                                                        |
| description         | string       | 任意 | ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。                                                               |
| prompt              | string       | 任意 | LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。                        |
| toolType            | object       | 任意 |                                                                                                         |
| apiUrl              | string (uri) | 任意 |                                                                                                         |
| httpMethod          | object       | 任意 |                                                                                                         |
| rawHeaders          | object       | 任意 |                                                                                                         |
| rawParametersSchema | object       | 任意 |                                                                                                         |
| functionCode        | string       | 任意 |                                                                                                         |
| mcpUrl              | string       | 任意 |                                                                                                         |
| mcpAllowedTools     | object       | 任意 |                                                                                                         |
| rawMcpHeader        | object       | 任意 | Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます                                                |

**リクエスト構造の例**

```typescript
{
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
}
```

**リクエスト例の値**

```json
{
  "name": "サンプル名称",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "prompt": "サンプル文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": null,
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "サンプル文字列",
  "mcpUrl": "サンプル文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/tools/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  };

axios.post("https://api.maiagent.ai/api/v1/tools/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "name": "サンプル名称",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "prompt": "サンプル文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": null,
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "サンプル文字列",
      "mcpUrl": "サンプル文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null
    }

response = requests.post(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/v1/tools/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "name": "サンプル名称",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "prompt": "サンプル文字列",
            "toolType": {},
            "apiUrl": "https://example.com/file.jpg",
            "httpMethod": null,
            "rawHeaders": null,
            "rawParametersSchema": null,
            "functionCode": "サンプル文字列",
            "mcpUrl": "サンプル文字列",
            "mcpAllowedTools": null,
            "rawMcpHeader": null
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 201**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### ツール一覧の取得 <a href="#undefined" id="undefined"></a>

GET `/api/tools/`

#### パラメータ

| パラメータ名     | 必須 | 型       | 説明                                                 |
| ---------- | -- | ------- | -------------------------------------------------- |
| `isGlobal` | ❌  | boolean | グローバルツールを取得するには "true" を設定します。それ以外の場合は組織のツールを取得します |
| `page`     | ❌  | integer | A page number within the paginated result set.     |
| `pageSize` | ❌  | integer | Number of results to return per page.              |
| `toolType` | ❌  | string  | ツールタイプでフィルタリングします：api, function, mcp               |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/tools/?isGlobal=true&page=1&pageSize=1&toolType=api" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/tools/?isGlobal=true&page=1&pageSize=1&toolType=api", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/?isGlobal=true&page=1&pageSize=1&toolType=api"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/tools/?isGlobal=true&page=1&pageSize=1&toolType=api", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "count": integer
  "next"?: string (uri) // 任意
  "previous"?: string (uri) // 任意
  "results": [
    {
      "id": string (uuid)
      "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
      "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
      "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
      "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
      "toolType"?:  // 任意
      {
      }
      "apiUrl"?: string (uri) // 任意
      "httpMethod"?: // 異なる型を持つ可能性があります (任意)
      string (enum: get, post, put, delete, patch) // 任意
      "rawHeaders"?: object // 任意
      "rawParametersSchema"?: object // 任意
      "functionCode"?: string // 任意
      "organization": string (uuid)
      "createdBy": string (uuid)
      "isGlobal": boolean // If set as global tool, all organizations can use this tool
      "mcpUrl"?: string // 任意
      "mcpAllowedTools"?: object // 任意
      "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
      "createdAt": string (timestamp)
      "updatedAt": string (timestamp)
    }
  ]
}
```

**レスポンス例の値**

```json
{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "レスポンス文字列",
      "displayName": "レスポンス文字列",
      "description": "レスポンス文字列",
      "prompt": "レスポンス文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": "get",
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "レスポンス文字列",
      "organization": "550e8400-e29b-41d4-a716-446655440000",
      "createdBy": "550e8400-e29b-41d4-a716-446655440000",
      "isGlobal": false,
      "mcpUrl": "レスポンス文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null,
      "createdAt": "レスポンス文字列",
      "updatedAt": "レスポンス文字列"
    }
  ]
}
```

***

### ツール一覧の取得 <a href="#undefined" id="undefined"></a>

GET `/api/v1/tools/`

#### パラメータ

| パラメータ名     | 必須 | 型       | 説明                                                 |
| ---------- | -- | ------- | -------------------------------------------------- |
| `isGlobal` | ❌  | boolean | グローバルツールを取得するには "true" を設定します。それ以外の場合は組織のツールを取得します |
| `page`     | ❌  | integer | A page number within the paginated result set.     |
| `pageSize` | ❌  | integer | Number of results to return per page.              |
| `toolType` | ❌  | string  | ツールタイプでフィルタリングします：api, function, mcp               |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/tools/?isGlobal=true&page=1&pageSize=1&toolType=api" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/tools/?isGlobal=true&page=1&pageSize=1&toolType=api", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/?isGlobal=true&page=1&pageSize=1&toolType=api"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/tools/?isGlobal=true&page=1&pageSize=1&toolType=api", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "count": integer
  "next"?: string (uri) // 任意
  "previous"?: string (uri) // 任意
  "results": [
    {
      "id": string (uuid)
      "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
      "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
      "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
      "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
      "toolType"?:  // 任意
      {
      }
      "apiUrl"?: string (uri) // 任意
      "httpMethod"?: // 異なる型を持つ可能性があります (任意)
      string (enum: get, post, put, delete, patch) // 任意
      "rawHeaders"?: object // 任意
      "rawParametersSchema"?: object // 任意
      "functionCode"?: string // 任意
      "organization": string (uuid)
      "createdBy": string (uuid)
      "isGlobal": boolean // If set as global tool, all organizations can use this tool
      "mcpUrl"?: string // 任意
      "mcpAllowedTools"?: object // 任意
      "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
      "createdAt": string (timestamp)
      "updatedAt": string (timestamp)
    }
  ]
}
```

**レスポンス例の値**

```json
{
  "count": 123,
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2",
  "results": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "レスポンス文字列",
      "displayName": "レスポンス文字列",
      "description": "レスポンス文字列",
      "prompt": "レスポンス文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": "get",
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "レスポンス文字列",
      "organization": "550e8400-e29b-41d4-a716-446655440000",
      "createdBy": "550e8400-e29b-41d4-a716-446655440000",
      "isGlobal": false,
      "mcpUrl": "レスポンス文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null,
      "createdAt": "レスポンス文字列",
      "updatedAt": "レスポンス文字列"
    }
  ]
}
```

***

### 特定のツールを取得 <a href="#undefined" id="undefined"></a>

GET `/api/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### 特定のツールを取得 <a href="#undefined" id="undefined"></a>

GET `/api/tools/available-tools/`

#### パラメータ

| パラメータ名            | 必須 | 型      | 説明                   |
| ----------------- | -- | ------ | -------------------- |
| `availableTools`  | ✅  | array  | 使用可能なすべての MCP ツールの一覧 |
| `mcpAllowedTools` | ❌  | array  | MCP 使用を許可されたツールの一覧   |
| `mcpUrl`          | ✅  | string | MCP サーバー URL（必須）     |
| `rawMcpHeader`    | ❌  |        | MCP Header（JSON 形式）  |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "mcpUrl": string // MCP サーバー URL（必須）
  "rawMcpHeader"?: object // MCP Header（JSON 形式） (任意)
  "mcpAllowedTools"?: [ // MCP 使用を許可されたツールの一覧 (任意)
    string
  ]
  "availableTools": [ // 使用可能なすべての MCP ツールの一覧
    string
  ]
}
```

**レスポンス例の値**

```json
{
  "mcpUrl": "レスポンス文字列",
  "rawMcpHeader": null,
  "mcpAllowedTools": [
    "レスポンス文字列"
  ],
  "availableTools": [
    "レスポンス文字列"
  ]
}
```

**ステータスコード: 400**

**レスポンス構造の例**

```typescript
{
  "detail"?: string // 任意
}
```

**レスポンス例の値**

```json
{
  "detail": "レスポンス文字列"
}
```

***

### 特定のツールを取得 <a href="#undefined" id="undefined"></a>

GET `/api/v1/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### 特定のツールを取得 <a href="#undefined" id="undefined"></a>

GET `/api/v1/tools/available-tools/`

#### パラメータ

| パラメータ名            | 必須 | 型      | 説明                   |
| ----------------- | -- | ------ | -------------------- |
| `availableTools`  | ✅  | array  | 使用可能なすべての MCP ツールの一覧 |
| `mcpAllowedTools` | ❌  | array  | MCP 使用を許可されたツールの一覧   |
| `mcpUrl`          | ✅  | string | MCP サーバー URL（必須）     |
| `rawMcpHeader`    | ❌  |        | MCP Header（JSON 形式）  |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/tools/available-tools/?availableTools=example&mcpAllowedTools=example&mcpUrl=example&rawMcpHeader=example", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "mcpUrl": string // MCP サーバー URL（必須）
  "rawMcpHeader"?: object // MCP Header（JSON 形式） (任意)
  "mcpAllowedTools"?: [ // MCP 使用を許可されたツールの一覧 (任意)
    string
  ]
  "availableTools": [ // 使用可能なすべての MCP ツールの一覧
    string
  ]
}
```

**レスポンス例の値**

```json
{
  "mcpUrl": "レスポンス文字列",
  "rawMcpHeader": null,
  "mcpAllowedTools": [
    "レスポンス文字列"
  ],
  "availableTools": [
    "レスポンス文字列"
  ]
}
```

**ステータスコード: 400**

**レスポンス構造の例**

```typescript
{
  "detail"?: string // 任意
}
```

**レスポンス例の値**

```json
{
  "detail": "レスポンス文字列"
}
```

***

### ツールの更新 <a href="#undefined" id="undefined"></a>

PUT `/api/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### リクエスト内容

**リクエストパラメータ**

| フィールド               | 型            | 必須 | 説明                                                                                                      |
| ------------------- | ------------ | -- | ------------------------------------------------------------------------------------------------------- |
| name                | string       | 任意 | ツール名には半角英字、数字、アンダースコア(\_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 |
| displayName         | string       | 必須 | 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。                                                                        |
| description         | string       | 任意 | ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。                                                               |
| prompt              | string       | 任意 | LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。                        |
| toolType            | object       | 任意 |                                                                                                         |
| apiUrl              | string (uri) | 任意 |                                                                                                         |
| httpMethod          | object       | 任意 |                                                                                                         |
| rawHeaders          | object       | 任意 |                                                                                                         |
| rawParametersSchema | object       | 任意 |                                                                                                         |
| functionCode        | string       | 任意 |                                                                                                         |
| mcpUrl              | string       | 任意 |                                                                                                         |
| mcpAllowedTools     | object       | 任意 |                                                                                                         |
| rawMcpHeader        | object       | 任意 | Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます                                                |

**リクエスト構造の例**

```typescript
{
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
}
```

**リクエスト例の値**

```json
{
  "name": "サンプル名称",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "prompt": "サンプル文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": null,
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "サンプル文字列",
  "mcpUrl": "サンプル文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PUT "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  };

axios.put("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "name": "サンプル名称",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "prompt": "サンプル文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": null,
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "サンプル文字列",
      "mcpUrl": "サンプル文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null
    }

response = requests.put(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->put("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "name": "サンプル名称",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "prompt": "サンプル文字列",
            "toolType": {},
            "apiUrl": "https://example.com/file.jpg",
            "httpMethod": null,
            "rawHeaders": null,
            "rawParametersSchema": null,
            "functionCode": "サンプル文字列",
            "mcpUrl": "サンプル文字列",
            "mcpAllowedTools": null,
            "rawMcpHeader": null
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### ツールの更新 <a href="#undefined" id="undefined"></a>

PUT `/api/v1/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### リクエスト内容

**リクエストパラメータ**

| フィールド               | 型            | 必須 | 説明                                                                                                      |
| ------------------- | ------------ | -- | ------------------------------------------------------------------------------------------------------- |
| name                | string       | 任意 | ツール名には半角英字、数字、アンダースコア(\_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 |
| displayName         | string       | 必須 | 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。                                                                        |
| description         | string       | 任意 | ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。                                                               |
| prompt              | string       | 任意 | LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。                        |
| toolType            | object       | 任意 |                                                                                                         |
| apiUrl              | string (uri) | 任意 |                                                                                                         |
| httpMethod          | object       | 任意 |                                                                                                         |
| rawHeaders          | object       | 任意 |                                                                                                         |
| rawParametersSchema | object       | 任意 |                                                                                                         |
| functionCode        | string       | 任意 |                                                                                                         |
| mcpUrl              | string       | 任意 |                                                                                                         |
| mcpAllowedTools     | object       | 任意 |                                                                                                         |
| rawMcpHeader        | object       | 任意 | Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます                                                |

**リクエスト構造の例**

```typescript
{
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
}
```

**リクエスト例の値**

```json
{
  "name": "サンプル名称",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "prompt": "サンプル文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": null,
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "サンプル文字列",
  "mcpUrl": "サンプル文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PUT "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  };

axios.put("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "name": "サンプル名称",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "prompt": "サンプル文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": null,
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "サンプル文字列",
      "mcpUrl": "サンプル文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null
    }

response = requests.put(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->put("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "name": "サンプル名称",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "prompt": "サンプル文字列",
            "toolType": {},
            "apiUrl": "https://example.com/file.jpg",
            "httpMethod": null,
            "rawHeaders": null,
            "rawParametersSchema": null,
            "functionCode": "サンプル文字列",
            "mcpUrl": "サンプル文字列",
            "mcpAllowedTools": null,
            "rawMcpHeader": null
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### ツールの部分更新 <a href="#undefined" id="undefined"></a>

PATCH `/api/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### リクエスト内容

**リクエストパラメータ**

| フィールド               | 型            | 必須 | 説明                                                                                                      |
| ------------------- | ------------ | -- | ------------------------------------------------------------------------------------------------------- |
| name                | string       | 任意 | ツール名には半角英字、数字、アンダースコア(\_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 |
| displayName         | string       | 任意 | 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。                                                                        |
| description         | string       | 任意 | ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。                                                               |
| prompt              | string       | 任意 | LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。                        |
| toolType            | object       | 任意 |                                                                                                         |
| apiUrl              | string (uri) | 任意 |                                                                                                         |
| httpMethod          | object       | 任意 |                                                                                                         |
| rawHeaders          | object       | 任意 |                                                                                                         |
| rawParametersSchema | object       | 任意 |                                                                                                         |
| functionCode        | string       | 任意 |                                                                                                         |
| mcpUrl              | string       | 任意 |                                                                                                         |
| mcpAllowedTools     | object       | 任意 |                                                                                                         |
| rawMcpHeader        | object       | 任意 | Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます                                                |

**リクエスト構造の例**

```typescript
{
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName"?: string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。 (任意)
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
}
```

**リクエスト例の値**

```json
{
  "name": "サンプル名称",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "prompt": "サンプル文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": null,
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "サンプル文字列",
  "mcpUrl": "サンプル文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PATCH "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  };

axios.patch("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "name": "サンプル名称",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "prompt": "サンプル文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": null,
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "サンプル文字列",
      "mcpUrl": "サンプル文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null
    }

response = requests.patch(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->patch("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "name": "サンプル名称",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "prompt": "サンプル文字列",
            "toolType": {},
            "apiUrl": "https://example.com/file.jpg",
            "httpMethod": null,
            "rawHeaders": null,
            "rawParametersSchema": null,
            "functionCode": "サンプル文字列",
            "mcpUrl": "サンプル文字列",
            "mcpAllowedTools": null,
            "rawMcpHeader": null
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### ツールの部分更新 <a href="#undefined" id="undefined"></a>

PATCH `/api/v1/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### リクエスト内容

**リクエストパラメータ**

| フィールド               | 型            | 必須 | 説明                                                                                                      |
| ------------------- | ------------ | -- | ------------------------------------------------------------------------------------------------------- |
| name                | string       | 任意 | ツール名には半角英字、数字、アンダースコア(\_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 |
| displayName         | string       | 任意 | 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。                                                                        |
| description         | string       | 任意 | ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。                                                               |
| prompt              | string       | 任意 | LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。                        |
| toolType            | object       | 任意 |                                                                                                         |
| apiUrl              | string (uri) | 任意 |                                                                                                         |
| httpMethod          | object       | 任意 |                                                                                                         |
| rawHeaders          | object       | 任意 |                                                                                                         |
| rawParametersSchema | object       | 任意 |                                                                                                         |
| functionCode        | string       | 任意 |                                                                                                         |
| mcpUrl              | string       | 任意 |                                                                                                         |
| mcpAllowedTools     | object       | 任意 |                                                                                                         |
| rawMcpHeader        | object       | 任意 | Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます                                                |

**リクエスト構造の例**

```typescript
{
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName"?: string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。 (任意)
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
}
```

**リクエスト例の値**

```json
{
  "name": "サンプル名称",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "prompt": "サンプル文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": null,
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "サンプル文字列",
  "mcpUrl": "サンプル文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PATCH "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "name": "サンプル名称",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "prompt": "サンプル文字列",
    "toolType": {},
    "apiUrl": "https://example.com/file.jpg",
    "httpMethod": null,
    "rawHeaders": null,
    "rawParametersSchema": null,
    "functionCode": "サンプル文字列",
    "mcpUrl": "サンプル文字列",
    "mcpAllowedTools": null,
    "rawMcpHeader": null
  };

axios.patch("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "name": "サンプル名称",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "prompt": "サンプル文字列",
      "toolType": {},
      "apiUrl": "https://example.com/file.jpg",
      "httpMethod": null,
      "rawHeaders": null,
      "rawParametersSchema": null,
      "functionCode": "サンプル文字列",
      "mcpUrl": "サンプル文字列",
      "mcpAllowedTools": null,
      "rawMcpHeader": null
    }

response = requests.patch(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->patch("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "name": "サンプル名称",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "prompt": "サンプル文字列",
            "toolType": {},
            "apiUrl": "https://example.com/file.jpg",
            "httpMethod": null,
            "rawHeaders": null,
            "rawParametersSchema": null,
            "functionCode": "サンプル文字列",
            "mcpUrl": "サンプル文字列",
            "mcpAllowedTools": null,
            "rawMcpHeader": null
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name"?: string // ツール名には半角英字、数字、アンダースコア(_)、ハイフン(-)のみを使用できます。MCP タイプのツールではこの項目は不要で、この項目は API タイプのツールで LLM が使用するために用いられます。 (任意)
  "displayName": string // 任意の文字を含められる名称で、ユーザーが設定・管理に使用します。
  "description"?: string // ユーザーに表示するツールの説明です。MCP タイプのツールではこの項目は不要です。 (任意)
  "prompt"?: string // LLM が使用するツールの説明・プロンプトです。空欄の場合、システムは description 項目を使用します。MCP タイプのツールではこの項目は不要です。 (任意)
  "toolType"?:  // 任意
  {
  }
  "apiUrl"?: string (uri) // 任意
  "httpMethod"?: // 異なる型を持つ可能性があります (任意)
  string (enum: get, post, put, delete, patch) // 任意
  "rawHeaders"?: object // 任意
  "rawParametersSchema"?: object // 任意
  "functionCode"?: string // 任意
  "organization": string (uuid)
  "createdBy": string (uuid)
  "isGlobal": boolean // If set as global tool, all organizations can use this tool
  "mcpUrl"?: string // 任意
  "mcpAllowedTools"?: object // 任意
  "rawMcpHeader"?: object // Contact に対応する MCP Credential が存在しない場合、このデフォルトヘッダーが使用されます (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "prompt": "レスポンス文字列",
  "toolType": {},
  "apiUrl": "https://example.com/file.jpg",
  "httpMethod": "get",
  "rawHeaders": null,
  "rawParametersSchema": null,
  "functionCode": "レスポンス文字列",
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "isGlobal": false,
  "mcpUrl": "レスポンス文字列",
  "mcpAllowedTools": null,
  "rawMcpHeader": null,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### ツールの削除 <a href="#undefined" id="undefined"></a>

DELETE `/api/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// リクエスト内容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

| ステータスコード | 説明               |
| -------- | ---------------- |
| 204      | No response body |

***

### ツールの削除 <a href="#undefined" id="undefined"></a>

DELETE `/api/v1/tools/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                  |
| ------ | -- | ------ | ----------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this ツール. |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// リクエスト内容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/v1/tools/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

| ステータスコード | 説明               |
| -------- | ---------------- |
| 204      | No response body |

***

### コネクタの作成 <a href="#undefined" id="undefined"></a>

POST `/api/connectors/`

#### リクエスト内容

**リクエストパラメータ**

| フィールド         | 型             | 必須 | 説明                                                                           |
| ------------- | ------------- | -- | ---------------------------------------------------------------------------- |
| mcpRegistryId | string (uuid) | 必須 |                                                                              |
| displayName   | string        | 任意 | Custom display name for this connector (defaults to MCP Registry name)       |
| description   | string        | 任意 | Custom description for this connector (defaults to MCP Registry description) |
| isEnabled     | boolean       | 任意 | Whether this connector is enabled for contacts in the organization           |

**リクエスト構造の例**

```typescript
{
  "mcpRegistryId": string (uuid)
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
}
```

**リクエスト例の値**

```json
{
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "isEnabled": true
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X POST "https://api.maiagent.ai/api/connectors/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  };

axios.post("https://api.maiagent.ai/api/connectors/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "isEnabled": true
    }

response = requests.post(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/connectors/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "isEnabled": true
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 201**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタの作成 <a href="#undefined" id="undefined"></a>

POST `/api/v1/connectors/`

#### リクエスト内容

**リクエストパラメータ**

| フィールド         | 型             | 必須 | 説明                                                                           |
| ------------- | ------------- | -- | ---------------------------------------------------------------------------- |
| mcpRegistryId | string (uuid) | 必須 |                                                                              |
| displayName   | string        | 任意 | Custom display name for this connector (defaults to MCP Registry name)       |
| description   | string        | 任意 | Custom description for this connector (defaults to MCP Registry description) |
| isEnabled     | boolean       | 任意 | Whether this connector is enabled for contacts in the organization           |

**リクエスト構造の例**

```typescript
{
  "mcpRegistryId": string (uuid)
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
}
```

**リクエスト例の値**

```json
{
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "isEnabled": true
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/connectors/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  };

axios.post("https://api.maiagent.ai/api/v1/connectors/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "isEnabled": true
    }

response = requests.post(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->post("https://api.maiagent.ai/api/v1/connectors/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "isEnabled": true
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 201**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタ一覧の取得 <a href="#undefined" id="undefined"></a>

GET `/api/connectors/`

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/connectors/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/connectors/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/connectors/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
[
  {
    "id": string (uuid)
    "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
    "mcpRegistryName": string
    "mcpRegistryId": string
    "logoUrl": string
    "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
    "authorizedMembersCount": integer // 認可済みの Member 数を取得します
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
]
```

**レスポンス例の値**

```json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "レスポンス文字列",
    "mcpRegistryName": "レスポンス文字列",
    "mcpRegistryId": "レスポンス文字列",
    "logoUrl": "レスポンス文字列",
    "isEnabled": false,
    "authorizedMembersCount": 456,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  }
]
```

***

### コネクタ一覧の取得 <a href="#undefined" id="undefined"></a>

GET `/api/v1/connectors/`

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/connectors/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/connectors/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/connectors/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
[
  {
    "id": string (uuid)
    "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
    "mcpRegistryName": string
    "mcpRegistryId": string
    "logoUrl": string
    "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
    "authorizedMembersCount": integer // 認可済みの Member 数を取得します
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
]
```

**レスポンス例の値**

```json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "レスポンス文字列",
    "mcpRegistryName": "レスポンス文字列",
    "mcpRegistryId": "レスポンス文字列",
    "logoUrl": "レスポンス文字列",
    "isEnabled": false,
    "authorizedMembersCount": 456,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  }
]
```

***

### 特定のコネクタを取得 <a href="#undefined" id="undefined"></a>

GET `/api/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### 特定のコネクタを取得 <a href="#undefined" id="undefined"></a>

GET `/api/v1/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタの更新 <a href="#undefined" id="undefined"></a>

PUT `/api/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### リクエスト内容

**リクエストパラメータ**

| フィールド         | 型             | 必須 | 説明                                                                           |
| ------------- | ------------- | -- | ---------------------------------------------------------------------------- |
| mcpRegistryId | string (uuid) | 必須 |                                                                              |
| displayName   | string        | 任意 | Custom display name for this connector (defaults to MCP Registry name)       |
| description   | string        | 任意 | Custom description for this connector (defaults to MCP Registry description) |
| isEnabled     | boolean       | 任意 | Whether this connector is enabled for contacts in the organization           |

**リクエスト構造の例**

```typescript
{
  "mcpRegistryId": string (uuid)
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
}
```

**リクエスト例の値**

```json
{
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "isEnabled": true
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PUT "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  };

axios.put("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "isEnabled": true
    }

response = requests.put(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->put("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "isEnabled": true
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタの更新 <a href="#undefined" id="undefined"></a>

PUT `/api/v1/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### リクエスト内容

**リクエストパラメータ**

| フィールド         | 型             | 必須 | 説明                                                                           |
| ------------- | ------------- | -- | ---------------------------------------------------------------------------- |
| mcpRegistryId | string (uuid) | 必須 |                                                                              |
| displayName   | string        | 任意 | Custom display name for this connector (defaults to MCP Registry name)       |
| description   | string        | 任意 | Custom description for this connector (defaults to MCP Registry description) |
| isEnabled     | boolean       | 任意 | Whether this connector is enabled for contacts in the organization           |

**リクエスト構造の例**

```typescript
{
  "mcpRegistryId": string (uuid)
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
}
```

**リクエスト例の値**

```json
{
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "isEnabled": true
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PUT "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  };

axios.put("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "isEnabled": true
    }

response = requests.put(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->put("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "isEnabled": true
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタの部分更新 <a href="#undefined" id="undefined"></a>

PATCH `/api/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### リクエスト内容

**リクエストパラメータ**

| フィールド         | 型             | 必須 | 説明                                                                           |
| ------------- | ------------- | -- | ---------------------------------------------------------------------------- |
| mcpRegistryId | string (uuid) | 任意 |                                                                              |
| displayName   | string        | 任意 | Custom display name for this connector (defaults to MCP Registry name)       |
| description   | string        | 任意 | Custom description for this connector (defaults to MCP Registry description) |
| isEnabled     | boolean       | 任意 | Whether this connector is enabled for contacts in the organization           |

**リクエスト構造の例**

```typescript
{
  "mcpRegistryId"?: string (uuid) // 任意
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
}
```

**リクエスト例の値**

```json
{
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "isEnabled": true
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PATCH "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  };

axios.patch("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "isEnabled": true
    }

response = requests.patch(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->patch("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "isEnabled": true
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタの部分更新 <a href="#undefined" id="undefined"></a>

PATCH `/api/v1/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### リクエスト内容

**リクエストパラメータ**

| フィールド         | 型             | 必須 | 説明                                                                           |
| ------------- | ------------- | -- | ---------------------------------------------------------------------------- |
| mcpRegistryId | string (uuid) | 任意 |                                                                              |
| displayName   | string        | 任意 | Custom display name for this connector (defaults to MCP Registry name)       |
| description   | string        | 任意 | Custom description for this connector (defaults to MCP Registry description) |
| isEnabled     | boolean       | 任意 | Whether this connector is enabled for contacts in the organization           |

**リクエスト構造の例**

```typescript
{
  "mcpRegistryId"?: string (uuid) // 任意
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
}
```

**リクエスト例の値**

```json
{
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "displayName": "サンプル文字列",
  "description": "サンプル文字列",
  "isEnabled": true
}
```

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X PATCH "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  }'

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
};

// リクエスト内容 (payload)
const data = {
    "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
    "displayName": "サンプル文字列",
    "description": "サンプル文字列",
    "isEnabled": true
  };

axios.patch("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY",
    "Content-Type": "application/json"
}

# リクエスト内容 (payload)
data = {
      "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
      "displayName": "サンプル文字列",
      "description": "サンプル文字列",
      "isEnabled": true
    }

response = requests.patch(url, json=data, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->patch("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY',
            'Content-Type' => 'application/json'
        ],
        'json' => {
            "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
            "displayName": "サンプル文字列",
            "description": "サンプル文字列",
            "isEnabled": true
        }
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタの削除 <a href="#undefined" id="undefined"></a>

DELETE `/api/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// リクエスト内容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

| ステータスコード | 説明               |
| -------- | ---------------- |
| 204      | No response body |

***

### コネクタの削除 <a href="#undefined" id="undefined"></a>

DELETE `/api/v1/connectors/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// リクエスト内容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

| ステータスコード | 説明               |
| -------- | ---------------- |
| 204      | No response body |

***

### コネクタ認可メンバー一覧の取得 <a href="#undefined" id="undefined"></a>

GET `/api/connectors/{id}/authorized-members/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタ認可メンバー一覧の取得 <a href="#undefined" id="undefined"></a>

GET `/api/v1/connectors/{id}/authorized-members/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明 |
| ------ | -- | ------ | -- |
| `id`   | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "mcpRegistry": 
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
  "mcpRegistryId": string (uuid)
  "name": string
  "displayName"?: string // Custom display name for this connector (defaults to MCP Registry name) (任意)
  "description"?: string // Custom description for this connector (defaults to MCP Registry description) (任意)
  "effectiveDescription": string
  "remoteMcpUrl": string
  "oauthServerUrl": string
  "logoUrl": string
  "isEnabled"?: boolean // Whether this connector is enabled for contacts in the organization (任意)
  "organization": string (uuid)
  "createdBy": string (uuid)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "mcpRegistry": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  },
  "mcpRegistryId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "effectiveDescription": "レスポンス文字列",
  "remoteMcpUrl": "レスポンス文字列",
  "oauthServerUrl": "レスポンス文字列",
  "logoUrl": "レスポンス文字列",
  "isEnabled": false,
  "organization": "550e8400-e29b-41d4-a716-446655440000",
  "createdBy": "550e8400-e29b-41d4-a716-446655440000",
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### コネクタ認可メンバーの削除 <a href="#undefined" id="undefined"></a>

DELETE `/api/connectors/{id}/authorized-members/{memberId}/`

#### パラメータ

| パラメータ名     | 必須 | 型      | 説明 |
| ---------- | -- | ------ | -- |
| `id`       | ✅  | string |    |
| `memberId` | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// リクエスト内容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

| ステータスコード | 説明               |
| -------- | ---------------- |
| 204      | No response body |

***

### コネクタ認可メンバーの削除 <a href="#undefined" id="undefined"></a>

DELETE `/api/v1/connectors/{id}/authorized-members/{memberId}/`

#### パラメータ

| パラメータ名     | 必須 | 型      | 説明 |
| ---------- | -- | ------ | -- |
| `id`       | ✅  | string |    |
| `memberId` | ✅  | string |    |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X DELETE "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

// リクエスト内容 (payload)
const data = null;

axios.delete("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/", data, config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.delete(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->delete("https://api.maiagent.ai/api/v1/connectors/550e8400-e29b-41d4-a716-446655440000/authorized-members/{memberId}/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

| ステータスコード | 説明               |
| -------- | ---------------- |
| 204      | No response body |

***

### MCP ツールレジストリ一覧の取得 <a href="#mcp" id="mcp"></a>

GET `/api/mcp/registry/`

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/mcp/registry/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/mcp/registry/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/mcp/registry/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/mcp/registry/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
[
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
]
```

**レスポンス例の値**

```json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  }
]
```

***

### MCP ツールレジストリ一覧の取得 <a href="#mcp" id="mcp"></a>

GET `/api/v1/mcp/registry/`

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/mcp/registry/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/mcp/registry/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/mcp/registry/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/mcp/registry/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
[
  {
    "id": string (uuid)
    "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
    "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
    "description": string // Brief description of the MCP service
    "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
    "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
    "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
    "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
    "createdAt": string (timestamp)
    "updatedAt": string (timestamp)
  }
]
```

**レスポンス例の値**

```json
[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "レスポンス文字列",
    "displayName": "レスポンス文字列",
    "description": "レスポンス文字列",
    "remoteMcpUrl": "https://example.com/file.jpg",
    "oauthServerUrl": "https://example.com/file.jpg",
    "logoUrl": "https://example.com/file.jpg",
    "isActive": false,
    "createdAt": "レスポンス文字列",
    "updatedAt": "レスポンス文字列"
  }
]
```

***

### 特定の MCP ツールレジストリを取得 <a href="#mcp" id="mcp"></a>

GET `/api/mcp/registry/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                           |
| ------ | -- | ------ | -------------------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this MCP Registry. |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/mcp/registry/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/mcp/registry/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/mcp/registry/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/mcp/registry/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
  "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
  "description": string // Brief description of the MCP service
  "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
  "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
  "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
  "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "remoteMcpUrl": "https://example.com/file.jpg",
  "oauthServerUrl": "https://example.com/file.jpg",
  "logoUrl": "https://example.com/file.jpg",
  "isActive": false,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***

### 特定の MCP ツールレジストリを取得 <a href="#mcp" id="mcp"></a>

GET `/api/v1/mcp/registry/{id}/`

#### パラメータ

| パラメータ名 | 必須 | 型      | 説明                                           |
| ------ | -- | ------ | -------------------------------------------- |
| `id`   | ✅  | string | A UUID string identifying this MCP Registry. |

#### コード例

{% tabs %}
{% tab title="Shell/Bash" %}

```bash
# API 呼び出し例 (Shell)
curl -X GET "https://api.maiagent.ai/api/v1/mcp/registry/550e8400-e29b-41d4-a716-446655440000/" \
  -H "Authorization: Api-Key YOUR_API_KEY"

# 実行前に YOUR_API_KEY を置き換え、リクエストデータを確認してください。
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

// リクエストヘッダーの設定
const config = {
  headers: {
    'Authorization': 'Api-Key YOUR_API_KEY'
  }
};

axios.get("https://api.maiagent.ai/api/v1/mcp/registry/550e8400-e29b-41d4-a716-446655440000/", config)
  .then(response => {
    console.log('レスポンスの取得に成功しました:');
    console.log(response.data);
  })
  .catch(error => {
    console.error('リクエストでエラーが発生しました:');
    console.error(error.response?.data || error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://api.maiagent.ai/api/v1/mcp/registry/550e8400-e29b-41d4-a716-446655440000/"
headers = {
    "Authorization": "Api-Key YOUR_API_KEY"
}


response = requests.get(url, headers=headers)
try:
    print("レスポンスの取得に成功しました:")
    print(response.json())
except Exception as e:
    print("リクエストでエラーが発生しました:", e)
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
require 'vendor/autoload.php';

$client = new GuzzleHttp\Client();

try {
    $response = $client->get("https://api.maiagent.ai/api/v1/mcp/registry/550e8400-e29b-41d4-a716-446655440000/", [
        'headers' => [
            'Authorization' => 'Api-Key YOUR_API_KEY'
        ]
    ]);
    
    $data = json_decode($response->getBody(), true);
    echo "レスポンスの取得に成功しました:\n";
    print_r($data);
} catch (Exception $e) {
    echo 'リクエストでエラーが発生しました: ' . $e->getMessage();
}
?>
```

{% endtab %}
{% endtabs %}

#### レスポンス内容

**ステータスコード: 200**

**レスポンス構造の例**

```typescript
{
  "id": string (uuid)
  "name": string // MCP service name (e.g., Supabase, Sentry). Only alphanumeric, underscore and hyphen allowed.
  "displayName"?: string // Human-readable display name (defaults to name if empty) (任意)
  "description": string // Brief description of the MCP service
  "remoteMcpUrl": string (uri) // The URL of the Remote MCP service
  "oauthServerUrl"?: string (uri) // OAuth server URL if different from MCP server (e.g., Supabase MCP is at mcp.supabase.com but OAuth is at api.supabase.com) (任意)
  "logoUrl"?: string (uri) // CDN URL for the MCP service logo (for frontend rendering) (任意)
  "isActive"?: boolean // Whether this MCP service is currently available for use (任意)
  "createdAt": string (timestamp)
  "updatedAt": string (timestamp)
}
```

**レスポンス例の値**

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "レスポンス文字列",
  "displayName": "レスポンス文字列",
  "description": "レスポンス文字列",
  "remoteMcpUrl": "https://example.com/file.jpg",
  "oauthServerUrl": "https://example.com/file.jpg",
  "logoUrl": "https://example.com/file.jpg",
  "isActive": false,
  "createdAt": "レスポンス文字列",
  "updatedAt": "レスポンス文字列"
}
```

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/api/api-doc-ja/api-reference/gong-ju-he-lian-jie-qi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
