Guides · ← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team · 7 min read

Scoping Tool Access for Eval Agents: Every Tool Is a Declared Capability

The agent's hands are its tools. An eval that would never grant a wildcard policy routinely grants the equivalent, one helpful tool at a time.

The short answer: Tool access is where eval agents get their real reach, and it is usually granted without an IAM-style review. treat each tool as a declared capability with its own scope: the tool set for an eval is the minimal list the task family needs; each tool reaches named resources only (this bucket, this API, this read-only replica); the credentials tools wield are the eval role's — scoped, capped, eval-only; and every tool call is logged to storage the agent cannot edit. A tool that can do anything (an unrestricted shell, a general HTTP fetcher with the run's headers, a database tool on the production DSN) is a wildcard wearing a friendlier name, and it belongs in the same conversation as wildcard_iam_action when you review the declared setup with the free scan.

What is tool access scope?

Tool access scope is the totality of what an agent can do through its tools: the operations each tool exposes, the resources those operations can name, and the credentials they execute with. It is the action-side counterpart of IAM scope — and a complete accounting of an eval's blast radius requires both, because an agent acts through tools or not at all.

Why do tool grants bypass the IAM review?

Because they arrive as product decisions, not policy decisions. The policy file gets a security read; the harness config's tool list gets a capability read — 'the agent needs to browse, obviously' — and the browsing tool is then handed the run's full header set, the shell tool the harness's own environment (credentials included), the database tool the DSN from the copied config. Each grant is locally sensible and jointly equivalent to the admin policy the same team would reject in a policy file. The review failure is categorical: tools are filed under 'what the agent can do for the task' and never under 'what can be done to us through the agent'. This guide exists to file them under both.

