evaluate( )

Pattern

Jev Tool Permissions

Prune an agent's tool list before the model sees it. Allow and deny rules run first; Jev asks one relevance boolean per remaining tool in a single call.

IntermediateSep 2026View the full pattern on desktop
Jev Tool Permissions preview

Problems solved

  • Stop paying for irrelevant tool definitions on every turn
  • Keep dangerous tools out of the model's view with deterministic rules
  • Prune a large MCP tool set without dropping tools the task needs

Use cases

  • Trimming a 50–200 tool MCP set per task
  • Allow and deny rules for agent tools
  • Teaching Jev batched booleans with prepareStep

AI SDK APIs

experimental_evaluateexperimental_filterActiveToolsprepareStep

Tags

jevevaluationtyped-decisionsbooleantoolsmcpprepareStepactiveToolsai-sdk

Requirements

Node.js
24+
Memory
256MB
Other
  • Vercel AI Gateway API key

Environment variables

External services

vercel-ai-gatewayupstash

Ready to use?

View the full interactive pattern with live preview and copy the source code.

View the pattern on desktop

Related patterns