Add glossary entries
add_glossary_entriesAdd (or update) glossary entries in one call. By glossaryId (from list_glossaries), each row is an entry: its sourceTerm and sourceLocale, and optionally a description, forbiddenVariants, doNotTranslate and targets (target locale → target term). Rows are upserted on (sourceLocale, sourceTerm): an existing entry keeps every field the row omits, and its targets are merged by locale. The batch is one transaction: a row breaking a rule — a spelling another entry claims (GLOSSARY_SPELLING_TAKEN), doNotTranslate with targets, a target in the source locale, an unknown locale — refuses the whole call, naming the row (entries[i]). Locales are stored as written, and a run applies an entry whose locales equal its own ignoring case only — a pt_BR entry never reaches a pt-BR Workflow — so use the spelling the Workflow's definition declares (get_workflow). With project (still accepted for an existing Project), each row is a pair with its own source and target term, its languages by locale or by project_language id (from get_project), upserted on (project, sourceTerm, source, target): re-adding an existing key updates its target term and its do-not-translate flag. Rows of one term that are all doNotTranslate make the term do-not-translate, covering every language; a translation for a do-not-translate term clears the flag, keeping its other identity pairs as plain translations. A pair bringing in a term the glossary has no entry for yet that another entry forbids as a variant refuses the whole call, naming the row (entries[i]) and that entry. In both forms terms are trimmed of leading and trailing whitespace before they are checked and stored, a source term empty once trimmed is refused, and matching translation-memory entries are marked stale so future translations pick up the change. A glossary may be shared by projects and Workflows in the organisation: a change to it applies to every one of them (with project, only the terms of the addressed project's languages are listed or changed). The result's glossary.sharedWith names the others — tell the user which ones a change affects. While glossary.repositoryManaged is set, the glossary is synced from that project's asset repository and every write is refused. A glossary with origin fetched holds what it last fetched from its source, which fetched.sourceKind names: notion, a Notion data source (with the connection and the data source), or repository, one TBX or CSV glossary file of a GitHub repository (with the repository, branch and path); fetched.status is its fetch status. Every write to it is refused with GLOSSARY_FETCHED — tell the user to edit the Notion database, or the file on its branch, instead. These tools edit the stored glossaries. A Workflow listed in list_glossaries repositoryWorkflows reads docs/glossary.tbx or docs/glossary.csv on its repository's triggering commit instead, so its terms are edited in that file, through a pull request. Style setup's drafts pull request in the web app adds a missing style guide or context file, never a glossary file. When referring to a project or language in your reply to the user, use its name and locale (e.g. "French (fr-FR)") — ids (UUIDs) are for tool calls only, never show them to the user.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entries": "<entries>"
},
"name": "add_glossary_entries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | The rows to upsert: entries by glossaryId, pairs with project | |
| project | No | Project id (UUID) or slug — still accepted for an existing Project's attached glossary. Pass this or glossaryId, not both. | |
| glossaryId | No | Glossary id, from list_glossaries. Pass this or project, not both. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | ||
| glossary | Yes | The glossary the call reached and what else uses it |