Skip to main content

ToolSets API

The ToolSets API provides endpoints for creating, managing, and deploying ToolSets — bundles of AI tools that can be exported as MCP servers, Copilot connectors, SDK bundles, or HTTP catalogs. ToolSets are the primary unit of organization and deployment in the Nexla MCP-as-a-Service platform.

ToolSet Endpoints

MethodPathDescription
POST/v1/toolsetsCreate a ToolSet
POST/v1/toolsets:from_nexsetsCreate ToolSet from Nexsets (auto-gen tools + export)
GET/v1/toolsetsList ToolSets
GET/v1/toolsets/{id}Get ToolSet details
PATCH/v1/toolsets/{id}Update ToolSet metadata
DELETE/v1/toolsets/{id}Delete ToolSet (soft delete)
POST/v1/toolsets/{id}/toolsAdd tools to ToolSet
DELETE/v1/toolsets/{id}/toolsRemove tools from ToolSet
GET/v1/toolsets/{id}/toolsList tools in ToolSet
POST/v1/toolsets/{id}:activateActivate ToolSet
POST/v1/toolsets/{id}:pausePause ToolSet
POST/v1/toolsets/{id}:cloneClone a ToolSet

Export Endpoints

MethodPathDescription
POST/v1/toolsets/{id}/exportsCreate an export (MCP server)
GET/v1/toolsets/{id}/exportsList exports
GET/v1/toolsets/{id}/exports/{export_id}Get export details
PATCH/v1/toolsets/{id}/exports/{export_id}Update export
DELETE/v1/toolsets/{id}/exports/{export_id}Delete export

Create a ToolSet

POST /v1/toolsets

Creates a new ToolSet with the specified tools and metadata. The ToolSet starts in an active status by default.

Create ToolSet: Request
curl -X POST https://api-genai.nexla.io/v1/toolsets \
-H "Authorization: Bearer $NEXLA_SERVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer Data Tools",
"description": "Tools for accessing customer data",
"tags": ["customer", "analytics"],
"tool_ids": [1, 2, 3],
"mcp_gateway_enabled": false
}'
Create ToolSet: Response (201)
{
"id": 42,
"name": "Customer Data Tools",
"description": "Tools for accessing customer data",
"status": "active",
"tags": ["customer", "analytics"],
"mcp_server_key": "sk_ts42_a1b2c3d4e5f6...",
"mcp_gateway_enabled": false,
"tools": [
{ "id": 1, "name": "get_customer_profile", "status": "active" },
{ "id": 2, "name": "search_customers", "status": "active" },
{ "id": 3, "name": "get_customer_orders", "status": "active" }
],
"created_at": "2025-06-15T10:30:00Z",
"updated_at": "2025-06-15T10:30:00Z"
}

Create ToolSet from Nexsets

POST /v1/toolsets:from_nexsets

This is the recommended approach for going from data to a working MCP server in a single API call. It auto-generates tools from the specified Nexsets, bundles them into a ToolSet, and optionally creates an MCP server export.

Create ToolSet from Nexsets: Request
curl -X POST https://api-genai.nexla.io/v1/toolsets:from_nexsets \
-H "Authorization: Bearer $NEXLA_SERVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sales Analytics",
"nexset_ids": [123, 456, 789],
"create_export": true
}'
Create ToolSet from Nexsets: Response (201)
{
"id": 43,
"name": "Sales Analytics",
"status": "active",
"mcp_server_key": "sk_ts43_x7y8z9...",
"tool_ids": [10, 11, 12],
"tools": [
{ "id": 10, "name": "query_sales_pipeline", "nexset_id": 123, "status": "active" },
{ "id": 11, "name": "get_deal_details", "nexset_id": 456, "status": "active" },
{ "id": 12, "name": "search_revenue_data", "nexset_id": 789, "status": "active" }
],
"export": {
"id": 1,
"export_type": "mcp_server",
"status": "active",
"mcp_url": "https://api-genai.nexla.io/mcp/service_key/sk_ts43_x7y8z9..."
},
"created_at": "2025-06-15T11:00:00Z",
"updated_at": "2025-06-15T11:00:00Z"
}
tip

