# Generate tool inputs from natural language

**Documentation:** /reference/api-reference/tools/postToolsExecuteByToolSlugInput

Uses AI to translate a natural language description into structured arguments for a specific tool. This endpoint is useful when you want to let users describe what they want to do in plain language instead of providing structured parameters.

---

## POST `/api/v3/tools/execute/{tool_slug}/input`

**Endpoint:** `https://backend.composio.dev/api/v3/tools/execute/{tool_slug}/input`

**Summary:** Generate tool inputs from natural language

Uses AI to translate a natural language description into structured arguments for a specific tool. This endpoint is useful when you want to let users describe what they want to do in plain language instead of providing structured parameters.

### Authentication

**ApiKeyAuth** - API Key in `header` header `x-api-key` OR **UserApiKeyAuth** - API Key in `header` header `x-user-api-key`

### Path Parameters

- `tool_slug` (string) *(required)*: The tool slug to generate inputs for

### Request Body

**Schema:**

- `text` (string) *(required)*: Natural language description of what you want to accomplish with this tool
- `custom_description` (string): Custom description of the tool to help guide the LLM in generating more accurate inputs
- `system_prompt` (string): System prompt to control and guide the behavior of the LLM when generating inputs
- `version` (string): Tool version to use when generating inputs (defaults to "latest" if not specified)

**Example:**

```json
{
  "text": "string",
  "custom_description": "string",
  "system_prompt": "string",
  "version": "string"
}
```

### Responses

#### 200 - Successfully generated structured inputs for the action based on natural language description

**Response Schema:**

- `arguments` (object): Key-value pairs of arguments required by the tool to accomplish the described task
  - `[key: string]` (any)
- `error` (string): Error message if the arguments could not be generated (null if successful)

**Example Response:**

```json
{
  "arguments": {
    "key": null
  },
  "error": "string"
}
```

#### 400 - Bad request - Invalid input parameters or insufficient description to generate tool arguments

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 401 - Unauthorized - Authentication credentials are missing or invalid

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 404 - Not found - The specified tool does not exist

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 422 - Unprocessable entity - Invalid state of the connected account

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 429 - Too many requests - Rate limit exceeded for natural language processing

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 500 - Internal server error - AI processing failed or other server error occurred

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

### Example cURL Request

```bash
curl -X POST "https://backend.composio.dev/api/v3/tools/execute/string/input" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "string",
    "custom_description": "string",
    "system_prompt": "string",
    "version": "string"
  }'
```