Skip to main content

ToolDescriptor

@forge/monorepo


@forge/monorepo / backend/src / ToolDescriptor

Type Alias: ToolDescriptor

ToolDescriptor = object

Defined in: backend/src/tools/index.ts:36

Properties

approvalPolicy

readonly approvalPolicy: ApprovalPolicy

Defined in: backend/src/tools/index.ts:45


category

readonly category: string

Defined in: backend/src/tools/index.ts:40


delegatesTo?

readonly optional delegatesTo?: string

Defined in: backend/src/tools/index.ts:69

For a delegating tool (#113): the deterministic function this capability wraps.

On the descriptor rather than only at the definition site, so "which existing function does this delegate to" is answerable wherever a tool is visible — a catalog dump, a log line, a review. Optional because a tool need not delegate; required by defineDelegatingTool for those that do.


description

readonly description: string

Defined in: backend/src/tools/index.ts:39


effect

readonly effect: ToolEffect

Defined in: backend/src/tools/index.ts:44


inputSchema

readonly inputSchema: unknown

Defined in: backend/src/tools/index.ts:42

JSON Schema. Validated on execution, not merely advertised.


label

readonly label: string

Defined in: backend/src/tools/index.ts:38


name

readonly name: string

Defined in: backend/src/tools/index.ts:37


outputSchema

readonly outputSchema: unknown

Defined in: backend/src/tools/index.ts:43


requiredScopes?

readonly optional requiredScopes?: readonly string[]

Defined in: backend/src/tools/index.ts:61

The vendor scopes this tool needs — REQ-063 (#259), task #260 AC-3.

Per tool, not per toolkit, because that is the granularity the question is asked at: a deployment enabling three of Gmail's eight tools should be sent through a consent screen for three tools' worth of scopes, not eight. Google's restricted scopes are the case that makes this matter — asking for gmail.modify when only gmail.readonly is needed is the difference between a consent a security team approves and one they refuse.

Absent means "no scope is required or the vendor has no scopes", which is true of every wave 1 tool. Declared here rather than only in prose so a connection can be checked against what the enabled tools actually need before a tenant is sent through consent, rather than after a 403.


requiresIdempotencyKey

readonly requiresIdempotencyKey: boolean

Defined in: backend/src/tools/index.ts:47

External and destructive tools must supply an idempotency key.