Skip to content
Get started

List objective tool calls

client.Objectives.ToolCalls.List(ctx, objectiveID, query) (*CursorPagination[ObjectiveToolCall], error)
GET/v1/objectives/{objectiveId}/tool_calls

Lists all tool calls for an objective

ParametersExpand Collapse
objectiveID string
query ObjectiveToolCallListParams
Cursor param.Field[string]optional

Pagination cursor from previous response

IncludeInfo param.Field[bool]optional

When set to true you may use more of your alloted API rate-limit

Limit param.Field[int64]optional

Maximum number of results to return

formatint32
Status param.Field[ObjectiveToolCallListParamsStatus]optional

Filter by tool call status

formatenum
const ObjectiveToolCallListParamsStatusToolCallStatusUnspecified ObjectiveToolCallListParamsStatus = "TOOL_CALL_STATUS_UNSPECIFIED"
const ObjectiveToolCallListParamsStatusToolCallStatusAutoApproved ObjectiveToolCallListParamsStatus = "TOOL_CALL_STATUS_AUTO_APPROVED"
const ObjectiveToolCallListParamsStatusToolCallStatusWaitingForApproval ObjectiveToolCallListParamsStatus = "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL"
const ObjectiveToolCallListParamsStatusToolCallStatusApproved ObjectiveToolCallListParamsStatus = "TOOL_CALL_STATUS_APPROVED"
const ObjectiveToolCallListParamsStatusToolCallStatusDenied ObjectiveToolCallListParamsStatus = "TOOL_CALL_STATUS_DENIED"
ReturnsExpand Collapse
type ObjectiveToolCall struct{…}

ObjectiveToolCall is a record of a tool call made during an objective's execution. Tool calls are mutable — their status changes as they are approved, denied, or executed.

Callable CallableTool

CallableTool is a union that represents a tool that can be called by an agent. In Cadenya, a tool that is used within an agent objective might be a user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context), or a Cadenya Tool (one Cadenya provides).

Agent ResourceMetadataoptional

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

ID string

Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

CreatedAt Time

Timestamp when this resource was created

formatdate-time
Name string

Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly

ProfileID string

ID of the actor (user or service account) that created this resource

WorkspaceID string

Workspace this resource belongs to for organizational grouping (prefixed ULID)

ExternalID stringoptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}

CadenyaProvidedTool ResourceMetadataoptional

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

ID string

Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

CreatedAt Time

Timestamp when this resource was created

formatdate-time
Name string

Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly

ProfileID string

ID of the actor (user or service account) that created this resource

WorkspaceID string

Workspace this resource belongs to for organizational grouping (prefixed ULID)

ExternalID stringoptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}

Tool ResourceMetadataoptional

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

ID string

Unique identifier for the resource (prefixed ULID, e.g., "agent_01HXK...")

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

CreatedAt Time

Timestamp when this resource was created

formatdate-time
Name string

Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly

ProfileID string

ID of the actor (user or service account) that created this resource

WorkspaceID string

Workspace this resource belongs to for organizational grouping (prefixed ULID)

ExternalID stringoptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}

Arguments map[string, unknown]optional

The arguments passed to the tool

Memo stringoptional

A memo supplied by the reviewer when denying the tool call

Result stringoptional

The result content returned by the tool after execution

StatusChangedBy Profileoptional

Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).

AccountResourceMetadata is used to represent a resource that is associated to an account but not to a workspace.

ID string

Unique identifier for the resource (prefixed ULID, e.g., "apikey_01HXK...")

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

Name string

Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly

ProfileID string
ExternalID stringoptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}

ProfileSpec contains the profile-specific fields

Type ProfileSpecType

Type is the type of profile. User's are humans, API keys are computers. You know the deal.

formatenum
One of the following:
const ProfileSpecTypeProfileTypeUser ProfileSpecType = "PROFILE_TYPE_USER"
const ProfileSpecTypeProfileTypeAPIKey ProfileSpecType = "PROFILE_TYPE_API_KEY"
const ProfileSpecTypeProfileTypeSystem ProfileSpecType = "PROFILE_TYPE_SYSTEM"
Email stringoptional

Email address of the user (required, unique per account)

Name stringoptional

Display name for the user (e.g., "Bobby Tables")

Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)

ID string

Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...")

AccountID string

Account this operation belongs to for multi-tenant isolation (prefixed ULID)

