Skip to main content

ToolDefinition

openmolt


openmolt / ToolDefinition

Interface: ToolDefinition

Defined in: types/index.ts:123

Definition of a single tool within an integration.

Properties

body?

optional body: Record<string, unknown>

Defined in: types/index.ts:141

Request body. Supports Liquid templates.


description

description: string

Defined in: types/index.ts:127

Human-readable description of what the tool does.


endpoint?

optional endpoint: string

Defined in: types/index.ts:135

Path appended to the integration's baseUrl. Supports Liquid templates with input.*.


execute()?

optional execute: (input, context) => Promise<unknown>

Defined in: types/index.ts:145

Custom async function invoked when the tool is called. Takes precedence over HTTP config.

Parameters

input

Record<string, unknown>

context

ToolContext

Returns

Promise<unknown>


handle

handle: string

Defined in: types/index.ts:125

Unique handle used to identify the tool within its integration.


headers?

optional headers: Record<string, unknown>

Defined in: types/index.ts:139

Additional headers to merge for this specific tool.


inputSchema?

optional inputSchema: ZodTypeAny

Defined in: types/index.ts:148

Zod schema describing the expected input object.


method?

optional method: string

Defined in: types/index.ts:133

HTTP method.


outputSchema?

optional outputSchema: ZodTypeAny

Defined in: types/index.ts:150

Zod schema describing the expected output object (informational for the agent).


queryParams?

optional queryParams: Record<string, unknown>

Defined in: types/index.ts:137

Query parameters. Supports Liquid templates.


scopes?

optional scopes: string[]

Defined in: types/index.ts:129

Scopes from the integration's scopes map that are required to use this tool.