Class ToolRules
- Namespace
- Emissary
- Assembly
- Emissary.dll
Declarative constraints on tool-call behavior, enforced by the agent loop at runtime. A violating call is not executed; the model receives an error tool result explaining the contract and can self-correct.
public sealed class ToolRules
- Inheritance
-
ToolRules
- Inherited Members
Methods
Limit(string, int)
The tool may be called at most this many times per run (attempts count).
public ToolRules Limit(string tool, int maxCalls)
Parameters
Returns
Require(string, string)
The tool may only run after a prior successful call to
prerequisite — e.g. refund_payment requires
verify_identity. Calls in the same parallel batch as the prerequisite do not count.
public ToolRules Require(string tool, string prerequisite)
Parameters
toolstringThe guarded tool's wire name.
prerequisitestringThe tool that must have succeeded first.
Returns
Terminal(string)
After this tool is called, no further tool calls are allowed in the run.
public ToolRules Terminal(string tool)
Parameters
toolstringThe terminal tool's wire name.