ProtectedInternalInternal method that must be implemented by derived action classes. This is where the actual action logic should be implemented.
The action execution parameters including typed context
Promise resolving to the action result
Executes the action with the provided parameters.
The action execution parameters including context
Promise resolving to the action result
__Scoped_Search— scope-aware universal search for AI agents.Enforces the calling agent's
SearchScopeAccesssetting and restricts the requested scope against the agent'sMJ: AI Agent Search Scopesrows (Phase IN 'AgentInvoked','Both'). Delegates the actual search toSearchEngine.Search()withScopeIDs: [resolvedScopeID].Agent identity is resolved from (in order):
AgentIDinput parameter (most common — passed by the agent executor).params.Context?.AgentID(when the agent executor stamps context).params.Context?.agentID(lowercased variant used in some execution paths).Enforcement rules (Section 5 of plans/search-scopes-rag-plus.md):
SearchScopeAccess='None'→ rejects withACCESS_DENIED.SearchScopeAccess='Assigned':ScopeIDsupplied: must match one of the agent's active AgentInvoked/Both rows.IsDefault=1row (falling back to lowest Priority).NO_DEFAULT_SCOPE.SearchScopeAccess='All':ScopeIDsupplied: used as-is.Multi-tenant
SearchContext(per-call): Two optional inputs assemble aSearchContextthat is threaded intoSearchParams.SearchContext. The engine renders the values into every scope-level Nunjucks template (MetadataFilter, ExtraFilter, UserSearchString, FolderPath) at search time — so one scope definition serves many tenants.PrimaryScopeRecordID(string) — primary tenant key (e.g. OrganizationID). Available in templates as{{ context.PrimaryScopeRecordID }}.SecondaryScopes(JSON string) — flat object of additional dimensions. Each value must bestring | number | boolean | string[]. Available in templates as{{ context.SecondaryScopes.<key> }}. Incompatible value types are dropped with a log; malformed JSON falls back to undefined rather than failing the call.SearchContextis included only when at least one of the two inputs is provided — omitting both preserves the original "no per-call tenant filter" behavior. Seeguides/SEARCH_SCOPES_AND_RAG_GUIDE.md§10 for the full multi-tenant model and template-rendering details.Example: Agent tool call
Example: Per-tenant scoped call