This is the fastest way to go from data to a working MCP server. One API call creates tools, bundles them, and deploys an MCP server.

Add Tools to ToolSet

POST /v1/toolsets/{id}/tools

Adds one or more existing tools to a ToolSet.

Add Tools: Request
curl -X POST https://api-genai.nexla.io/v1/toolsets/42/tools \
-H "Authorization: Bearer $NEXLA_SERVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool_ids": [4, 5]
}'
Add Tools: Response (200)
{
"id": 42,
"name": "Customer Data Tools",
"tool_ids": [1, 2, 3, 4, 5],
"updated_at": "2025-06-15T12:00:00Z"
}

Remove Tools from ToolSet

DELETE /v1/toolsets/{id}/tools

Removes one or more tools from a ToolSet. The tools themselves are not deleted — they are only unlinked from the ToolSet.

Remove Tools: Request
curl -X DELETE https://api-genai.nexla.io/v1/toolsets/42/tools \
-H "Authorization: Bearer $NEXLA_SERVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool_ids": [3]
}'
Remove Tools: Response (200)
{
"id": 42,
"name": "Customer Data Tools",
"tool_ids": [1, 2, 4, 5],
"updated_at": "2025-06-15T12:15:00Z"
}

Clone a ToolSet

POST /v1/toolsets/{id}:clone

Creates a complete copy of a ToolSet, including a new server key, a new ID, and a new export. Cloning is useful for creating environment-specific variants (e.g., dev vs. prod) or for duplicating a working configuration as a starting point.

Clone ToolSet: Request
curl -X POST https://api-genai.nexla.io/v1/toolsets/42:clone \
-H "Authorization: Bearer $NEXLA_SERVICE_KEY" \
-H "Content-Type: application/json"
Clone ToolSet: Response (201)
{
"id": 55,
"name": "Customer Data Tools (clone)",
"status": "active",
"mcp_server_key": "sk_ts55_new_key...",
"tool_ids": [1, 2, 4, 5],
"export": {
"id": 5,
"export_type": "mcp_server",
"status": "active",
"mcp_url": "https://api-genai.nexla.io/mcp/service_key/sk_ts55_new_key..."
},
"created_at": "2025-06-15T13:00:00Z",
"updated_at": "2025-06-15T13:00:00Z"
}

Create an Export

POST /v1/toolsets/{id}/exports

Creates a new export for a ToolSet. An export defines how the ToolSet is served to external consumers — as an MCP server, a Copilot connector, an SDK bundle, or an HTTP catalog.

Create Export: Request
curl -X POST https://api-genai.nexla.io/v1/toolsets/42/exports \
-H "Authorization: Bearer $NEXLA_SERVICE_KEY" \
-H "Content-Type: application/json" \
-d '{
"export_type": "mcp_server",
"environment": "prod",
"public_name": "Production Customer Tools"
}'
Create Export: Response (201)
{
"id": 7,
"toolset_id": 42,
"export_type": "mcp_server",
"environment": "prod",
"public_name": "Production Customer Tools",
"server_key": "sk_exp7_prod_abc123...",
"endpoint_url": "https://api-genai.nexla.io/mcp/service_key/sk_exp7_prod_abc123...",
"status": "active",
"created_at": "2025-06-15T14:00:00Z",
"updated_at": "2025-06-15T14:00:00Z"
}

Export Types

TypeDescription
mcp_serverDeploys an MCP Streamable HTTP server
copilot_connectorCreates a connector for Microsoft Copilot
sdk_bundleGenerates an SDK-compatible tool bundle
http_catalogExposes tools via a standard HTTP catalog

Environments

EnvironmentDescription
devDevelopment — for testing and iteration
stageStaging — for pre-production validation
prodProduction — for live consumer traffic