Skip to main content
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);
{
  "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"
      }
    }
  ],
  "execution": {
    "timeoutMs": 10000,
    "maxAttempts": 3,
    "retryMode": "safe_only"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

fleetId
string
required
Minimum string length: 1
Example:

"fleet_abc123"

sourceId
string
required
Minimum string length: 1
Example:

"toolsrc_abc123"

Body

application/json
auth
NoToolSourceAuth · object
required

Tool source authentication configuration. The kind field selects one of none, api_key, oauth_exchange, or oauth_connection.

Example:
{ "kind": "none" }
namespace
string
required
Example:

"docs"

tools
object[]
required
type
enum<string>
required
Available options:
http
approval
enum<string>
Available options:
always,
never
enabled
boolean
execution
object

HTTP tool execution retry and timeout policy.

Example:
{
  "timeoutMs": 10000,
  "maxAttempts": 3,
  "retryMode": "safe_only"
}
{key}
any

Response

Tool source updated.

auth
NoToolSourceAuth · object
required

Tool source authentication configuration. The kind field selects one of none, api_key, oauth_exchange, or oauth_connection.

Example:
{ "kind": "none" }
createdAt
string
required
enabled
boolean
required
fleetId
string
required
id
string
required
namespace
string
required
updatedAt
string
required
version
number
required
tools
object[]
required
type
enum<string>
required
Available options:
http
approval
enum<string>
Available options:
always,
never
execution
object

HTTP tool execution retry and timeout policy.

Example:
{
  "timeoutMs": 10000,
  "maxAttempts": 3,
  "retryMode": "safe_only"
}