passdrill
AI & LLM Engineering · AI Agents & Tool Use · Card 019/022 medium

A data-analysis agent is given one tool, `query_database`, so it can answer questions about sales figures. Rather than issuing that tool a database credential with full read-write access to every table, the team instead issues it a credential scoped to read-only access on just the sales tables it actually needs, with no permission to modify data or read unrelated tables such as employee records. The agent was already going to be given this one tool either way. What additional protection does scoping the underlying credential provide, beyond simply defining only one tool?

  1. None -- once a tool is defined at all, the credential behind it is irrelevant to what damage a manipulated or mistaken call could cause
  2. It prevents the model from ever generating a request to modify data, since a model cannot produce text describing an action its credential doesn't support
  3. It makes the tool's schema-validation step unnecessary, since a scoped credential automatically rejects any malformed tool call before it reaches the database
  4. It limits what a manipulated, hallucinated, or simply mistaken query_database call can actually do even after it reaches the real system, because the tool's own underlying access is capped to read-only sales data, so a call that somehow requested a write or reached for employee records would still be blocked by the credential itself, not merely discouraged by the tool's definition or the model's instructions
Next card → Shuffle