Tool
Defined in: packages/core/src/mcp/tools/index.ts:54
Tool definition interface
Properties
Section titled “Properties”
optionalauth?:ToolAuthMode
Defined in: packages/core/src/mcp/tools/index.ts:65
Defaults to identity. See ToolAuthMode.
delegable?
Section titled “delegable?”
optionaldelegable?:boolean
Defined in: packages/core/src/mcp/tools/index.ts:86
Opt this identity-mode tool into delegation: when set, a principal holding
the admin scope may explicitly pass another tenant’s userId and have it
honoured instead of being pinned to its own tenant (the multi-tenant
operator-console case; delegated calls are audited). Defaults to false, so
identity tools pin every caller — admins included — to the verified tenant
unless they opt in. Ignored for admin/public tools. Set true only on
tools that genuinely need cross-tenant operation (e.g. the memory data tools
recall/update_memory/delete_memory); leave destructive
account/credential tools pinned so an admin key cannot act on other tenants’
credentials by accident.
description
Section titled “description”description:
string
Defined in: packages/core/src/mcp/tools/index.ts:56
handler
Section titled “handler”handler: (
input,context?) =>Promise<unknown>
Defined in: packages/core/src/mcp/tools/index.ts:63
Execute the tool. The optional second argument carries verified actor facts (ToolCallContext) for handlers that audit/attribute the call; it is backward-compatible — existing one-arg handlers keep working unchanged.
Parameters
Section titled “Parameters”unknown
context?
Section titled “context?”Returns
Section titled “Returns”Promise<unknown>
inputSchema
Section titled “inputSchema”inputSchema:
ZodType
Defined in: packages/core/src/mcp/tools/index.ts:57
name:
string
Defined in: packages/core/src/mcp/tools/index.ts:55
requiredScope?
Section titled “requiredScope?”
optionalrequiredScope?:string
Defined in: packages/core/src/mcp/tools/index.ts:73
Scope an authenticated principal must hold to call this tool (e.g.
memories:write). The admin scope satisfies any requirement. Only
checked when the request carries an authenticated identity; tools with no
requiredScope need only a valid identity. Leaves unauthenticated/legacy
calls (no authInfo) to the auth enforcement above.