From 2b234196cd224a26ef4f0a23d94ce24dbdabb32e Mon Sep 17 00:00:00 2001 From: Joey Mussalli Date: Mon, 24 Aug 2026 15:54:32 -0400 Subject: [PATCH] feat(vercel_ai): add VAI-016 ambiguous tool binding name --- vercel_ai/tool_definition.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/vercel_ai/tool_definition.yaml b/vercel_ai/tool_definition.yaml index 124a53a..56f8afe 100644 --- a/vercel_ai/tool_definition.yaml +++ b/vercel_ai/tool_definition.yaml @@ -58,3 +58,36 @@ rules: field per argument (z.object({ city: z.string(), units: z.enum([...]) })). Reserve dynamicTool for the rare case where the input genuinely cannot be typed, and even then validate the shape inside execute() before using it. + + - id: VAI-016 + title: Ambiguous Vercel AI tool binding name + severity: low + confidence: 0.85 + language: typescript + applies_to: + - vercel_ai_tool + scope: tool + match: + name_in: + - process + - handle + - run + - do + - execute + - perform + - work + - go + - thing + - stuff + explanation: > + A Vercel AI SDK tool whose binding identifier is a generic name like + `process`, `handle`, or `run` gives the model no signal about intent once + that binding is registered under the agent's tools record. Vercel leaves + ToolDef.Name empty (the model-facing name is the record key), so this rule + matches the binding identifier (VarName). Authors often register + `tools: { process }` or reuse a throwaway binding that later becomes the + public name — the model then mis-routes or under-calls the tool. + fix: > + Rename the binding to a verb-object form (e.g. `summarizeInvoice`, + `fetchWeather`) and use that same identifier as the agent's tools-record + key so the model-facing name stays descriptive. \ No newline at end of file