IToolRegistry
AgentPrism.Abstractions.dllThe registry of tools registered in code.
public interface IToolRegistryRemarks
Section titled “Remarks”This registry is one of AgentPrism’s security boundaries. An agent definition can only point to a registered tool by name. Tool code cannot be written from the UI; only a selection is made from registered tools. This keeps anyone with UI access from running code on the server.
Methods
Section titled “Methods”List()
Section titled “ List()”Returns the definitions of all registered tools, ordered by name.
IReadOnlyList<ToolDescriptor> List()Returns
Section titled “Returns”The tool definitions.
TryGet(string, out AIFunctionDeclaration?)
Section titled “ TryGet(string, out AIFunctionDeclaration?)”Fetches the tool with the given name.
bool TryGet(string name, out AIFunctionDeclaration? tool)Parameters
Section titled “Parameters”name string
The tool name. Comparison is case-sensitive.
tool AIFunctionDeclaration?
The tool found.
Returns
Section titled “Returns”true if the tool is registered.
Remarks
Section titled “Remarks”The result is an AI.AIFunctionDeclaration, not an
AI.AIFunction: a client-side tool (AddClientTool) is
registered as a declaration-only AIFunctionDeclaration, which
is not an AI.AIFunction and cannot be invoked. Every
registered tool — server-side or client-side — is an
AI.AIFunctionDeclaration, so AIFunctionDeclaration.JsonSchema
is always available. Callers pass the result straight to
ChatOptions.Tools, which accepts the broader AITool.