# Line Sort — REST API endpoint `line-sort`

Sort lines alphabetically, numerically, or by length. Ascending or descending, case-sensitive or not.

- Category: text
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/line-sort/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/line-sort/
- Same tool on the other surface: https://findutils.com/mcp/line-sort/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/line-sort/execute \
  -H "Content-Type: application/json" \
  -d '{
    "text": "banana\napple\ncherry"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/line-sort
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `text` | string | yes | Newline-separated input. |
| `order` | string (asc \| desc) | no | Sort direction. Default: `"asc"`. |
| `mode` | string (alpha \| numeric \| length) | no | Comparison mode. Default: `"alpha"`. |
| `case_sensitive` | boolean | no | Case-sensitive comparison. Defaults to false. Default: `false`. |

Example arguments (verified):

```json
{
  "text": "banana\napple\ncherry"
}
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:line_sort`. Full MCP reference: https://findutils.com/mcp/line-sort/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