CreatedAt Time

Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying

formatdate-time
ProfileID string

ID of the actor (user or service account) that created this operation

WorkspaceID string

Workspace this operation belongs to for organizational grouping (prefixed ULID)

ExternalID stringoptional

External ID for the operation (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}

Status ObjectiveToolCallStatus

Current status of the tool call

formatenum
One of the following:
const ObjectiveToolCallStatusToolCallStatusUnspecified ObjectiveToolCallStatus = "TOOL_CALL_STATUS_UNSPECIFIED"
const ObjectiveToolCallStatusToolCallStatusAutoApproved ObjectiveToolCallStatus = "TOOL_CALL_STATUS_AUTO_APPROVED"
const ObjectiveToolCallStatusToolCallStatusWaitingForApproval ObjectiveToolCallStatus = "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL"
const ObjectiveToolCallStatusToolCallStatusApproved ObjectiveToolCallStatus = "TOOL_CALL_STATUS_APPROVED"
const ObjectiveToolCallStatusToolCallStatusDenied ObjectiveToolCallStatus = "TOOL_CALL_STATUS_DENIED"
ExecutionStatus ObjectiveToolCallExecutionStatusoptional
formatenum
One of the following:
const ObjectiveToolCallExecutionStatusToolCallExecutionStatusUnspecified ObjectiveToolCallExecutionStatus = "TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED"
const ObjectiveToolCallExecutionStatusToolCallExecutionStatusPending ObjectiveToolCallExecutionStatus = "TOOL_CALL_EXECUTION_STATUS_PENDING"
const ObjectiveToolCallExecutionStatusToolCallExecutionStatusRunning ObjectiveToolCallExecutionStatus = "TOOL_CALL_EXECUTION_STATUS_RUNNING"
const ObjectiveToolCallExecutionStatusToolCallExecutionStatusCompleted ObjectiveToolCallExecutionStatus = "TOOL_CALL_EXECUTION_STATUS_COMPLETED"
const ObjectiveToolCallExecutionStatusToolCallExecutionStatusErrored ObjectiveToolCallExecutionStatus = "TOOL_CALL_EXECUTION_STATUS_ERRORED"
CreatedBy Profileoptional

Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).

AccountResourceMetadata is used to represent a resource that is associated to an account but not to a workspace.

ID string

Unique identifier for the resource (prefixed ULID, e.g., "apikey_01HXK...")

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

Name string

Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") Required for resources that users interact with directly

ProfileID string
ExternalID stringoptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"}

ProfileSpec contains the profile-specific fields

Type ProfileSpecType

Type is the type of profile. User's are humans, API keys are computers. You know the deal.

formatenum
One of the following:
const ProfileSpecTypeProfileTypeUser ProfileSpecType = "PROFILE_TYPE_USER"
const ProfileSpecTypeProfileTypeAPIKey ProfileSpecType = "PROFILE_TYPE_API_KEY"
const ProfileSpecTypeProfileTypeSystem ProfileSpecType = "PROFILE_TYPE_SYSTEM"
Email stringoptional

Email address of the user (required, unique per account)

Name stringoptional

Display name for the user (e.g., "Bobby Tables")

Objective OperationMetadataoptional

Metadata for ephemeral operations and activities (e.g., objectives, executions, runs)

ID string

Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...")

AccountID string

Account this operation belongs to for multi-tenant isolation (prefixed ULID)

CreatedAt Time

Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying

formatdate-time
ProfileID string

ID of the actor (user or service account) that created this operation

WorkspaceID string

Workspace this operation belongs to for organizational grouping (prefixed ULID)

ExternalID stringoptional

External ID for the operation (e.g., a workflow ID from an external system)

Labels map[string, string]optional

Arbitrary key-value pairs for categorization and filtering Examples: {"priority": "high", "source": "api", "workflow": "onboarding"}

List objective tool calls

package main

import (
  "context"
  "fmt"

  "github.com/cadenya/cadenya-go"
  "github.com/cadenya/cadenya-go/option"
)

