# hf_inference.nlp.translate

Translate text between languages using the Helsinki-NLP opus-mt model family via HuggingFace Inference API. Covers 1,000+ language pairs (English to French, Spanish, German, Chinese, Japanese, Arabic, Russian, etc.). Specify target_lang as a 2-letter ISO 639-1 code (e.g. "fr", "es", "de", "zh", "ja"). The adapter automatically selects the opus-mt-{source}-{target} model. Useful for multilingual content pipelines, localization, and cross-language information retrieval.

Agent View of the PolicyLayer registry record for `hf_inference.nlp.translate`. HTML page: https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/hf-inference.nlp.translate

## Facts

- Tool: `hf_inference.nlp.translate`
- Server: Apibase (`apibase-mcp-client`) — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase.md
- Install: `npx -y apibase-mcp-client`
- Homepage: https://github.com/whiteknightonhorse/APIbase
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 4 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `text` | string | yes | Input text to process. Maximum ~10,000 characters depending on model context window. |
| `model` | string | no | Override the HuggingFace model ID for translation. If omitted, the adapter automatically selects "Helsinki-NLP/opus-mt-{source_lang}-{target_lang}" (e.g. "Helsi |
| `source_lang` | string | no | ISO 639-1 two-letter source language code. Default: "en" (English). Change if the input text is in a language other than English (e.g. "fr" for French input, "e |
| `target_lang` | string | yes | ISO 639-1 two-letter target language code (e.g. "fr" for French, "es" for Spanish, "de" for German, "pt" for Portuguese, "it" for Italian, "nl" for Dutch, "ru" |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "hf_inference.nlp.translate",
    "arguments": {
      "text": "<text>",
      "target_lang": "<target_lang>"
    }
  }
}
```

## Why hf_inference.nlp.translate is rated High

Triggers external API call to run an NLP model; effects depend on input arguments.

From the tool's own definition: "Translate text between languages via HuggingFace Inference API"

## Use case

AI agents invoke hf_inference.nlp.translate to trigger actions in Apibase. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Apibase:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "hf_inference.nlp.translate": {
      "limits": [
        {
          "counter": "hf_inference.nlp.translate_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Apibase (1383)

- `infra.cloudflare.dns_delete` — Destructive — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/infra.cloudflare.dns-delete.md
- `infra.cloudflare.purge_cache` — Destructive — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/infra.cloudflare.purge-cache.md
- `polymarket.trading.cancel_order` — Destructive — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/polymarket.trading.cancel-order.md
- `ai.image.generate` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/ai.image.generate.md
- `aipush.market.report` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/aipush.market.report.md
- `audio.transcribe.submit` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/audio.transcribe.submit.md
- `dev.code.execute` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/dev.code.execute.md
- `device.registry.command` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/device.registry.command.md
- `document.convert.from_pdf` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/document.convert.from-pdf.md
- `document.convert.to_pdf` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/document.convert.to-pdf.md
- `document.convert.web_to_pdf` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/document.convert.web-to-pdf.md
- `infra.browser.create_session` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/infra.browser.create-session.md
- `phone.telnyx.sms_world` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/phone.telnyx.sms-world.md
- `phone.twilio.sms` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/phone.twilio.sms.md
- `platform.batch.call` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/platform.batch.call.md
- `scb.tables.query` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/scb.tables.query.md
- `socrata.datasets.query` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/socrata.datasets.query.md
- `web.screenshot.capture` — Execute — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/web.screenshot.capture.md
- `domain.namesilo.register` — Financial — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/domain.namesilo.register.md
- `phone.telnyx.sms_premium` — Financial — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/phone.telnyx.sms-premium.md
- `polymarket.trading.place_order` — Financial — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/polymarket.trading.place-order.md
- `abr.business.abn_lookup` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abr.business.abn-lookup.md
- `abr.business.acn_lookup` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abr.business.acn-lookup.md
- `abr.business.name_search` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abr.business.name-search.md
- `abs.demographics.population` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abs.demographics.population.md
- `abs.economy.cpi` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abs.economy.cpi.md
- `abs.economy.gdp` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abs.economy.gdp.md
- `abs.economy.labour_force` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abs.economy.labour-force.md
- `abs.economy.trade` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/abs.economy.trade.md
- `account.analytics.timeseries` — Read — https://policylayer.com/tools/io-github-whiteknightonhorse-apibase/account.analytics.timeseries.md
- …and 1353 more: https://policylayer.com/tools/io-github-whiteknightonhorse-apibase.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-github-whiteknightonhorse-apibase · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-whiteknightonhorse-apibase
