Table of Contents

Class CrewToolCollection

Namespace
Oscova.Agents.Collections
Assembly
Oscova.Agents.dll

Stores reflected and externally supplied tools with normalized lookup metadata.

public class CrewToolCollection : ICollection<AIFunction>, IEnumerable<AIFunction>, IEnumerable

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

Tool names are treated case-insensitively for lookup while preserving each function name value for execution.

Constructors

CrewToolCollection()

Creates an empty tool collection.

CrewToolCollection(IEnumerable<AIFunction>)

Creates a tool collection populated with existing AI functions.

Properties

Count

Gets the number of elements contained in the System.Collections.Generic.ICollection`1.

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection`1 is read-only.

Methods

Add(AIFunction)

Adds a tool using its qualified name as the lookup key.

Add(AIFunction, string, string, NetworkScope)

Adds a tool with explicit external-server metadata.

Add(object, string?)

Reflects public declared methods from a toolset and adds them as AI functions.

AddRange(IEnumerable<AIFunction>)

Adds a sequence of tools using each tool's existing qualified name.

Clear()

Removes all items from the System.Collections.Generic.ICollection`1.

Contains(AIFunction)

Determines whether the System.Collections.Generic.ICollection`1 contains a specific value.

CopyTo(AIFunction[], int)

Copies the elements of the System.Collections.Generic.ICollection`1 to an System.Array, starting at a particular System.Array index.

CreateToolsFromToolset(object)

Creates AI functions from a toolset without adding them to a collection.

Find(string)

Finds a tool by its qualified name.

FindAll(IEnumerable<string>)

Finds tools whose qualified names appear in the provided list.

FindAll(string)

Finds tools whose qualified names start with the provided prefix.

GetDeclaredNetworkScope(string)

Gets the tool's source-declared network scope before any user governance override.

GetDefaultApprovalMode(string)

Gets the default approval mode declared by a reflected tool method.

GetEnumerator()

Returns an enumerator that iterates through the collection.

GetNetworkScope(string)

Gets the tool's declared network scope.

GetOriginalName(AIFunction)

Gets the original unqualified name for a tool.

GetOriginalName(string)

Gets the original unqualified name for a qualified tool name.

GetServerName(AIFunction)

Gets the recorded server name for a tool.

GetServerName(string)

Gets the recorded server name for a qualified tool name.

GetToolsByServer(string)

Gets all tools supplied by a normalized server or provider name.

Remove(AIFunction)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection`1.

Remove(string)

Removes a tool and its metadata by qualified name.

TrySetNetworkScope(string, NetworkScope)

Updates the effective network scope for an already registered tool.