func main() {
  client := cadenya.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Objectives.ToolCalls.List(
    context.TODO(),
    "objectiveId",
    cadenya.ObjectiveToolCallListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "items": [
    {
      "data": {
        "callable": {
          "agent": {
            "id": "id",
            "accountId": "accountId",
            "createdAt": "2019-12-27T18:11:19.117Z",
            "name": "name",
            "profileId": "profileId",
            "workspaceId": "workspaceId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "cadenyaProvidedTool": {
            "id": "id",
            "accountId": "accountId",
            "createdAt": "2019-12-27T18:11:19.117Z",
            "name": "name",
            "profileId": "profileId",
            "workspaceId": "workspaceId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "tool": {
            "id": "id",
            "accountId": "accountId",
            "createdAt": "2019-12-27T18:11:19.117Z",
            "name": "name",
            "profileId": "profileId",
            "workspaceId": "workspaceId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          }
        },
        "arguments": {
          "foo": "bar"
        },
        "memo": "memo",
        "result": "result",
        "statusChangedBy": {
          "metadata": {
            "id": "id",
            "accountId": "accountId",
            "name": "name",
            "profileId": "profileId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "spec": {
            "type": "PROFILE_TYPE_USER",
            "email": "email",
            "name": "name"
          }
        }
      },
      "metadata": {
        "id": "id",
        "accountId": "accountId",
        "createdAt": "2019-12-27T18:11:19.117Z",
        "profileId": "profileId",
        "workspaceId": "workspaceId",
        "externalId": "externalId",
        "labels": {
          "foo": "string"
        }
      },
      "status": "TOOL_CALL_STATUS_UNSPECIFIED",
      "executionStatus": "TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED",
      "info": {
        "createdBy": {
          "metadata": {
            "id": "id",
            "accountId": "accountId",
            "name": "name",
            "profileId": "profileId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "spec": {
            "type": "PROFILE_TYPE_USER",
            "email": "email",
            "name": "name"
          }
        },
        "objective": {
          "id": "id",
          "accountId": "accountId",
          "createdAt": "2019-12-27T18:11:19.117Z",
          "profileId": "profileId",
          "workspaceId": "workspaceId",
          "externalId": "externalId",
          "labels": {
            "foo": "string"
          }
        }
      }
    }
  ],
  "pagination": {
    "nextCursor": "nextCursor",
    "total": 0
  }
}
Returns Examples
{
  "items": [
    {
      "data": {
        "callable": {
          "agent": {
            "id": "id",
            "accountId": "accountId",
            "createdAt": "2019-12-27T18:11:19.117Z",
            "name": "name",
            "profileId": "profileId",
            "workspaceId": "workspaceId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "cadenyaProvidedTool": {
            "id": "id",
            "accountId": "accountId",
            "createdAt": "2019-12-27T18:11:19.117Z",
            "name": "name",
            "profileId": "profileId",
            "workspaceId": "workspaceId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "tool": {
            "id": "id",
            "accountId": "accountId",
            "createdAt": "2019-12-27T18:11:19.117Z",
            "name": "name",
            "profileId": "profileId",
            "workspaceId": "workspaceId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          }
        },
        "arguments": {
          "foo": "bar"
        },
        "memo": "memo",
        "result": "result",
        "statusChangedBy": {
          "metadata": {
            "id": "id",
            "accountId": "accountId",
            "name": "name",
            "profileId": "profileId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "spec": {
            "type": "PROFILE_TYPE_USER",
            "email": "email",
            "name": "name"
          }
        }
      },
      "metadata": {
        "id": "id",
        "accountId": "accountId",
        "createdAt": "2019-12-27T18:11:19.117Z",
        "profileId": "profileId",
        "workspaceId": "workspaceId",
        "externalId": "externalId",
        "labels": {
          "foo": "string"
        }
      },
      "status": "TOOL_CALL_STATUS_UNSPECIFIED",
      "executionStatus": "TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED",
      "info": {
        "createdBy": {
          "metadata": {
            "id": "id",
            "accountId": "accountId",
            "name": "name",
            "profileId": "profileId",
            "externalId": "externalId",
            "labels": {
              "foo": "string"
            }
          },
          "spec": {
            "type": "PROFILE_TYPE_USER",
            "email": "email",
            "name": "name"
          }
        },
        "objective": {
          "id": "id",
          "accountId": "accountId",
          "createdAt": "2019-12-27T18:11:19.117Z",
          "profileId": "profileId",
          "workspaceId": "workspaceId",
          "externalId": "externalId",
          "labels": {
            "foo": "string"
          }
        }
      }
    }
  ],
  "pagination": {
    "nextCursor": "nextCursor",
    "total": 0
  }
}