feat(mcp): one check of every write tool's text for a tax id, from a table of its strings

Every string a write tool takes (423 across 78 tools) is classed in
text_fields::TABLE: 127 free text (refused when it looks like a tax id),
27 party fields (refused at any run of nine digits, as the engine does),
and 269 exempt for a named reason (vault input, lookup key, id, amount,
date, vocabulary, last four digits, bank pattern, link, a structured value
the engine reads). The check runs in call_tool before the tool or any
write, for previews too, and a refused call writes nothing (WB-format-10).
A test fails when a write tool has a string the table does not class, or
the table names one no tool takes. A string the table does not know is
free text. Annotations on a receipt (payee, source, note ...) meet the
engine's check as well.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-21 14:57:58 -07:00
1 parent 548901ce7d
commit 7327d04897
6 files changed
+1379 -1

No files matched your search

+3
View File
@@ -133,6 +133,9 @@ pub(crate) const STOPPED: &str = "stopped";
pub(crate) const STOPPED_BY_CLOSE: &str = "stopped_by_close";
/// A file's bytes or text came as an argument (D-46).
pub(crate) const INLINE_FILE: &str = "inline_file";
/// A call refused unrun because a string in it looks like a tax id
/// (text_fields.rs).
pub(crate) const TIN_IN_TEXT: &str = "tin_in_text";
/// What a refused call is told when its record couldn't be kept, or a
/// call that ran is told instead of its answer (INVARIANT 3).