Conversation
Ports the ambiguous-name check to langchain. Claude SDK (CSDK-007), OpenAI (OAI-007), ADK (ADK-007), and MCP (MCP-003) all ship it; the five newer packs had none. The tool name sits directly beside the description in what the model sees, so it is half the selection signal, and a generic verb like process or handle spends that half on nothing.
|
Thanks @bradAGI, this is a clean port. LC-024 matches CSDK-007 exactly on the Two follow-ups rather than blockers. LangChain.js tools do carry a name ( One nit: the last sentence of Before this reaches users it needs a rationale doc in |
Engine half of a coordinated pair with trustabl/agent-reliability-rules#104, on a branch of the same name so the rules-sync job resolves the matching pack rather than main. Neither half should merge alone — check-rules-sync.sh fails if they do. Mirrors langchain/tool_definition.yaml into testdata/rules-fixture and adds cases to policyRuleCases, as TestPolicyRules_AllRulesCovered requires. Three cases: the generic name, the verb-object remediation, and process_invoice_batch — a name that merely contains a listed word and must stay silent. The third pins that name_in matches the whole name rather than a substring, which is the plausible regression and the one that would otherwise flood well-named tools with findings.
Ports the ambiguous-name check to LangChain. Claude SDK (CSDK-007), OpenAI (OAI-007), ADK (ADK-007), and MCP (MCP-003) all ship it; the newer packs had none.
The tool name sits directly beside the description in what the model sees, so it is half the selection signal — and a generic verb like
processorhandlespends that half on nothing. A LangChain agent is routinely handed a dozen or more tools at once, so a name that does not discriminate competes against every neighbor in the list — and each wrong pick spends an iteration against LC-102'smax_iterationsbudget.Same
name_inlist as CSDK-007, so behavior stays consistent across packs.Verification — engine built at
main:Fire (tool named
process): includesLC-024Silent (same tool renamed
summarize_invoice):LC-024absentA note on scope. I drafted a fifth rule in this batch for the Vercel AI SDK and dropped it after testing:
ToolDef.Nameis deliberately empty forvercel_ai_tool, because the SDK derives a tool's name from the key in thetools: { ... }record rather than from thetool({...})call. The engine asserts this directly —so every name-based predicate (
name_in,name_has_prefix) is structurally inert for that pack — it also blocks a Vercel idempotency rule, which is why the pack has none. Back-fillingNamefrom the record key at discovery time would unblock both. Happy to open that engine PR if it'd be useful.Paired engine PR follows, mirroring the rule into
testdata/rules-fixture/with fire/silent cases.