JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const toolSource = await client.tools.update('fleet_abc123', 'toolsrc_abc123', {
auth: { kind: 'none' },
namespace: 'docs',
tools: [
{
description: 'Search documents',
endpoint: { method: 'GET', url: 'https://docs.example.com/search' },
inputSchema: { type: 'bar' },
name: 'search',
},
],
type: 'http',
});
console.log(toolSource);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
tool_source = client.tools.update(
fleet_id="fleet_abc123",
source_id="toolsrc_abc123",
auth={
"kind": "none"
},
namespace="docs",
tools=[{
"description": "Search documents",
"endpoint": {
"method": "GET",
"url": "https://docs.example.com/search",
},
"input_schema": {
"type": "bar"
},
"name": "search",
}],
type="http",
)
print(tool_source)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
toolSource, err := client.Tools.Update(
context.TODO(),
"fleet_abc123",
"toolsrc_abc123",
cercago.ToolUpdateParams{
Body: cercago.ToolUpdateParamsBodyUpdateHTTPToolSourceRequest{
Auth: cercago.F[cercago.ToolSourceAuthUnionParam](cercago.NoToolSourceAuthParam{
Kind: cercago.F(cercago.NoToolSourceAuthKindNone),
}),
Namespace: cercago.F("docs"),
Tools: cercago.F([]cercago.HTTPToolDefinitionParam{{
Description: cercago.F("Search documents"),
Endpoint: cercago.F(cercago.HTTPEndpointParam{
Method: cercago.F(cercago.HTTPEndpointMethodGet),
URL: cercago.F("https://docs.example.com/search"),
}),
InputSchema: cercago.F(map[string]interface{}{
"type": "bar",
}),
Name: cercago.F("search"),
}}),
Type: cercago.F(cercago.ToolUpdateParamsBodyUpdateHTTPToolSourceRequestTypeHTTP),
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", toolSource)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
tool_source = cerca.tools.update(
"fleet_abc123",
"toolsrc_abc123",
body: {
auth: {kind: :none},
namespace: "docs",
tools: [
{
description: "Search documents",
endpoint: {method: :GET, url: "https://docs.example.com/search"},
inputSchema: {type: "bar"},
name: "search"
}
],
type: :http
}
)
puts(tool_source)cerca tools update \
--api-key 'My API Key' \
--fleet-id fleet_abc123 \
--source-id toolsrc_abc123 \
--auth '{kind: none}' \
--namespace docs \
--tool '{description: Search documents, endpoint: {method: GET, url: https://docs.example.com/search}, inputSchema: {type: bar}, name: search}' \
--type http \
--url https://mcp.example.comcurl --request PUT \
--url https://api.cerca.dev/fleets/{fleetId}/tools/{sourceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth": {
"kind": "none"
},
"namespace": "docs",
"tools": [
{
"name": "search",
"description": "Search documents",
"inputSchema": {
"type": "object"
},
"endpoint": {
"method": "GET",
"url": "https://docs.example.com/search"
}
}
],
"type": "http",
"enabled": true,
"execution": {
"timeoutMs": 10000,
"maxAttempts": 3,
"retryMode": "safe_only"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/fleets/{fleetId}/tools/{sourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'auth' => [
'kind' => 'none'
],
'namespace' => 'docs',
'tools' => [
[
'name' => 'search',
'description' => 'Search documents',
'inputSchema' => [
'type' => 'object'
],
'endpoint' => [
'method' => 'GET',
'url' => 'https://docs.example.com/search'
]
]
],
'type' => 'http',
'enabled' => true,
'execution' => [
'timeoutMs' => 10000,
'maxAttempts' => 3,
'retryMode' => 'safe_only'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.cerca.dev/fleets/{fleetId}/tools/{sourceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auth\": {\n \"kind\": \"none\"\n },\n \"namespace\": \"docs\",\n \"tools\": [\n {\n \"name\": \"search\",\n \"description\": \"Search documents\",\n \"inputSchema\": {\n \"type\": \"object\"\n },\n \"endpoint\": {\n \"method\": \"GET\",\n \"url\": \"https://docs.example.com/search\"\n }\n }\n ],\n \"type\": \"http\",\n \"enabled\": true,\n \"execution\": {\n \"timeoutMs\": 10000,\n \"maxAttempts\": 3,\n \"retryMode\": \"safe_only\"\n }\n}")
.asString();{
"auth": {
"kind": "none"
},
"createdAt": "<string>",
"enabled": true,
"fleetId": "<string>",
"id": "<string>",
"namespace": "<string>",
"updatedAt": "<string>",
"version": 123,
"tools": [
{
"name": "search",
"description": "Search documents",
"inputSchema": {
"type": "object"
},
"endpoint": {
"method": "GET",
"url": "https://docs.example.com/search"
}
}
],
"type": "http",
"execution": {
"timeoutMs": 10000,
"maxAttempts": 3,
"retryMode": "safe_only"
}
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Tools
Update tool source
PUT
/
fleets
/
{fleetId}
/
tools
/
{sourceId}
JavaScript
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const toolSource = await client.tools.update('fleet_abc123', 'toolsrc_abc123', {
auth: { kind: 'none' },
namespace: 'docs',
tools: [
{
description: 'Search documents',
endpoint: { method: 'GET', url: 'https://docs.example.com/search' },
inputSchema: { type: 'bar' },
name: 'search',
},
],
type: 'http',
});
console.log(toolSource);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
tool_source = client.tools.update(
fleet_id="fleet_abc123",
source_id="toolsrc_abc123",
auth={
"kind": "none"
},
namespace="docs",
tools=[{
"description": "Search documents",
"endpoint": {
"method": "GET",
"url": "https://docs.example.com/search",
},
"input_schema": {
"type": "bar"
},
"name": "search",
}],
type="http",
)
print(tool_source)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
toolSource, err := client.Tools.Update(
context.TODO(),
"fleet_abc123",
"toolsrc_abc123",
cercago.ToolUpdateParams{
Body: cercago.ToolUpdateParamsBodyUpdateHTTPToolSourceRequest{
Auth: cercago.F[cercago.ToolSourceAuthUnionParam](cercago.NoToolSourceAuthParam{
Kind: cercago.F(cercago.NoToolSourceAuthKindNone),
}),
Namespace: cercago.F("docs"),
Tools: cercago.F([]cercago.HTTPToolDefinitionParam{{
Description: cercago.F("Search documents"),
Endpoint: cercago.F(cercago.HTTPEndpointParam{
Method: cercago.F(cercago.HTTPEndpointMethodGet),
URL: cercago.F("https://docs.example.com/search"),
}),
InputSchema: cercago.F(map[string]interface{}{
"type": "bar",
}),
Name: cercago.F("search"),
}}),
Type: cercago.F(cercago.ToolUpdateParamsBodyUpdateHTTPToolSourceRequestTypeHTTP),
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", toolSource)
}require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
tool_source = cerca.tools.update(
"fleet_abc123",
"toolsrc_abc123",
body: {
auth: {kind: :none},
namespace: "docs",
tools: [
{
description: "Search documents",
endpoint: {method: :GET, url: "https://docs.example.com/search"},
inputSchema: {type: "bar"},
name: "search"
}
],
type: :http
}
)
puts(tool_source)cerca tools update \
--api-key 'My API Key' \
--fleet-id fleet_abc123 \
--source-id toolsrc_abc123 \
--auth '{kind: none}' \
--namespace docs \
--tool '{description: Search documents, endpoint: {method: GET, url: https://docs.example.com/search}, inputSchema: {type: bar}, name: search}' \
--type http \
--url https://mcp.example.comcurl --request PUT \
--url https://api.cerca.dev/fleets/{fleetId}/tools/{sourceId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth": {
"kind": "none"
},
"namespace": "docs",
"tools": [
{
"name": "search",
"description": "Search documents",
"inputSchema": {
"type": "object"
},
"endpoint": {
"method": "GET",
"url": "https://docs.example.com/search"
}
}
],
"type": "http",
"enabled": true,
"execution": {
"timeoutMs": 10000,
"maxAttempts": 3,
"retryMode": "safe_only"
}
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/fleets/{fleetId}/tools/{sourceId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'auth' => [
'kind' => 'none'
],
'namespace' => 'docs',
'tools' => [
[
'name' => 'search',
'description' => 'Search documents',
'inputSchema' => [
'type' => 'object'
],
'endpoint' => [
'method' => 'GET',
'url' => 'https://docs.example.com/search'
]
]
],
'type' => 'http',
'enabled' => true,
'execution' => [
'timeoutMs' => 10000,
'maxAttempts' => 3,
'retryMode' => 'safe_only'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://api.cerca.dev/fleets/{fleetId}/tools/{sourceId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auth\": {\n \"kind\": \"none\"\n },\n \"namespace\": \"docs\",\n \"tools\": [\n {\n \"name\": \"search\",\n \"description\": \"Search documents\",\n \"inputSchema\": {\n \"type\": \"object\"\n },\n \"endpoint\": {\n \"method\": \"GET\",\n \"url\": \"https://docs.example.com/search\"\n }\n }\n ],\n \"type\": \"http\",\n \"enabled\": true,\n \"execution\": {\n \"timeoutMs\": 10000,\n \"maxAttempts\": 3,\n \"retryMode\": \"safe_only\"\n }\n}")
.asString();{
"auth": {
"kind": "none"
},
"createdAt": "<string>",
"enabled": true,
"fleetId": "<string>",
"id": "<string>",
"namespace": "<string>",
"updatedAt": "<string>",
"version": 123,
"tools": [
{
"name": "search",
"description": "Search documents",
"inputSchema": {
"type": "object"
},
"endpoint": {
"method": "GET",
"url": "https://docs.example.com/search"
}
}
],
"type": "http",
"execution": {
"timeoutMs": 10000,
"maxAttempts": 3,
"retryMode": "safe_only"
}
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Example:
"fleet_abc123"
Minimum string length:
1Example:
"toolsrc_abc123"
Body
application/json
- UpdateHttpToolSourceRequest
- UpdateMcpToolSourceRequest
Tool source authentication configuration. The kind field selects one of none, api_key, oauth_exchange, or oauth_connection.
- NoToolSourceAuth
- ApiKeyToolSourceAuth
- OAuthExchangeToolSourceAuth
- OAuthConnectionToolSourceAuth
Show child attributes
Show child attributes
Example:
{ "kind": "none" }
Example:
"docs"
Show child attributes
Show child attributes
Available options:
http Available options:
always, never HTTP tool execution retry and timeout policy.
Show child attributes
Show child attributes
Example:
{
"timeoutMs": 10000,
"maxAttempts": 3,
"retryMode": "safe_only"
}
Response
Tool source updated.
- Option 1
- Option 2
Tool source authentication configuration. The kind field selects one of none, api_key, oauth_exchange, or oauth_connection.
- NoToolSourceAuth
- ApiKeyToolSourceAuth
- OAuthExchangeToolSourceAuth
- OAuthConnectionToolSourceAuth
Show child attributes
Show child attributes
Example:
{ "kind": "none" }
Show child attributes
Show child attributes
Available options:
http Available options:
always, never HTTP tool execution retry and timeout policy.
Show child attributes
Show child attributes
Example:
{
"timeoutMs": 10000,
"maxAttempts": 3,
"retryMode": "safe_only"
}
⌘I