---
title: "Search custom tools"
method: POST
path: "/api/custom-tools/search"
tags: ["custom_tools"]
---

# Search custom tools

`POST /api/custom-tools/search`

## Request

- Base URL: `https://beta.getsales.io/integrations/v1`
- URL: `https://beta.getsales.io/integrations/v1/api/custom-tools/search`
- Auth: HTTP bearer and API key in header `Team-SID`

The team's own HTTP tools (in_tl_): the definitions a playtables column, a workflow node or an agent calls as in:tool.{sid}. sid.eq is the point lookup (there is no get), status for the switched-off ones, provider_connection_sid for the tools on one credential; include provider_connection. page_size 0 returns the counts only. Call history and spend are on search_provider_calls (tool_type custom_tool).

Contract:
- MCP tool `search_custom_tools`, registry package `mcp.integrations/custom_tools`, mount `integrations.providers`.
- Operation `search`, response envelope `search`.
- Flags: read only.

## Request body

- SearchCustomToolsRequest: Request body of `search_custom_tools`.
  - `filter` object: Field filters, ANDed: {field: {eq | ne | in | nin | gte | lte | gt | lt | is_null}}; q inside it is free text. Omit for every row.
    - `sid` object: Tool sid(s): the point lookup.
      - `eq` string
      - `in` string[]
    - `status` object: on | off.
      - `eq` 'on' | 'off'
      - `in` string[]
    - `provider_connection_sid` object: The tools on one connection; is_null true = public-API tools.
      - `eq` string
      - `in` string[]
      - `is_null` boolean
    - `q` string: Infix match over the name.
    - `created_at` object: ISO 8601 bounds.
      - `gte` string
      - `lte` string
      - `gt` string
      - `lt` string
    - `deleted_at` object: Default scope is { is_null: true }.
      - `gte` string
      - `lte` string
      - `is_null` boolean
    - `deleted` boolean: true = include soft-deleted rows.
  - `include` string[]: Relations to attach to every item; omit for the bare rows.
  - `sort` object: One column and its direction; omit for the default order.
    - `field` 'created_at' | 'updated_at' | 'name', required: The column to order by.
    - `direction` 'asc' | 'desc': asc or desc; default desc.
  - `page_size` integer: 0..500, default 50; 0 = counts only, 1 = the first row.
  - `cursor` string, nullable: pagination.next_cursor of the previous page.

## Response `200`

`search` success envelope.

- SearchCustomToolsResponse
  - `success` true, required
  - `operation` 'search', required
  - `items` object[], required
    - `item` object, required
      - `sid` string, required: Custom tool sid (in_tl_...).
      - `team_sid` string, required: The owning workspace (ts_tm_...).
      - `name` string, required: Unique within the team among live rows; what the tool pickers show.
      - `description` string, nullable, required: Free text, up to 2000 chars.
      - `provider_connection_sid` string, nullable, required: The connection the tool authenticates with (in_cn_...); null = no auth.
      - `request` object, required: The request template.
        - `method` 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', required: The HTTP method.
        - `url` string, required: https URL; scheme and host literal (no placeholders, default port, public DNS), placeholders in the path and query only.
        - `headers` object: Up to 20 headers; values may hold placeholders. Auth-shaped names (authorization, cookie, token, key...) and Content-Type are refused: auth comes from the connection.
        - `body` object, nullable: A JSON template; null on GET and DELETE. String leaves may hold placeholders; a leaf that IS {{key}} renders with the input's native type.
      - `input_schema` object[], required: The declared inputs (up to 30).
        - `key` string, required: The placeholder name.
        - `type` string, required: string | number | boolean.
        - `required` boolean, required: Whether a call must bind it.
      - `output_mapping` object, required: name to dot-path into the response body (up to 20); {} = the raw body only.
      - `status` 'on' | 'off', required: off = the executor refuses it with a failed row (custom_tool_disabled).
      - `created_by` object, required: Who defined the tool.
        - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
        - `actor_sid` string, nullable, required
        - `team_sid` string, required
        - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
        - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
        - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
        - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
        - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
        - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
      - `deleted_by` object, nullable, required: Who deleted it; null while live.
        - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
        - `actor_sid` string, nullable, required
        - `team_sid` string, required
        - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
        - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
        - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
        - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
        - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
        - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
      - `created_at` string, required: ISO 8601 UTC.
      - `updated_at` string, required: ISO 8601 UTC.
      - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live.
    - `included` object, required
      - `provider_connection` object, nullable: The connection the tool authenticates with (ProviderConnectionDomain); null when none.
  - `pagination` object, required
    - `next_cursor` string, nullable, required
    - `has_more` boolean, required
    - `total_count` integer, nullable, required
  - `applied_filters` object, required
  - `includes` string[], required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.
  - `counts` object
    - `total_count` number, required: Tools matching the filter.
    - `groups` object, required: status: the count per status.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-integrations.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-integrations/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-integrations/revisions/2e7105d58335?raw)
