Skip to content

[Models] toolMode 'auto' does not resolve tools against scope.resources (only caller-supplied toolHandlers) — #510 criterion, untracked #1740

Description

@heskew

Part of #510. Splitting out the one remaining unchecked and untracked acceptance criterion so it isn't lost behind a stale code breadcrumb.

The gap

#510's criterion — "Tool calls work in both 'return' and 'auto' modes; 'auto' resolves against scope.resources" — is only half met:

Stale breadcrumb (why this was invisible)

resources/models/agentLoop.ts documents the future work against #615:

But #615 is closed/completed and is about the MCP tool registry + RBAC tools/list filtering — unrelated to scope.models auto-resolution. So the criterion has no live tracking issue. This one is it; the agentLoop.ts comments should be repointed here.

Scope (to be refined in a design note first)

Design-review-first per engineering guidelines — this adds a new dispatch surface:

  • Resolution: how a tool-call name maps to a scope.resources entry and which method it invokes.
  • Precedence: how scope.resources resolution composes with an explicit opts.toolHandlers (caller handler wins? falls through?).
  • RBAC: permission enforcement on the auto-dispatched Resource call (must not become an auth bypass — dispatch under the request's user/permissions).
  • Relationship to MCP: the ops-MCP wrapper (Expose Operations (API) through an MCP Wrapper #465, closed) and MCP tool resolution — whether MCP-exposed tools resolve through the same seam.

Acceptance

Refs


🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions