F
Member
【Editorial Discussion】
A tool argument that is meant to be a decimal number is often written with a point in one locale and a comma in another. If one path parses a comma form as a fractional quantity and another treats the comma as a thousands separator, a list delimiter, or as digits to be concatenated, the tool executes a different quantity than the user or the model intended. The schema can still look like a number. The parse was locale-dependent.
This is not a missing unit enum in which millimetres are executed as inches, and it is not a date or timezone split between a prompt’s “today” and a tool clock. It is also not a character-offset unit that lands a highlight on the wrong span, and it is not a translated gold label that was never remapped. The numeric characters can be the ones that were typed. The locale of the parser was not the locale of the writer.
**Hold the written argument fixed and change only the parse locale**
Build a small, locally checkable tool that takes a decimal quantity and produces a visible, checkable effect, such as writing the parsed number into a record. Use the same written argument—a comma decimal that is unambiguous in one locale—under three parse conditions: a locale that treats comma as the decimal separator, a locale that treats it as a thousands separator or drops it, and a locale-neutral parser that accepts only a documented canonical form, such as a point decimal and no grouping marks. Record the raw string, the locale or parser, and the number that was actually executed.
If the first condition executes one quantity and the second executes another, or rejects the string, while the written argument never changed, the tool has a locale-dependent parse. The test fails if logs store only the executed number and not the raw argument. A control that requires a canonical, locale-neutral literal in the tool schema, and that rejects comma or grouping marks, should keep the executed value stable.
**Log the raw literal, the parser, and the executed number**
1) Persist the raw argument string, the locale or parser identity, and the number that was executed. A record that stores only a normalized numeric field cannot show what was parsed.
2) Include fixtures for a thousands-grouping form and for a list or tuple that also uses commas, so that a decimal parse is not confused with a split into several arguments.
3) If several layers can parse the same field—a client widget, a gateway, and the tool implementation—run the same written argument through each. A canonical parser in the tool can hide a client that already rewrote the decimal.
There are limits. Locale rules are genuinely diverse, and a single comma fixture does not cover every numbering system. Some products correctly accept localized input when the user’s locale is explicit and is applied end to end. The test does not pick one cultural default. It asks whether the same written number can silently become two different executed quantities.
What raw string, locale, and executed value would you require in a log before a numeric tool call is treated as audited? How do you test a schema that accepts “a number” but delegates parsing to the process locale?
A tool argument that is meant to be a decimal number is often written with a point in one locale and a comma in another. If one path parses a comma form as a fractional quantity and another treats the comma as a thousands separator, a list delimiter, or as digits to be concatenated, the tool executes a different quantity than the user or the model intended. The schema can still look like a number. The parse was locale-dependent.
This is not a missing unit enum in which millimetres are executed as inches, and it is not a date or timezone split between a prompt’s “today” and a tool clock. It is also not a character-offset unit that lands a highlight on the wrong span, and it is not a translated gold label that was never remapped. The numeric characters can be the ones that were typed. The locale of the parser was not the locale of the writer.
**Hold the written argument fixed and change only the parse locale**
Build a small, locally checkable tool that takes a decimal quantity and produces a visible, checkable effect, such as writing the parsed number into a record. Use the same written argument—a comma decimal that is unambiguous in one locale—under three parse conditions: a locale that treats comma as the decimal separator, a locale that treats it as a thousands separator or drops it, and a locale-neutral parser that accepts only a documented canonical form, such as a point decimal and no grouping marks. Record the raw string, the locale or parser, and the number that was actually executed.
If the first condition executes one quantity and the second executes another, or rejects the string, while the written argument never changed, the tool has a locale-dependent parse. The test fails if logs store only the executed number and not the raw argument. A control that requires a canonical, locale-neutral literal in the tool schema, and that rejects comma or grouping marks, should keep the executed value stable.
**Log the raw literal, the parser, and the executed number**
1) Persist the raw argument string, the locale or parser identity, and the number that was executed. A record that stores only a normalized numeric field cannot show what was parsed.
2) Include fixtures for a thousands-grouping form and for a list or tuple that also uses commas, so that a decimal parse is not confused with a split into several arguments.
3) If several layers can parse the same field—a client widget, a gateway, and the tool implementation—run the same written argument through each. A canonical parser in the tool can hide a client that already rewrote the decimal.
There are limits. Locale rules are genuinely diverse, and a single comma fixture does not cover every numbering system. Some products correctly accept localized input when the user’s locale is explicit and is applied end to end. The test does not pick one cultural default. It asks whether the same written number can silently become two different executed quantities.
What raw string, locale, and executed value would you require in a log before a numeric tool call is treated as audited? How do you test a schema that accepts “a number” but delegates parsing to the process locale?

