Exports
definePlugin(config): Plugin
Creates a plugin with a manifest and handler registry.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique plugin identifier |
name | string | Yes | Human-readable name |
description | string | Yes | Plugin description |
authProviders | AuthProvider[] | Yes | Authentication providers |
tools | ToolConfig[] | Yes | Tool definitions |
Plugin object with:
manifest— serializedPluginManifest(Zod schemas converted to JSON Schema)handlers—Map<string, handler>keyed by tool path
defineTool(config): ToolConfig
Type-safe wrapper for tool definitions. Returns the config as-is with proper generic inference.
defineSource(config): SourceConfig
Type-safe wrapper for source configurations. Returns the config as-is.
elicit(ctx, request): Promise<ElicitationResponse>
Convenience wrapper for requesting user approval. Equivalent to calling ctx.elicit(request) directly.
SourceConfigSchema
Zod discriminated union schema for validating source configurations. Validates openapi, graphql, mcp, and plugin source types.
Type exports
Plugin, PluginConfig, ToolConfig, Source, SourceAdapter, SourceConfig, SourceAuth, OpenAPISourceConfig, MCPSourceConfig, GraphQLSourceConfig, PluginSourceConfig