Anchorage API reference
    Preparing search index...

    Interface ConnectorConfig<TInput, TOutput>

    Definition compiled by createConnector() into an enforced Mastra tool.

    interface ConnectorConfig<TInput = unknown, TOutput = unknown> {
        description: string;
        dryRunExecute?: (
            inputData: TInput,
            context: ToolExecutionContext,
            runtime: ConnectorRuntime,
        ) => Promise<TOutput>;
        execute: (
            inputData: TInput,
            context: ToolExecutionContext,
            runtime: ConnectorRuntime,
        ) => Promise<TOutput>;
        id: string;
        inputSchema?: PublicSchema<TInput>;
        outputSchema?: PublicSchema<TOutput>;
        permissions: PermissionManifest;
        policies?: ConnectorPolicies;
    }

    Type Parameters

    • TInput = unknown
    • TOutput = unknown
    Index

    Properties

    description: string

    Description presented to the model and tool consumers.

    dryRunExecute?: (
        inputData: TInput,
        context: ToolExecutionContext,
        runtime: ConnectorRuntime,
    ) => Promise<TOutput>

    Side-effect-free simulation of execute, returning the same output shape. Required when permissions.dryRun is declared, forbidden otherwise — the manifest must state what the connector supports. Gets the same egress-guarded runtime as execute: a simulation's read-only vendor calls stay inside the declared egress too.

    execute: (
        inputData: TInput,
        context: ToolExecutionContext,
        runtime: ConnectorRuntime,
    ) => Promise<TOutput>

    Execute the connector after every configured gate has allowed the call.

    id: string

    Stable, colon-free connector identifier.

    inputSchema?: PublicSchema<TInput>

    Optional schema that Mastra validates before connector policies run.

    outputSchema?: PublicSchema<TOutput>

    Optional schema that Mastra validates after execution.

    permissions: PermissionManifest

    Enforced declaration of side effects and supported controls.

    Omit for an ungated connector (classification + audit only).