KosmoKrator

productivity

DeepL Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the DeepL KosmoKrator integration.

7 functions 5 read 2 write API key auth

Lua Namespace

Agents call this integration through app.integrations.deepl.*. Use lua_read_doc("integrations.deepl") inside KosmoKrator to discover the same reference at runtime.

Agent-Facing Lua Docs

This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.

DeepL Integration

Tools

deepl_translate_text

Translate text using DeepL.

Parameters:

  • text (string, required) — The text to translate.
  • target_lang (string, required) — Target language code (e.g., “EN”, “DE”, “FR”, “ES”, “JA”, “ZH”).
  • source_lang (string, optional) — Source language code. Auto-detected if omitted.

deepl_list_languages

List supported languages.

Parameters:

  • type (string, optional) — Filter: “source” or “target”.

deepl_get_usage

Check DeepL API usage and limits.

Parameters: None.

deepl_list_glossaries

List all glossaries.

Parameters: None.

deepl_get_glossary

Get details of a specific glossary.

Parameters:

  • id (string, required) — The glossary ID.

deepl_create_glossary

Create a new glossary.

Parameters:

  • name (string, required) — Glossary name.
  • source_lang (string, required) — Source language code.
  • target_lang (string, required) — Target language code.
  • entries (string, required) — Tab-separated entries (source\ttarget), one per line.

deepl_get_current_user

Get current DeepL account information and usage statistics.

Parameters: None.

Raw agent markdown
# DeepL Integration

## Tools

### deepl_translate_text
Translate text using DeepL.

**Parameters:**
- `text` (string, required) — The text to translate.
- `target_lang` (string, required) — Target language code (e.g., "EN", "DE", "FR", "ES", "JA", "ZH").
- `source_lang` (string, optional) — Source language code. Auto-detected if omitted.

### deepl_list_languages
List supported languages.

**Parameters:**
- `type` (string, optional) — Filter: "source" or "target".

### deepl_get_usage
Check DeepL API usage and limits.

**Parameters:** None.

### deepl_list_glossaries
List all glossaries.

**Parameters:** None.

### deepl_get_glossary
Get details of a specific glossary.

**Parameters:**
- `id` (string, required) — The glossary ID.

### deepl_create_glossary
Create a new glossary.

**Parameters:**
- `name` (string, required) — Glossary name.
- `source_lang` (string, required) — Source language code.
- `target_lang` (string, required) — Target language code.
- `entries` (string, required) — Tab-separated entries (source\ttarget), one per line.

### deepl_get_current_user
Get current DeepL account information and usage statistics.

**Parameters:** None.

Metadata-Derived Lua Example

local result = app.integrations.deepl.deepl_translate_text({
  text = "example_text",
  target_lang = "example_target_lang",
  source_lang = "example_source_lang"
})
print(result)

Functions

deepl_translate_text

Translate text using DeepL. Supports automatic source language detection or explicit source language specification. Returns translated text with detected source language.

Operation
Write write
Full name
deepl.deepl_translate_text
ParameterTypeRequiredDescription
text string yes The text to translate. For multiple texts, pass an array.
target_lang string yes The target language code (e.g., "EN", "DE", "FR", "ES", "JA", "ZH"). Use "EN-US" for American English, "EN-GB" for British English, "PT-BR" for Brazilian Portuguese.
source_lang string no The source language code (e.g., "EN", "DE"). If omitted, DeepL auto-detects the source language.

deepl_list_languages

List languages supported by DeepL. Returns language codes and names. Filter by type to get only source or target languages.

Operation
Read read
Full name
deepl.deepl_list_languages
ParameterTypeRequiredDescription
type string no Filter by type: "source" for source languages, "target" for target languages. Returns all if omitted.

deepl_get_usage

Get current DeepL API usage. Returns the number of characters translated and the character limit for the current billing period.

Operation
Read read
Full name
deepl.deepl_get_usage
ParameterTypeRequiredDescription
No parameters.

deepl_list_glossaries

List all glossaries in your DeepL account. Returns glossary IDs, names, language pairs, and entry counts.

Operation
Read read
Full name
deepl.deepl_list_glossaries
ParameterTypeRequiredDescription
No parameters.

deepl_get_glossary

Get details of a specific DeepL glossary by ID. Returns glossary name, source/target languages, entry count, and creation timestamp.

Operation
Read read
Full name
deepl.deepl_get_glossary
ParameterTypeRequiredDescription
id string yes The glossary ID (e.g., "a1b2c3d4-e5f6-7890-abcd-ef1234567890").

deepl_create_glossary

Create a new DeepL glossary. Glossaries define custom translations for specific terms. Entries are tab-separated pairs (source\ttarget), one per line.

Operation
Write write
Full name
deepl.deepl_create_glossary
ParameterTypeRequiredDescription
name string yes A name for the glossary (e.g., "Marketing Terms EN-DE").
source_lang string yes The source language code (e.g., "EN", "DE"). Must match the glossary entries.
target_lang string yes The target language code (e.g., "DE", "FR"). Must match the glossary entries.
entries string yes Glossary entries as tab-separated values. Each line: source_term<tab>target_term. Multiple lines for multiple entries.

deepl_get_current_user

Get current DeepL account information. Returns usage statistics and account details.

Operation
Read read
Full name
deepl.deepl_get_current_user
ParameterTypeRequiredDescription
No parameters.