> This page is for Workforce.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# Create Tool Pack

POST https://ah-api.merge.dev/api/v1/tool-packs/
Content-Type: application/json

Creates a Tool Pack with connectors

Reference: https://docs.merge.dev/merge-workforce/agent-handler/tool-packs/tool-packs-create

## Authentication

- `Authorization` header (bearer token, required) — Token-based authentication with required prefix "Bearer"

## Request

### Body (application/json)

This endpoint expects a ToolPackPublicWrite.

- `name` (string, required)
- `description` (string, required)
- `connectors` (list of ToolPackConnectorInput, optional) — Full-replace list of connectors. Any connector not in this array is detached from the tool pack. For incremental add/remove, use the `/tool-packs/{id}/connectors/` sub-resource endpoints.

## Response

### 201

- `id` (string, required) — ID of the Tool Pack
- `name` (string, required) — Name of the Tool Pack
- `description` (string, required) — Description of the Tool Pack
- `connectors` (list of ConnectorPublic, required) — Connectors enabled with the Tool Pack

## Types

### ToolPackConnectorInput

Shared validation for connector identifier inputs. At least one identifier must be provided. When both are set, `slug` wins and the deprecated `connector_id` is discarded.

- `slug` (string, optional) — Connector slug — primary identifier.
- `connector_id` (string, optional) — DEPRECATED — prefer `slug`. Retained for backward compatibility.
- `auth_scope` (enum, optional, default: INDIVIDUAL) — How credentials are shared for this connector. - `INDIVIDUAL`: each registered user authenticates with their own credential - `SHARED`: users in the same registered_company share one credential - `ORGANIZATION`: one credential is used for the whole organization
  - Allowed values: `INDIVIDUAL`, `SHARED`, `ORGANIZATION`
- `tool_names` (list of string, optional) — Tool names to enable for this connector. Omit to enable all tools.

### ConnectorPublic

Public tool-pack-scoped connector shape. Used across public endpoints that return a connector attached to a tool pack: both the nested `connectors[]` in `GET /api/v1/tool-packs/{id}/` and the items in `/api/v1/tool-packs/{id}/connectors/` (GET/PATCH/PUT). See the "Consolidating connector response" tech-debt spec (column E).

- `slug` (string, required)
- `name` (string, required)
- `source_url` (string, required, nullable)
- `logo_url` (string, required)
- `categories` (list of any, required)
- `auth_scope` (enum, required) — How credentials are shared for this connector. - `INDIVIDUAL`: each registered user authenticates with their own credential - `SHARED`: users in the same registered_company share one credential - `ORGANIZATION`: one credential is used for the whole organization
  - Allowed values: `INDIVIDUAL`, `SHARED`, `ORGANIZATION`
- `tools` (list of ConnectorTool, required)
- `connector_id` (string, required) — DEPRECATED — alias for the connector UUID. Prefer `slug` as the primary identifier. Retained for backward compatibility.

### ConnectorTool

Full version of ConnectorTool serializer with schemas and annotations.

- `name` (string, required) — Name of the tool
- `description` (string, required, nullable) — Description of what the tool does
- `credit_type` (string, required) — Credit type consumed by the tool
- `input_schema` (map from string to any, optional) — JSON Schema describing the tool's input parameters. Only returned when include_tool_details=true.
- `output_schema` (map from string to any, optional, nullable) — JSON Schema describing the tool's output. Omitted when the tool does not declare one. Only returned when include_tool_details=true.
- `annotations` (map from string to boolean, optional, nullable) — MCP annotation hints (e.g. read_only, destructive). Only returned when include_tool_details=true.
- `scopes` (list of string, optional, default: []) — Third-party API scopes required by the tool. Only returned when include_tool_details=true.
- `endpoints` (list of string, optional, default: []) — Third-party API endpoints the tool calls. Only returned when include_tool_details=true.

## Examples

**Request**

```json
{
  "name": "Support Agent Tool Pack",
  "description": "Ticketing connectors for support agent",
  "connectors": [
    {
      "slug": "linear",
      "auth_scope": "INDIVIDUAL",
      "tool_names": [
        "create_issue",
        "list_issues"
      ]
    }
  ]
}
```

**SDK Code**

```python Request Example (application/json)
import requests

url = "https://ah-api.merge.dev/api/v1/tool-packs/"

payload = {
    "name": "Support Agent Tool Pack",
    "description": "Ticketing connectors for support agent",
    "connectors": [
        {
            "slug": "linear",
            "auth_scope": "INDIVIDUAL",
            "tool_names": ["create_issue", "list_issues"]
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Request Example (application/json)
const url = 'https://ah-api.merge.dev/api/v1/tool-packs/';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"Support Agent Tool Pack","description":"Ticketing connectors for support agent","connectors":[{"slug":"linear","auth_scope":"INDIVIDUAL","tool_names":["create_issue","list_issues"]}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Request Example (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://ah-api.merge.dev/api/v1/tool-packs/"

	payload := strings.NewReader("{\n  \"name\": \"Support Agent Tool Pack\",\n  \"description\": \"Ticketing connectors for support agent\",\n  \"connectors\": [\n    {\n      \"slug\": \"linear\",\n      \"auth_scope\": \"INDIVIDUAL\",\n      \"tool_names\": [\n        \"create_issue\",\n        \"list_issues\"\n      ]\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Request Example (application/json)
require 'uri'
require 'net/http'

url = URI("https://ah-api.merge.dev/api/v1/tool-packs/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"Support Agent Tool Pack\",\n  \"description\": \"Ticketing connectors for support agent\",\n  \"connectors\": [\n    {\n      \"slug\": \"linear\",\n      \"auth_scope\": \"INDIVIDUAL\",\n      \"tool_names\": [\n        \"create_issue\",\n        \"list_issues\"\n      ]\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Request Example (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://ah-api.merge.dev/api/v1/tool-packs/")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"Support Agent Tool Pack\",\n  \"description\": \"Ticketing connectors for support agent\",\n  \"connectors\": [\n    {\n      \"slug\": \"linear\",\n      \"auth_scope\": \"INDIVIDUAL\",\n      \"tool_names\": [\n        \"create_issue\",\n        \"list_issues\"\n      ]\n    }\n  ]\n}")
  .asString();
```

```php Request Example (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://ah-api.merge.dev/api/v1/tool-packs/', [
  'body' => '{
  "name": "Support Agent Tool Pack",
  "description": "Ticketing connectors for support agent",
  "connectors": [
    {
      "slug": "linear",
      "auth_scope": "INDIVIDUAL",
      "tool_names": [
        "create_issue",
        "list_issues"
      ]
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Request Example (application/json)
using RestSharp;

var client = new RestClient("https://ah-api.merge.dev/api/v1/tool-packs/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"Support Agent Tool Pack\",\n  \"description\": \"Ticketing connectors for support agent\",\n  \"connectors\": [\n    {\n      \"slug\": \"linear\",\n      \"auth_scope\": \"INDIVIDUAL\",\n      \"tool_names\": [\n        \"create_issue\",\n        \"list_issues\"\n      ]\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Request Example (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "Support Agent Tool Pack",
  "description": "Ticketing connectors for support agent",
  "connectors": [
    [
      "slug": "linear",
      "auth_scope": "INDIVIDUAL",
      "tool_names": ["create_issue", "list_issues"]
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://ah-api.merge.dev/api/v1/tool-packs/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```