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

# Agent tool list kql tables



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/workspaces/{workspaceId}/agent/tools/kql/tables
openapi: 3.1.1
info:
  title: ContraForce API
  description: ContraForce platform API for security operations management.
  version: '2.0'
servers: []
security: []
tags:
  - name: Incidents
  - name: Gamebooks
  - name: Data sources
  - name: Service tickets
  - name: Investigation
  - name: agent-tools
  - name: Cross-workspace incidents
  - name: Cross-workspace gamebooks
  - name: Cross-workspace data sources
  - name: Webhooks
  - name: Service accounts
  - name: Users
  - name: Azure resources
paths:
  /api/v2/workspaces/{workspaceId}/agent/tools/kql/tables:
    get:
      tags:
        - agent-tools
      summary: Agent tool list kql tables
      operationId: v2-agent-tool-list-kql-tables
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponseOfAgentToolKqlTablesResult'
        '400':
          description: Bad request — validation or parameter binding failed.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '401':
          description: Unauthorized — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '403':
          description: Forbidden — insufficient scope or workspace access.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '404':
          description: Not found — workspace or resource is missing.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ApiProblemDetails'
components:
  schemas:
    ApiResponseOfAgentToolKqlTablesResult:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AgentToolKqlTablesResult'
        meta:
          $ref: '#/components/schemas/ResponseMeta'
      description: Standard v2 API response envelope for single-item responses.
    ApiProblemDetails:
      type: object
      properties:
        type:
          type:
            - 'null'
            - string
        title:
          type:
            - 'null'
            - string
        status:
          pattern: ^-?(?:0|[1-9]\d*)$
          type:
            - 'null'
            - integer
            - string
          format: int32
        detail:
          type:
            - 'null'
            - string
        instance:
          type:
            - 'null'
            - string
        code:
          type:
            - 'null'
            - string
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string
        target:
          type:
            - 'null'
            - string
        errors:
          type:
            - 'null'
            - object
          additionalProperties:
            type: array
            items:
              type: string
      description: >-
        API extension of ProblemDetails that surfaces the stable error code,

        trace identifier, timestamp, optional target, and optional field-keyed
        validation

        error map alongside the RFC 7807 members.
    AgentToolKqlTablesResult:
      type: object
      properties:
        success:
          type: boolean
          description: >-
            True when the schema fetch succeeded. False on XDR-only onboarded
            workspaces (Log Analytics not available) or upstream failures —
            reason in `summary`.
        summary:
          type:
            - 'null'
            - string
          description: >-
            Compact human-readable digest: 'Workspace exposes N table(s). Call
            get-table-columns with the names you intend to query.' or a one-line
            failure reason.
        tables:
          type:
            - 'null'
            - array
          items:
            type: string
          description: >-
            Table names available in the workspace, sorted alphabetically. Use
            verbatim in subsequent get-kql-table-columns and execute-kql calls.
      description: >-
        Result of the agent's list-KQL-tables tool. Returns table names only —
        column data

        is intentionally excluded so the agent can broaden discovery cheaply and
        then call

        the get-table-columns tool with a narrowed set of names.
    ResponseMeta:
      type: object
      properties:
        requestId:
          type:
            - 'null'
            - string
        timestamp:
          type:
            - 'null'
            - string

````