`lumail@2.1.0` · [`lumail.tools`](/docs/sdk/v2/tools)

```typescript
tools.get(toolName: string): Promise<LumailResult<GetToolResponse>>
```

One tool and its input schema.

## Path Parameters

| Name | Type | Description |
| ---------- | ------ | ----------------------------------------- |
| `toolName` | string | **Required.** Tool name (`^[a-z0-9_]+$`). |

## Response Fields

| Field | Type | Description |
| -------------- | ------ | ------------------------------------ |
| `name` | string | Tool name. |
| `description` | string | What the tool does. |
| `category` | string | Optional grouping. |
| `inputSchema` | object | JSON Schema for the run body. |
| `outputSchema` | object | Optional JSON Schema for the result. |

HTTP also includes `endpoint` (`/api/v2/tools/{name}`). `data` is the tool definition. Failures return `{ data: null, error: { name, message, statusCode } }`.


## API Reference
**Method:** GET
**Endpoint:** /api/v2/tools/:toolName

### SDK
```ts
import { Lumail } from "lumail";

const lumail = new Lumail({ apiKey: process.env.LUMAIL_API_KEY });
const { data, error } = await lumail.tools.get("list_subscribers");
if (error) {
  throw error;
}
console.log(data.name, data.inputSchema);
```

### cURL
```bash
curl https://lumail.io/api/v2/tools/list_subscribers \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

### JavaScript
```javascript
const response = await fetch("https://lumail.io/api/v2/tools/list_subscribers", {
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
});
const data = await response.json();
```

### Success Response
```json
{
  "name": "list_subscribers",
  "description": "List contacts newest first.",
  "inputSchema": { "type": "object" }
}
```

### Error Response
```json
{
  "name": "not_found",
  "message": "Tool \"list_subscribers\" not found",
  "statusCode": 404
}
```
