LISA · Documentation
MCP tools usage
LISA exposes 3 tools. Every authenticated caller sees all three. This page documents each tool’s inputs and gives example calls.
Earlier builds shipped
TranslateListTextsandTranslateCompare. Both are gone —TranslateGetTextsis now the whole-object reader, so “list” and “compare” are done by reading (and diffing) its output. See A typical workflow.
Common concepts
target_type
The kind of object to translate — an XCO semantic literal, not a DDIC short code:
target_type |
SAP object |
|---|---|
cds_entity |
CDS entity — merged view (data_definition) + its DDLX (metadata_extension) |
data_element |
Data element (DTEL) |
domain |
Domain fixed-value texts (DOMA) |
data_definition |
CDS view (DDLS) entity/field labels |
message_class |
Message class (MSAG) |
text_pool |
Class / function-group text symbols |
metadata_extension |
CDS metadata extension (DDLX) UI labels |
application_log_object |
Application log object (APLO) |
business_configuration_object |
Business configuration object (SMBC) |
text_table |
Text table (delivery class C/S DB table with one LANG key field, e.g. T005T) |
text_table(translatable text tables). A database table whose delivery class is C or S with exactly one language key field (LANG, e.g.SPRAS) is a text table; its non-key character columns (e.g.LANDXonT005T) are the text attributes. It takes two extra params beyondobject_name/language:language_key_field_name(the LANG key field, e.g.SPRAS) andmaster_key_fields([{ name, value }]fixing all master keys — every key except the language field — to pin one record, e.g.[{ "name": "LAND1", "value": "DE" }]). OnTranslateSetTexts, eachtextsentry’sattributeis a text column name (e.g.LANDX), not a UI label. OnTranslateGetTexts, the columns are enumerated automatically and the filled ones returned (languagemay be omitted → connection language). A table with no language field (e.g. delivery class W) is rejected by XCO. Seetext-table.mdfor the full request/response shapes.
cds_entity(one named entity + its own DDLX). A CDS entity’s labels are split across two physical objects — the view itself (data_definition) and its metadata extension/DDLX (metadata_extension).cds_entitytreats those two as one:TranslateGetTextsfans out to both and concatenates the result (the DDLX labels come back without a separatemetadata_extensioncall), tagging every CDS row with anownerof"data_definition"or"metadata_extension".TranslateSetTextsreads thatownerback and routes each row to the matching object, so each is locked/transported once. Rows are not deduplicated across owners.data_definitionandmetadata_extensionstay available to target one physical object explicitly (single-owner, unmerged).Scope — one entity, not a whole RAP stack.
cds_entitycovers the named entity and its own DDLX only. It does not reach the underlying/parent views of anas projection onchain — e.g. the interface viewZI_…behind a projectionZC_…, which carries its own@EndUserText.label. Translating a stack means onecds_entitypass per distinct entity (one view = one call): theZC_projection, theZI_interface view, and any further underlying views each need their own call.cds_entityis valid with or without a DDLX — on an entity with no metadata extension thedata_definitionis still written and the DDLX sub-call just finds nothing (the call stays valid but may report a partial status); for such a single-object view, callingdata_definitiondirectly avoids the empty DDLX sub-call.
language
ISO 639-1 (EN, DE, FR, …) or the SAP single-char SPRAS code (E, D, F, …).
Selectors (optional)
Disambiguate sub-objects within a target. Only the ones relevant to a target_type are read; the rest are ignored:
| Selector | Used for |
|---|---|
field_name |
a single field of a data_definition / metadata_extension |
fixed_value |
a domain fixed value (lower limit) |
message_number |
a single message in a message_class |
text_symbol_id + text_pool_owner_type (class/function_group) |
a text_pool symbol |
subobject_name |
an application_log_object sub-object |
position |
a repeatable UI annotation (metadata_extension) |
TranslateListLanguages
List all languages installed on the SAP system. No arguments.
{ "name": "TranslateListLanguages", "arguments": {} }
Returns [{ sap_code, iso_code, name }, …].
TranslateGetTexts
Read all translatable texts of an object — this is the whole-object reader. Use it to discover slots, to read values, and (by calling it per language) to compare.
| Arg | Required | Notes |
|---|---|---|
target_type |
✅ | |
object_name |
✅ | Technical name, e.g. ZMY_DATA_ELEMENT. |
language |
➖ | Language to read in. Omit to read in the object’s original language; the effective language is returned in the response. |
field_name |
➖ | Client-side filter — keep only slots of this CDS field (data_definition / metadata_extension). |
position |
➖ | Client-side filter — keep only slots at this position. |
text_pool_owner_type |
➖ | class (default) or function_group for text_pool. |
{
"name": "TranslateGetTexts",
"arguments": { "target_type": "metadata_extension", "object_name": "ZC_ANOMALIESHU", "language": "FR" }
}
Returns { target_type, object_name, language, texts: [{ level, field_name, position?, attribute, value, populated, owner? }] }, where:
populatedistruewhen the slot is filled in this language,falsewhen it exists but is empty (still to translate).positionis present only for repeatable annotations; theattributeis the base name (e.g.ui_facet_label), so(field_name, position, attribute)feedsTranslateSetTextsunchanged.owneris present on CDS rows (cds_entity, and the singledata_definition/metadata_extensionreads):"data_definition"or"metadata_extension", naming the physical object the slot lives in. Pass it back unchanged toTranslateSetTextsto route the write. Non-CDS targets have noowner.- For
cds_entity, if only one of the two physical reads returns rows (e.g. the view has no DDLX) you just get those rows. If a sub-read errors, the successful rows are still returned and the failure is attached aserrors: [{ target_type, owner, error }](partial success). The two reads do not deduplicate: adata_definitionrow and ametadata_extensionrow may sharefield_name+attributeand are still distinct slots.
To list only filled texts, keep entries with populated === true. To compare two languages, call once per language and diff on (field_name, position, attribute, populated, value).
TranslateSetTexts
Write/update translations. Requires a transport request.
| Arg | Required | Notes |
|---|---|---|
target_type, object_name, language |
✅ | |
transport |
✅ | e.g. K900123. |
texts |
✅ | [{ attribute, value, field_name?, position?, owner? }], at least one entry. |
| selectors | ➖ | e.g. fixed_value for a domain, message_number for a message class. |
Each texts entry may carry its own field_name/position (address several CDS fields in one call). For a cds_entity write, every entry must carry the owner returned by TranslateGetTexts — rows are grouped by owner and each group written to its physical object ("data_definition" → the view, "metadata_extension" → the DDLX) in one backend call, so each object is locked/transported once. A cds_entity write with any row missing owner is rejected (LISA never guesses the object). Entity-level texts (the view’s own endusertext_label) must go out with an empty field_name — never inherited from another row. A positional slot keeps its 1-based index in position (string), bare attribute (e.g. ui_lineitem_label); the index is never renumbered or bracketed. The result reports, per owner, how many texts were written and the sub-call status — writes are not atomic across the two objects, so a partial write returns success: false with both outcomes:
{ "success": true, "results": [
{ "target_type": "data_definition", "owner": "data_definition", "written": 1, "success": true },
{ "target_type": "metadata_extension","owner": "metadata_extension","written": 4, "success": true }
] }
For the single targets (data_definition / metadata_extension and the non-CDS types) nothing changes: one 1:1 backend write returning { …, transport, success }, and an entry without its own field_name/position falls back to the top-level selectors.
{
"name": "TranslateSetTexts",
"arguments": {
"target_type": "data_element",
"object_name": "ZMY_AMOUNT",
"language": "DE",
"transport": "K900123",
"texts": [
{ "attribute": "short_field_label", "value": "Betrag" },
{ "attribute": "medium_field_label", "value": "Betrag" },
{ "attribute": "long_field_label", "value": "Betrag (Hauswährung)" }
]
}
}
Common attribute values by target_type:
target_type |
attributes |
|---|---|
cds_entity |
any of the data_definition / metadata_extension attributes below; carry each row’s owner so it routes to the right object. |
data_element |
short_field_label, medium_field_label, long_field_label, heading_field_label |
data_definition / metadata_extension |
endusertext_label; for positional UI labels pass the base attribute (e.g. ui_facet_label) + the per-entry position from TranslateGetTexts. |
message_class |
message_short_text (with message_number selector) |
domain |
fixed_value_description (with fixed_value selector) |
Returns { …, transport, success }.
A typical workflow
TranslateListLanguages— confirm the target language is installed.TranslateGetTexts(nolanguage) — read the object in its original language; every slot comes back with its full key andpopulated: true.TranslateGetTexts(target language) — the same slots come back, withpopulated: false(andvalue: "") for whatever is still missing.TranslateSetTexts(target language, with a transport) — write the translations, reusing(field_name, position, attribute, owner)straight from step 2/3. For acds_entity, theowneron each row routes it back to the right physical object automatically.TranslateGetTexts(target language) again — verify nothing is left withpopulated: false.
Tip — CDS entities: start from
target_type: "cds_entity"in steps 2–4. For one entity, a single read returns the view and its own DDLX together (each row carryingowner), and oneTranslateSetTextswrites both back, each object locked/transported once — no need to drivedata_definitionandmetadata_extensionseparately. Butcds_entitycovers one named entity + its DDLX only: on a RAP stack (ZC_projectionas projection onaZI_interface view, …) run onecds_entitypass per entity — the projection does not carry the interface view’s@EndUserText.label, so theZI_view needs its own call.
This page comes from the LISA repository and follows its main branch.
