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

# OpenClaw Tools Invoke

> Invoke a single tool on an OpenClaw instance via the Tools Invoke API. Returns the tool's result.



## OpenAPI

````yaml /api-reference/v1/v1.1.0_openapi.json post /action/openclaw_tools_invoke
openapi: 3.0.0
info:
  version: 1.1.0
  title: AI Actions - Get Data
  description: API specifications for 'Get Data' category AI actions.
  license:
    name: MIT
servers:
  - url: https://api-lr.agent.ai/v1
security:
  - bearerAuth: []
paths:
  /action/openclaw_tools_invoke:
    post:
      tags:
        - OpenClaw
      summary: OpenClaw Tools Invoke
      description: >-
        Invoke a single tool on an OpenClaw instance via the Tools Invoke API.
        Returns the tool's result.
      operationId: openclawToolsInvoke
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                instance_ip:
                  type: string
                  description: >-
                    IP address or hostname of the OpenClaw instance (e.g.,
                    167.71.242.214). Do not include https:// prefix.
                auth_token:
                  type: string
                  description: Bearer token for authenticating with the OpenClaw Gateway.
                tool:
                  type: string
                  description: >-
                    Name of the tool to invoke (e.g., sessions_list,
                    web_search). Must be allowed by the Gateway's tool policy.
                action:
                  type: string
                  description: >-
                    Optional action parameter. Mapped into args if the tool
                    schema supports an 'action' field (e.g., 'json', 'text').
                args_json:
                  type: string
                  x-ui: textarea
                  description: >-
                    Optional JSON object of tool-specific arguments. Example:
                    {"query": "OpenClaw docs", "limit": 5}
                session_key:
                  type: string
                  description: >-
                    Target session key. Defaults to 'main'. Controls which agent
                    session the tool runs in.
                  default: main
                dry_run:
                  type: boolean
                  description: Reserved for future use. Currently ignored by the API.
                  default: false
                message_channel:
                  type: string
                  description: >-
                    Optional channel hint for group policy resolution (e.g.,
                    'slack', 'telegram').
                account_id:
                  type: string
                  description: Optional account ID for multi-account setups.
                timeout:
                  type: string
                  description: 'Request timeout in seconds. Default: 60.'
                  default: '60'
                output_variable_name:
                  type: string
                  description: >-
                    Variable name for the result. Access tool output with
                    {{tool_result.result}}. Check {{tool_result.ok}} for
                    success.
                  default: tool_result
                  pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
              required:
                - instance_ip
                - auth_token
                - tool
                - output_variable_name
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '401':
          description: Unauthorized - invalid or missing bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActionResponse'
components:
  schemas:
    ActionResponse:
      type: object
      properties:
        status:
          type: integer
          format: int32
          description: HTTP status code of the action response
        response:
          type: object
          description: Response data from the action
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from your account
        ([https://agent.ai/user/integrations#api](https://agent.ai/user/integrations#api))

````