electron-agent-bridge
    Preparing search index...

    Interface ToolDefinition<Shape>

    One MCP tool: schema, description and a handler that returns text (errors are thrown).

    interface ToolDefinition<Shape extends z.ZodRawShape = z.ZodRawShape> {
        compactSchema?: Readonly<
            {
                [k: string]: $ZodType<
                    unknown,
                    unknown,
                    $ZodTypeInternals<unknown, unknown>,
                >;
            },
        >;
        description: string;
        inputSchema: Shape;
        name: string;
        requires?: "observe"
        | "interact"
        | "eval";
        requiresFeature?: "ipc" | "state" | "pages" | "mainLogs" | "mainControl";
        handle(
            input: $InferObjectOutput<Shape>,
            context: ToolContext,
        ): Promise<string | ToolOutput>;
    }

    Type Parameters

    • Shape extends z.ZodRawShape = z.ZodRawShape
    Index
    compactSchema?: Readonly<
        {
            [k: string]: $ZodType<
                unknown,
                unknown,
                $ZodTypeInternals<unknown, unknown>,
            >;
        },
    >

    A smaller, looser schema advertised in the compact profile (default: inputSchema).

    description: string
    inputSchema: Shape
    name: string
    requires?: "observe" | "interact" | "eval"

    Listed only while the connected session has this capability (e.g. eval).

    requiresFeature?: "ipc" | "state" | "pages" | "mainLogs" | "mainControl"

    Listed only while the connection serves this feature group (e.g. not ipc when attached to renderers).