Skip to content

Commit 2ba60e9

Browse files
committed
chore(changeset): mcp object tools serve the caller's locale
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgNCAXyGfBQFZBwixH
1 parent 5334bf9 commit 2ba60e9

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
'@objectstack/runtime': patch
3+
'@objectstack/mcp': patch
4+
---
5+
6+
feat(mcp): `list_objects` and `describe_object` serve labels and descriptions in the caller's locale
7+
8+
Clause-②: no
9+
Metadata-protocol: none
10+
11+
The two MCP object tools now serve the object's label and description, and each field's label, description and option labels, in the caller's locale, the way the REST `/meta` object door serves them. Before, both tools served the authored text in every locale. A client asking in Chinese about an app with a Chinese translation bundle was shown the English labels.
12+
13+
- **HTTP:** the locale is the request's `Accept-Language` (then `?locale=`, then the i18n service's default), read and translated by the `/meta` door's own routine. The dataset tools already used the same routine.
14+
- **stdio:** the transport carries no request, so the locale is the i18n service's default. The stdio `list_datasets` already uses that locale.
15+
16+
Translation runs on the object as the caller is served it, after the field mask, so a field the caller cannot read stays absent and so does its translated text. Names and option values never change. Where the bundle has no entry for a key, or no i18n service is registered, the tools serve the authored text. Without `Accept-Language`, the HTTP tools now serve the i18n default locale's bundle entries, as the REST door does. An app whose `en` bundle relabels a field (app-crm's `amount` is "Deal Value") shows that label there.
17+
18+
The answer's shape is unchanged. Validation rule messages are translated by the same routine where the bundle carries them.

0 commit comments

Comments
 (0)