The corrective is to declare tool scope in the same artefacts the scan and the review already read: the harness config lists tools and their resource bindings explicitly (no ambient environment inheritance — the shell tool's environment is a named, minimal set; the fetcher's allow-list is written down; the database tool's target is the eval replica by construction). What is declared can be reviewed, diffed and scanned for its credential surroundings; what is ambient cannot.

What does a well-scoped tool set look like?

Short, and legible as a sentence. For a document-QA eval: read this dataset prefix; write this results prefix; call this model endpoint; fetch from these eleven documentation domains through the resolver. Each tool maps to named IAM actions on named resources, so the tool list and the policy file describe the same boundary in two dialects — and a reviewer can check them against each other, which is where discrepancies (the tool that reaches what the policy forgot) surface. Write/execute tools get the hardest look: a code-execution tool belongs in a sandbox whose own declarations are in the scanned set, with the side-service discipline applied to its neighbours.

Refusals are data. A tool call denied by scope — the fetcher refusing an unlisted domain, the storage tool refusing a foreign prefix — should be logged as a first-class eval event, not an error to be widened away. Denials are how the boundary reports the dataset's ambitions; a run with zero denials and a hostile dataset is a run whose boundary was never tested, and the absence should be read as no_evidence, in the pack's idiom, rather than as peace.

How do credentials work across tools without leaking between them?

One identity, narrowly entitled, beats many ambient secrets. The tools execute as the eval role — the same scoped role the IAM classes govern — fetching what they need from the manager at start-up, in memory. Per-tool credentials are warranted only where a tool's reach genuinely differs (a read-only replica credential for the database tool), and they follow the same rule: eval-only, capped, manager-held, never declared in the harness config as values. The failure to avoid is the harvested environment: a shell or code tool that inherits every variable the harness process holds concentrates all credentials into the most dangerous tool's reach. Curate each tool's environment as deliberately as its resource list — the config should show, per tool, exactly which references it receives.

And log as if the log were evidence, because it is: tool calls (tool, arguments' shape, resource, outcome, denial or success) shipped one-way to the results store's protected side. The log is the eval's flight recorder — the artefact that converts a suspected boundary event into a reconstructed sequence, and the input your future evidence packs will wish you had kept.

Worked example: Halloway Legal Tech, scored end to end

Example. Halloway, a fictional legal-tech firm, reviewed its contract-analysis eval's tooling after a dataset case — benign in intent — induced the agent to fetch a URL that redirected three times and landed on an internal status page. The fetch had carried the run's headers. The declared setup's scan framed the repair list:

FindingClassSeverityWeight
AdministratorAccess referenced in the eval role policyadmin_managed_policyCRITICAL25
Generic API key assignment in the tool configurationgeneric_api_keyHIGH15
Service bound to 0.0.0.0 in the status service configopen_bindingMEDIUM8

The arithmetic: 25 + 15 + 8 = 48 points of exposure, so the score is 100 − 48 = 52/100, grade C. Scoring uses EvalEgress's published weights — CRITICAL 25, HIGH 15, MEDIUM 8, LOW 3 — with grades at A ≥ 90, B ≥ 75, C ≥ 50 and D ≥ 25.

The fetcher became an allow-list tool (fourteen documentation and court-listing domains) that sends no run headers and logs refusals; the shell tool was retired from this eval entirely (the task family never needed it — it had been enabled 'for debugging'); the admin policy became the eval role's nine named actions; the API key moved into the manager as a capped eval key; the status service rebound privately. The next hostile-fetch attempt in the regression set produced a logged refusal and a clean transcript — the eval result the boundary was built to make boring.

Scope the tools: the five actions

Minimal, named, logged, refused loudly:

  1. List the eval's tools as declared capabilities. In the harness config, per tool: operations, resource bindings, environment references received. Ambient inheritance is undeclared scope — eliminate it.
  2. Bind each tool to named resources, matching the IAM policy. The tool list and the policy should describe one boundary in two dialects; reconcile discrepancies in review, where they are cheap.
  3. Execute tools as the scoped eval role, credentials in memory only. Manager-fetched, eval-only, capped; per-tool credentials only where reach genuinely differs, under the same rules.
  4. Log every tool call one-way, denials included. Tool, resource, outcome — to storage the agent cannot edit. Denials are boundary telemetry and eval data, not errors to widen away.
  5. Retire tools the task family does not need. A debugging shell left enabled is a standing capability; the minimal set is a security property, re-decided per eval, not inherited from the last one.

Tools are where policy becomes physics. Keep the set minimal and the log complete, and the injection cases can do their worst in a room built for it — the room described in the injection guide.

Keep checking the boundary

Run the free exposure scan on the files your next eval will run with. Compare plans, read the scoring documentation, and keep reading: what is eval-to-production exposure?, what is egress in AI evaluation?, pre-deployment eval safety checklist, how to stop an AI evaluation from reaching production secrets, batch eval scanning up to 50 files, JSON report export for eval findings, team workflows for eval security. EvalEgress is one of the Ingenious AI platforms.

Sources

Frequently asked questions

Isn't a general shell tool essential for realistic agent evals?
For evals of general agents, a shell may be the capability under test — then it runs in a declared sandbox inside the scanned set, with a curated environment and no production-honoured credential anywhere in reach. Realism of capability, containment of consequence.

Should the fetcher tool send the run's auth headers to be realistic?
No — that pattern turns every fetched page into a credential recipient. Fetch unauthenticated or with per-domain credentials by design; a redirect chain should never become a header leak, as Halloway's case showed.

How do tool scopes relate to the scanner's IAM classes?
They are the same boundary in two artefacts: the policy grants what the role may do; the tool list grants what the agent will attempt. The scanner reads the policy and the credential declarations around the tools; your review reads both files against each other.

What should a denial look like to the agent?
A clean, logged refusal the harness records as an eval event. Agents that receive silent failures retry creatively; agents that receive explicit scope refusals produce a measurable behaviour — which is, after all, data the eval wants.

Do we scope tools per dataset or per eval?
Per eval programme, tightened per run where a dataset is unusually hostile or unusually privileged. The baseline set is a programme property; exceptions are run properties, recorded as such.