Forest Admin - API reference
    Preparing search index...

    Interface ForestServerClient

    Interface for communicating with Forest Admin server. This abstraction allows for easy mocking in tests.

    interface ForestServerClient {
        forestServerUrl: string;
        fetchSchema(): Promise<ForestSchemaCollection[]>;
        getMcpWorkflowById(
            params: GetMcpWorkflowByIdParams,
        ): Promise<McpWorkflowLookup>;
        getMcpWorkflowRun(
            params: GetMcpWorkflowRunParams,
        ): Promise<HydratedWorkflowRun>;
        getSemanticLayerActionDescription(
            params: SemanticLayerActionParams,
        ): Promise<SemanticLayerDescription>;
        getSemanticLayerCollection(
            params: SemanticLayerCollectionParams,
        ): Promise<SemanticLayerCollection>;
        listMcpEnabledWorkflows(
            params: ListMcpWorkflowsParams,
        ): Promise<McpWorkflow[]>;
        triggerMcpWorkflow(
            params: TriggerMcpWorkflowParams,
        ): Promise<WorkflowRunTriggerResult>;
    }

    Implemented by

    Index
    forestServerUrl: string

    Base URL of the Forest Admin server this client talks to.

    • Fetches the Forest Admin schema from the server.

      Returns Promise<ForestSchemaCollection[]>

    • Resolves a single workflow by id (name, collection, mcpEnabled), scoped to the caller.

      Parameters

      • params: GetMcpWorkflowByIdParams

      Returns Promise<McpWorkflowLookup>

    • Reads the full hydrated workflow run, scoped to the caller.

      Parameters

      • params: GetMcpWorkflowRunParams

      Returns Promise<HydratedWorkflowRun>

    • Parameters

      • params: SemanticLayerActionParams

      Returns Promise<SemanticLayerDescription>

    • Reads the descriptions of a collection and of what it holds, as the caller's role reaches them.

      Parameters

      • params: SemanticLayerCollectionParams

      Returns Promise<SemanticLayerCollection>

    • Lists the MCP-enabled workflows the caller can access in a rendering.

      Parameters

      • params: ListMcpWorkflowsParams

      Returns Promise<McpWorkflow[]>

    • Starts a run of an MCP-enabled workflow on a record and returns its runId (async).

      Parameters

      • params: TriggerMcpWorkflowParams

      Returns Promise<WorkflowRunTriggerResult>