The handler
Six of those options have a guide of their own:
The four assistant routes
A tool has 30 seconds to answer and 1 MB to answer with, and is never retried. Tappify keeps the
first 20 mention items and cuts each label to 80 characters; a context block is capped at 2 KB
once rendered. An answer that does not match the shape above comes back to you as
TOOL_RESPONSE_INVALID or MENTION_RESPONSE_INVALID.
What a handler receives
TappifyRequest carries
install, context, input, credentials, documents, event, eventId, claims and
the raw request. The pieces are
TappifyInstall,
TappifyCallContext,
TappifyDocuments and
TappifyClaims. A call made from a
filtered surface carries the owner’s
TapFilters.
Route payloads
TappifyHealth,
MetricsInput,
MetricsSeries,
MetricsResponse,
MentionItems,
ContextBlock,
WorkOperation.
The names your manifest declares
tappify extension types narrows these from your manifest, so a handler for a name you did not
declare does not compile:
ActionId,
ActionInput,
ToolId,
ToolInput,
WebhookName,
WebhookPayload,
TapHostEvents,
TapSettingsValues,
TapCredentialValues.
Tokens
createTappifyHandler verifies for you. Call these directly only outside it.
Sending events
What each delivery becomes is on
Raise alerts, banners, and markers.
Adapters
toExpress returns
ExpressMiddleware over an
ExpressLikeRequest and an
ExpressLikeResponse;
toNode returns a
NodeRequestListener, which
reads the body as a BodyStream.
Cloudflare Workers and Vercel take the handler as it is — see
Deploy your server.
Errors
TapServerError is what you throw. The
code is stable and the message reaches the owner’s screen; the ones the SDK itself raises are
SERVER_ERROR_CODES, typed as
TapServerErrorCode. Every code
Tappify itself returns is on Errors.