Skip to main content

AI agent tools

The mcp module exposes the translation system as a set of tools an AI agent can call through the Model Context Protocol (MCP). An agent can use these tools to inspect an asset's translation state and translate it, either by directing an installed translation service or by producing the translated text itself.

Dependencies

This module depends on the core translation module and on com.brightspot.ai:ai, which provides the underlying MCP tool framework.

Installation

Add the mcp dependency to your build:

<!-- Requires Brightspot 5.0 or later. -->
<dependency>
<groupId>com.brightspot.translation</groupId>
<artifactId>mcp</artifactId>
<version>2.0.0</version>
</dependency>
note

This module requires Java 21 or later.

Translation tool group

The TranslationToolGroup registers the following tools, each prefixed with Translation_:

ToolDescription
Translation_listServicesLists the external translation providers installed on the deployment.
Translation_listLocalesLists locales available for translation, optionally scoped to a service.
Translation_inspectContentReturns a content item's source locale, translatable fields, and existing localized variations.
Translation_getTranslatableTextReturns a content item's source text, keyed by field path, for the agent to translate itself.
Translation_translateTranslates a content item into one or more locales using an installed translation service.
Translation_applyTranslationWrites agent-produced translations back to a content item as a new localized variation.
Translation_statusReturns the translation log entries for a source content item.

Provider path vs. agent path

An agent can translate content two ways:

  • Provider pathTranslation_translate hands the content to a configured translation service (for example, Amazon Translate, DeepL, or Google Translate), which performs the translation. This applies when Translation_listServices returns at least one provider.
  • Agent pathTranslation_getTranslatableText returns the source text, the agent translates it, and Translation_applyTranslation writes the result back as a new localized variation. This applies when no provider is installed, or whenever the agent is asked to translate the content directly.

Fields translated through the agent path are flagged as AI-generated in the content's field metadata.

Permissions

The translation tools enforce the same permissions as the CMS translation UI:

ToolRequired permission
Translation_listServices, Translation_listLocales, Translation_inspectContent, Translation_getTranslatableText, Translation_translate, Translation_applyTranslationTranslate Content
Translation_statusTranslation Action - View Translation Log

See Configuring translation permissions to grant these to a role.

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.