Table of Contents

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

tool string

The limited tool's wire name.

maxCalls int

The maximum number of calls.

Returns

ToolRules

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

tool string

The guarded tool's wire name.

prerequisite string

The tool that must have succeeded first.

Returns

ToolRules

Terminal(string)

After this tool is called, no further tool calls are allowed in the run.

public ToolRules Terminal(string tool)

Parameters

tool string

The terminal tool's wire name.

Returns

ToolRules