Search tools Beta
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
querystringrequiredidentifierstringtop_kintegerscalekit_client.tools.search_tools
Ranks the tools a user can call by how well they match a plain-language query. Each result's score is a relevance score where higher is better; it is only comparable within the results of a single response, not across separate calls. connections on each result is populated only when identifier is set: an empty list means the identifier has no connection at all for that tool's provider (not an error, and different from NEEDS_CONNECTION, which means a connected account row exists but is inactive); more than one entry means the identifier has accounts on multiple connections for that provider (for example, two Slack workspaces) -- inspect each entry's own readiness_state rather than assuming one answer for the whole tool.
scalekit_client.tools.search_tools( query: str, identifier: Optional[str] = None, top_k: Optional[int] = None,) -> Tuple[SearchToolsResponse, grpc.Call]Parameters
querystrrequiredidentifierOptional[str]top_kOptional[int]Returns Tuple[SearchToolsResponse, grpc.Call]: The response and the gRPC call. Unpack it as results, _ = ....
From scalekit-sdk-python 2.19.1.
scalekit.tools.searchTools
Searches tools ranked by relevance to a natural-language query — the job to be done, not an exact tool name. Each result's score is a relevance score where higher is better; it is only comparable within the results of a single response, not across separate calls. Pass identifier to also get per-connection readiness (usable now, needs a new connection, or needs re-auth) on each result's connections. connections is populated only when identifier is set: an empty array means the identifier has no connection at all for that tool's provider (not an error, and different from NEEDS_CONNECTION, which means a connected-account row exists but is inactive); more than one entry means the identifier has accounts on multiple connections for that provider (for example, two Slack workspaces) — inspect each entry's own readinessState rather than assuming one answer for the whole tool.
scalekit.tools.searchTools( query: string, options?: { identifier?: string; topK?: number; },): Promise<SearchToolsResponse>Parameters
querystringrequiredidentifierstringtopKnumberReturns Promise<SearchToolsResponse>.
From @scalekit-sdk/node 2.18.0.
Response 200
toolsarray of objectShow 5 child attributes
connectionsarray of objectreadiness_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_idstringreadiness_state is TOOL_READINESS_STATE_READY.connection_namestringreadiness_statestring (enum)TOOL_READINESS_STATE_READYTOOL_READINESS_STATE_NEEDS_CONNECTIONTOOL_READINESS_STATE_NEEDS_REAUTHdescriptionstringnamestringtool_name when you execute it.providerstringscorenumberErrors
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 length401Authentication required - missing or invalid access token