Skip to main content
ExuluTool wraps a single callable function with a Zod input schema, an admin-configurable config array, and an optional OAuth 2.0 flow. Tools you register on ExuluApp appear in the agent workbench UI, where administrators can enable them per agent and configure their runtime parameters. See Tools and Skills for the UI side.

What a tool gives you

Typed inputs

Zod schema validation on every call — the schema is also sent to the model so it knows what each parameter means.

Admin-configurable params

A config array of boolean | string | number | variable | json params that admins set in the platform UI without touching code.

Streaming support

Return a Promise or an AsyncGenerator from execute — the framework handles both.

OAuth 2.0 flows

Declare an oauth config and IMP handles the authorization-code + PKCE dance; the access token arrives in inputs.oauth.

Approval gates

needsApproval: true (the default) makes the platform prompt the user before the tool runs.

Direct execution

Call tool.execute({ agent, config, user, inputs }) from your own code outside of a chat session.

Tool types

The type field is a categorization hint — it affects how the platform UI labels and filters the tool, not how the tool’s id is resolved or how execute is called.
The "agent" and "context" types are managed internally by IMP. The public constructor only accepts "function", "web_search", "skill", and "context". Attempting to pass "agent" throws immediately with a descriptive error. To create framework-managed tools, use the static ExuluTool.internal() factory — it is not part of the public API.

Minimal example

Register it on the app:

OAuth-protected tools

When a tool needs to act on behalf of the user (for example, reading a user’s calendar), declare an oauth config:
When no valid token exists for the calling user, IMP short-circuits execute and returns an authorization URL the agent shows the user. After the user completes the OAuth flow via the platform’s /oauth/callback route, IMP retries the tool with the fresh token.

Streaming tools

Return an AsyncGenerator for long-running operations that yield progress:

Next steps

Configuration

Every constructor option: id, type, inputSchema, config, oauth, needsApproval.

API reference

Public properties, the execute() method, and ExuluTool.internal().