Type Alias: GatedToolDef
GatedToolDef =
object
Defined in: createGatedToolRegistrar.ts:27
Definition for a single gated tool.
Properties
description
description:
string
Defined in: createGatedToolRegistrar.ts:31
Human-readable tool description.
gates?
optionalgates?: (ctx) =>void|Promise<void>[]
Defined in: createGatedToolRegistrar.ts:42
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:35
Zod field map or ZodObject — passed through to server.registerTool.
method
method: (
args) =>Promise<unknown>
Defined in: createGatedToolRegistrar.ts:44
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:29
Tool name as registered with the MCP server.
requiredScope
requiredScope:
string
Defined in: createGatedToolRegistrar.ts:33
The single scope that must be present on the caller's token.