Skip to main content

ToolRegistryConfig

@forge/monorepo


@forge/monorepo / backend/src / ToolRegistryConfig

Type Alias: ToolRegistryConfig

ToolRegistryConfig = object

Defined in: backend/src/tools/registry.ts:262

Properties

approval?

readonly optional approval?: ApprovalCheck

Defined in: backend/src/tools/registry.ts:268

Makes approval unbypassable: a policy-classified tool cannot execute directly without a grant.


authorization

readonly authorization: AuthorizationPolicy

Defined in: backend/src/tools/registry.ts:264


blobs?

readonly optional blobs?: BlobStore

Defined in: backend/src/tools/registry.ts:266


catalogBudget?

readonly optional catalogBudget?: TokenBudget

Defined in: backend/src/tools/registry.ts:324

A ceiling in tokens on the discoverable catalogue — AC-3.

Applies to the compact entries only. Preloaded tools are an explicit instruction from the host and are not silently withdrawn; a host that preloads more than its own budget is told so through overBudget rather than having its instruction quietly reversed.


idempotency?

readonly optional idempotency?: IdempotencyStore

Defined in: backend/src/tools/registry.ts:265


maxInlineOutputBytes?

readonly optional maxInlineOutputBytes?: number

Defined in: backend/src/tools/registry.ts:281

Results whose JSON exceeds this are spilled to blobs and referenced. Default 8 KiB.


onMisconfiguration?

readonly optional onMisconfiguration?: (report) => void

Defined in: backend/src/tools/registry.ts:279

Where "this tool can never run" is reported — #162.

Optional, and its absence costs diagnosability rather than safety: the refusal still happens either way, and it still carries a message naming the tool and this config field. What the sink adds is a report at the first such call rather than one per call, which is the difference between noticing a wiring bug and reading the same refusal a hundred times.

Called at most once per tool name per registry.

Parameters

report

ToolMisconfiguration

Returns

void


providers

readonly providers: readonly ToolProvider[]

Defined in: backend/src/tools/registry.ts:263


readonly optional search?: ToolSearch

Defined in: backend/src/tools/registry.ts:301

Search over the catalogue, which is what makes find_tools exist — AC-1.

Absent means no find_tools in the catalogue at all, rather than one that always answers "not configured". Wiring is the toggle, the same rule the tool library already follows for web_search.


shadow?

readonly optional shadow?: ShadowRecorder

Defined in: backend/src/tools/registry.ts:294

Where a shadow run's suppressed writes go (#126).

Here as well as on the delegating envelope, and the registry's is the one that matters. #126 put suppression only in the envelope, which covers delegating tools only — so a gated tool that is not one, every MCP-imported external write included, reached its own execute and performed a real write in a shadow run. That is a bigger hole than the missing parity record the approval-loop work found.

Required when the run says it is shadow: context.shadow === true with no recorder is refused rather than performed, the same fail-closed rule as the envelope's.


skills?

readonly optional skills?: SkillBodyLoader

Defined in: backend/src/tools/registry.ts:314

Loads a named skill's body, when the deployment has skills — task #244.

Structural rather than importing SkillResolver, for the reason ApprovalCheck is structural: tools must not depend on skills. createSkillBodyLoader in skills/ adapts a resolver to this shape.

Wiring is the toggle. load_skill has been in META_TOOLS since the registry was written with nothing implementing it — the third instance of that exact pattern after execute_tool and learn_tools (#210). A model handed the descriptor would call it, get "Unknown tool load_skill", and a transcript reader would see a broken platform. So the descriptor is now advertised only when this is wired, which is the rule find_tools already follows.


toolsets?

readonly optional toolsets?: ToolsetResolver

Defined in: backend/src/tools/registry.ts:316

A tenant's category switches, applied before authorization filtering — AC-4.


validator?

readonly optional validator?: SchemaValidator

Defined in: backend/src/tools/registry.ts:282