> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List tools



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/cerca/openapi.documented.yml get /agents/{agentId}/tools
openapi: 3.1.0
info:
  description: API-key accessible routes for Cerca agents.
  title: Cerca API
  version: 0.0.0
servers:
  - url: https://api.cerca.dev
security:
  - bearerAuth: []
paths:
  /agents/{agentId}/tools:
    get:
      tags:
        - Tools
      summary: List tools
      parameters:
        - schema:
            type: string
            minLength: 1
            example: agent_abc123
          required: true
          in: path
          name: agentId
      responses:
        '200':
          description: >-
            Unified list of runtime and external tools currently available to an
            agent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentToolsResponse'
        '400':
          description: Invalid runtime request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Access denied or non-transient quota exceeded. Limit errors include
            a stable code field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Runtime resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Transient capacity limit exceeded. Limit errors include a stable
            code field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Required runtime dependency unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: Runtime error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Cerca from '@cerca-dev/sdk';

            const client = new Cerca({
              apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.agents.listTools('agent_abc123');

            console.log(response.tools);
        - lang: Python
          source: |-
            import os
            from cerca import Cerca

            client = Cerca(
                api_key=os.environ.get("CERCA_API_KEY"),  # This is the default and can be omitted
            )
            response = client.agents.list_tools(
                "agent_abc123",
            )
            print(response.tools)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/matrices/cerca-go\"\n\t\"github.com/matrices/cerca-go/option\"\n)\n\nfunc main() {\n\tclient := cercago.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.Agents.ListTools(context.TODO(), \"agent_abc123\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Tools)\n}\n"
        - lang: Ruby
          source: |-
            require "cerca"

            cerca = Cerca::Client.new(api_key: "My API Key")

            response = cerca.agents.list_tools("agent_abc123")

            puts(response)
        - lang: CLI
          source: |-
            cerca agents list-tools \
              --api-key 'My API Key' \
              --agent-id agent_abc123
components:
  schemas:
    AgentToolsResponse:
      type: object
      properties:
        sourceWarnings:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeSourceWarning'
        tools:
          type: array
          items:
            $ref: '#/components/schemas/RuntimeAgentTool'
          description: >-
            Unified list of runtime and external tools currently available to
            the agent.
      required:
        - tools
      description: >-
        Response for GET /agents/{agentId}/tools. The tools field is an
        inspection list, not a configuration request field.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine-readable error code when the API can provide one.
          example: MONTHLY_TOKEN_BUDGET_EXCEEDED
      required:
        - error
    RuntimeSourceWarning:
      type: object
      properties:
        message:
          type: string
        source:
          type: string
        sourceId:
          type: string
      required:
        - message
        - source
    RuntimeAgentTool:
      oneOf:
        - $ref: '#/components/schemas/RuntimeToolDescriptor'
          title: RuntimeInternalTool
          x-stainless-variantName: RuntimeInternalTool
        - $ref: '#/components/schemas/RuntimeDiscoveredTool'
          title: RuntimeExternalTool
          x-stainless-variantName: RuntimeExternalTool
      description: >-
        A unified available tool entry. Runtime tools include requiresApproval;
        external tools include approval.
      discriminator:
        propertyName: category
    RuntimeToolDescriptor:
      type: object
      properties:
        approvalSource:
          type: string
          enum:
            - agent
            - env
            - catalog
        category:
          type: string
          enum:
            - builtIn
            - configurable
        description:
          type: string
        inputSchema:
          type: object
          description: JSON Schema object describing tool input parameters.
          example:
            type: object
          additionalProperties:
            x-stainless-any: true
        name:
          $ref: '#/components/schemas/RuntimeToolName'
        requiresApproval:
          type: boolean
      required:
        - approvalSource
        - category
        - description
        - inputSchema
        - name
        - requiresApproval
      description: >-
        A built-in or configurable runtime tool currently available to the
        agent.
    RuntimeDiscoveredTool:
      type: object
      properties:
        accountLabel:
          type: string
        approval:
          type: string
          enum:
            - always
            - never
        category:
          type: string
          enum:
            - external
          x-stainless-const: true
        connectionId:
          type: string
        connectionMetadata:
          $ref: '#/components/schemas/ToolConnectionMetadata'
        description:
          type: string
        inputSchema:
          type: object
          description: JSON Schema object describing tool input parameters.
          example:
            type: object
          additionalProperties:
            x-stainless-any: true
        name:
          type: string
        origin:
          type: string
          enum:
            - builtin
            - tool_source
        source:
          type: string
        sourceId:
          type: string
        sourceVersion:
          type: number
      required:
        - approval
        - category
        - description
        - inputSchema
        - name
        - origin
        - source
      description: >-
        An external provider or tool-source tool currently available to the
        agent.
    RuntimeToolName:
      type: string
      enum:
        - get_time
        - sub_thread
        - wait
        - tool.call
        - tool.discover
        - artifact.read
        - agent.threads.list
        - agent.threads.get
        - agent.approvals.cancel
        - agent.approvals.grant_thread
        - agent.approvals.grant_agent
        - agent.create
        - agent.approvals.update
        - tool.connect
        - sandbox.exec
        - sandbox.read
        - sandbox.write_file
        - sandbox.read_file
        - sandbox.spawn
        - sandbox.stdin
        - sandbox.session_read
        - sandbox.kill
        - sandbox.list_sessions
        - sandbox.sync_artifact
        - memory.read
        - memory.list
        - memory.search
        - memory.write
        - memory.delete
        - db.query
        - web.search
        - web.fetch
        - agent.schedule.list
        - agent.schedule.create
        - agent.schedule.update
        - agent.schedule.delete
        - agent.schedule.trigger
    ToolConnectionMetadata:
      type: object
      additionalProperties:
        type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: Cerca API key
      scheme: bearer
      type: http

````