API

OrganizationTool

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/spark/organizations/{organization_id}/tools create Provider tool result

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

created, err := client.OrganizationTool(nil).Create(map[string]any{"organization_id": "example", "arguments": map[string]any{}, "native_agent_id": "example", "tool": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local created, err = client:OrganizationTool():create({ organization_id = "example", arguments = {}, native_agent_id = "example", tool = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$created = $client->OrganizationTool()->create(["organization_id" => "example", "arguments" => [], "native_agent_id" => "example", "tool" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

created = client.OrganizationTool().create({ "organization_id": "example", "arguments": {}, "native_agent_id": "example", "tool": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

created = client.OrganizationTool.create({ "organization_id" => "example", "arguments" => {}, "native_agent_id" => "example", "tool" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const created = await client.OrganizationTool().create({ organization_id: "example", arguments: {}, native_agent_id: "example", tool: "example" })

Fields

Field Type Required Description
arguments object Yes Arguments
native_agent_id string Yes Native Agent Id
tool string Yes Tool

create

POST /api/v1/spark/organizations/{organization_id}/tools

Operation ID: post_api_v1_spark_organizations_organization_id_tools.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes

Request body

application/json

Property Type Required Description
arguments object Yes
native_agent_id string Yes
tool string Yes

Responses

200: Provider tool result

application/json

The response is object.

401: Invalid worker credential
403: Connection is not enabled for this agent
404: Tenant, agent or feature unavailable
422: Invalid tool call
502: Bad gateway
503: Provider unavailable