Type Alias: GatedToolDef
GatedToolDef =
object
Defined in: createGatedToolRegistrar.ts:28
Definition for a single gated tool.
Properties
description
description:
string
Defined in: createGatedToolRegistrar.ts:32
Human-readable tool description.
gates?
optionalgates?: (ctx) =>void|Promise<void>[]
Defined in: createGatedToolRegistrar.ts:43
Per-tool gates merged after the global gates. Useful for arg-conditional
authorization (e.g. different subscription tiers based on call args).
Each gate receives the full ToolCallContext (identity + args).
Throw to reject the call; return (or resolve) to continue.
Parameters
| Parameter | Type |
|---|---|
ctx | ToolCallContext |
Returns
void | Promise<void>
inputSchema
inputSchema:
unknown
Defined in: createGatedToolRegistrar.ts:36
Zod field map or ZodObject — passed through to server.registerTool.
method
method: (
args) =>Promise<unknown>
Defined in: createGatedToolRegistrar.ts:45
The tool handler. Receives merged call args + buildContext output.
Parameters
| Parameter | Type |
|---|---|
args | Record<string, unknown> |
Returns
Promise<unknown>
name
name:
string
Defined in: createGatedToolRegistrar.ts:30
Tool name as registered with the MCP server.
requiredScope
requiredScope:
string
Defined in: createGatedToolRegistrar.ts:34
The single scope that must be present on the caller's token.