# Line Prefix Suffix — REST API endpoint `line-prefix-suffix`

Add a prefix, a suffix, or line numbers to every line of a text. Numbering starts at any value, steps by any amount, pads with zeros on request, and can skip blank lines.

- 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-prefix-suffix/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/line-prefix-suffix/
- Same tool on the other surface: https://findutils.com/mcp/line-prefix-suffix/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/line-prefix-suffix/execute \
  -H "Content-Type: application/json" \
  -d '{
    "text": "apples\npears",
    "number_lines": true
  }'

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

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `text` | string | yes | Newline-separated input. |
| `prefix` | string | no | Text to put at the start of each line. Default: none. Default: `""`. |
| `suffix` | string | no | Text to put at the end of each line. Default: none. Default: `""`. |
| `number_lines` | boolean | no | Put a line number before each line. Default: false. Default: `false`. |
| `start_at` | integer | no | First line number. Default: 1. Default: `1`. |
| `step` | integer | no | Increment between line numbers. Default: 1. Default: `1`. |
| `number_format` | string | no | Template for the number with {n} as the placeholder. Default: "{n}. " Default: `"{n}. "`. |
| `pad_numbers` | boolean | no | Pad numbers with leading zeros to the width of the last number. Default: false. Default: `false`. |
| `skip_blank` | boolean | no | Leave lines that hold only whitespace unchanged and unnumbered. Default: false. Default: `false`. |

Example arguments (verified):

```json
{
  "text": "apples\npears",
  "number_lines": true
}
```

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_prefix_suffix`. Full MCP reference: https://findutils.com/mcp/line-prefix-suffix/

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