# Morse code translator

Translate text to international Morse code and back, with "/" between words.

- Endpoint: `POST https://setget.net/v1/tools/morse` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `morse`
- Page: https://setget.net/tools/morse

## Inputs

- `text` (required, string): The text to translate, or Morse code written with dots and dashes.
- `action` (optional, string, one of `encode`, `decode`, default `"encode"`): Encode text to Morse, or decode Morse to text.

## Example 1

```json
{"input":{"text":"SOS"}}
```

Result:

```json
{"text":"... --- ...","unknown":[]}
```

## Example 2: Words are separated by a slash

```json
{"input":{"text":"Hello World"}}
```

Result:

```json
{"text":".... . .-.. .-.. --- / .-- --- .-. .-.. -..","unknown":[]}
```

## Example 3

```json
{"input":{"text":".... . .-.. .-.. --- / .-- --- .-. .-.. -..","action":"decode"}}
```

Result:

```json
{"text":"HELLO WORLD","unknown":[]}
```

## Example 4: Characters with no Morse code are reported

```json
{"input":{"text":"café #1"}}
```

Result:

```json
{"text":"-.-. .- ..-. / .----","unknown":["É","#"]}
```

**How should I write Morse for decoding?** Use "." and "-" with a space between letters and "/" between words. A new line also counts as a word break.

**What happens to characters without a Morse code?** They are left out of the result and listed under "unknown". International Morse covers A-Z, 0-9 and common punctuation only.

**Why is decoded text in capitals?** Morse code has no upper or lower case, so capitals are the convention.
