Skip to main content

ToolSpec

@retinue/monorepo


@retinue/monorepo / backend/src / ToolSpec

Type Alias: ToolSpec<I, O>

ToolSpec<I, O> = object

Defined in: backend/src/tools/define.ts:16

Type Parameters​

I​

I = unknown

O​

O = unknown

Properties​

approvalPolicy?​

readonly optional approvalPolicy?: ApprovalPolicy

Defined in: backend/src/tools/define.ts:22


category?​

readonly optional category?: string

Defined in: backend/src/tools/define.ts:20


description​

readonly description: string

Defined in: backend/src/tools/define.ts:18


effect?​

readonly optional effect?: ToolEffect

Defined in: backend/src/tools/define.ts:21


inputSchema?​

readonly optional inputSchema?: unknown

Defined in: backend/src/tools/define.ts:23


label?​

readonly optional label?: string

Defined in: backend/src/tools/define.ts:19


name​

readonly name: string

Defined in: backend/src/tools/define.ts:17


outputSchema?​

readonly optional outputSchema?: unknown

Defined in: backend/src/tools/define.ts:24


requiredScopes?​

readonly optional requiredScopes?: readonly string[]

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

The provider scopes this tool needs — #260's field, made settable by #234.

It was declared on ToolDescriptor and had no way to be set: ToolSpec did not carry it, so nothing in the repository could populate it and nothing read it. A field that cannot be written is a field that documents an intention rather than expressing one, which is the defect class check:reachability exists for — it was missed because the check asks whether declared fields are read, and an unwritable field is never read either.

Google is the first vendor where it matters: gmail.send and gmail.readonly are different consents, and asking for the wrong one is the difference between a security team approving an integration and refusing it.


requiresIdempotencyKey?​

readonly optional requiresIdempotencyKey?: boolean

Defined in: backend/src/tools/define.ts:25

Methods​

execute()​

execute(input, context): O | Promise<O>

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

Parameters​

input​

I

context​

ExecutionContext

Returns​

O | Promise<O>