Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Search tools Beta

POST/api/v1/tools:search

This endpoint is in beta. Its request and response may change.

Ranks the tools in your environment against a plain-language query, such as send an email, and returns the best matches from every connection. Pass identifier to see, for each result, whether that user can call it now: each entry in connections has a readiness_state of TOOL_READINESS_STATE_READY, TOOL_READINESS_STATE_NEEDS_CONNECTION (the account exists but isn't active) or TOOL_READINESS_STATE_NEEDS_REAUTH. Check it before you execute the tool. An empty connections list means the user has no account on any connection for that tool's provider; it isn't an error.

Authorization

Authorization: Bearer $TOKEN, an access token from the client credentials grant. See Authentication.

Body

querystringrequired
Natural-language query or keywords describing the job to be done. Ranked against tool names, descriptions, and providers. 1-256 characters.
identifierstring
Your app's ID for the user, the same value you used when the user connected. Use a stable internal ID, not an email address.
top_kinteger
Maximum number of ranked results to return. Defaults to 10, capped at 50.

Response 200

toolsarray of object
Tools matching the query, ordered by descending relevance score
Show 5 child attributes
connectionsarray of object
The connections for this tool's provider where the user has a connected account, each with its own readiness_state. Returned only when the request has identifier. Empty when the user has no account on any of them. More than one entry means the user has accounts on several connections, such as two Slack workspaces.
Show 3 child attributes
connected_account_idstring
The user's connected account on this connection, whatever its readiness. Pass it to Execute a tool only when readiness_state is TOOL_READINESS_STATE_READY.
connection_namestring
Name of this connection.
readiness_statestring (enum)
Whether this specific connection is usable right now for the supplied identifier, independent of every other connection listed for this provider.
TOOL_READINESS_STATE_READYTOOL_READINESS_STATE_NEEDS_CONNECTIONTOOL_READINESS_STATE_NEEDS_REAUTH
descriptionstring
Human-readable description of what the tool does
namestring
The tool's name, to pass as tool_name when you execute it.
providerstring
Provider the tool belongs to
scorenumber
Relevance score for this result. Higher is better; comparable only within a single response.

Errors

Every error has the same body: code, message and details. See Errors and rate limits.

400Invalid request - the query is empty or exceeds the maximum length
401Authentication required - missing or invalid access token

Used in