Skip to content

Tool

Defined in: packages/core/src/mcp/tools/index.ts:54

Tool definition interface

optional auth?: ToolAuthMode

Defined in: packages/core/src/mcp/tools/index.ts:65

Defaults to identity. See ToolAuthMode.


optional delegable?: 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: string

Defined in: packages/core/src/mcp/tools/index.ts:56


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.

unknown

ToolCallContext

Promise<unknown>


inputSchema: ZodType

Defined in: packages/core/src/mcp/tools/index.ts:57


name: string

Defined in: packages/core/src/mcp/tools/index.ts:55


optional requiredScope?: 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.