googleapis/mcp-toolbox · error

unable to create driver: %w

Error message

unable to create driver: %w

What it means

The arcadedb source's Initialize wraps any failure from initArcadeDBDriver, which creates the Neo4j/Bolt driver used to talk to ArcadeDB's Cypher endpoint. A failure here means the driver object could not be constructed — typically because the server URI is malformed or the driver factory rejects the configuration — before any network handshake is attempted.

Source

Thrown at internal/sources/arcadedb/arcadedb.go:83

	Name       string `yaml:"name" validate:"required"`
	Type       string `yaml:"type" validate:"required"`
	Uri        string `yaml:"uri" validate:"required"`
	User       string `yaml:"user" validate:"required"`
	Password   string `yaml:"password" validate:"required"`
	Database   string `yaml:"database" validate:"required"`
	HTTPUri    string `yaml:"httpUri"`
	HTTPScheme string `yaml:"httpScheme"`
	HTTPPort   int    `yaml:"httpPort"`
}

func (r Config) SourceConfigType() string {
	return SourceType
}

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error) {
	driver, err := initArcadeDBDriver(ctx, tracer, r.Uri, r.User, r.Password, r.Name)
	if err != nil {
		return nil, fmt.Errorf("unable to create driver: %w", err)
	}

	err = driver.VerifyConnectivity(ctx)
	if err != nil {
		driver.Close(ctx)
		return nil, fmt.Errorf("unable to connect successfully: %w", err)
	}

	s := &Source{
		Config: r,
		Driver: driver,
	}
	return s, nil
}

var _ sources.Source = &Source{}

type Source struct {

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Check the wrapped cause after 'unable to create driver:' for the driver's specific complaint.
  2. Verify the URI scheme and address — ArcadeDB Cypher-over-Bolt URIs must include the correct scheme and host:port (default port 2424 for Bolt).
  3. Confirm the database name, user, and password fields are non-empty and well-formed.
  4. Test reachability of the ArcadeDB server with a raw client before starting the toolbox.

Example fix

// before
uri: localhost:2424
// after
uri: bolt://localhost:2424
Defensive patterns

Strategy: validation

Validate before calling

u, err := url.Parse(cfg.Uri)
if err != nil || u.Scheme == "" || u.Host == "" {
    return fmt.Errorf("invalid ArcadeDB URI: %q", cfg.Uri)
}

Try / catch

driver, err := initArcadeDBDriver(ctx, tracer, uri, user, pass, name)
if err != nil {
    return fmt.Errorf("check URI scheme/host in config: %w", err)
}

Prevention

When it happens

Trigger: Calling Initialize with an invalid r.Uri (missing scheme, unsupported scheme, unparseable URL), or with values that cause the underlying neo4j driver constructor to return an error.

Common situations: Config mistakes: URI like 'localhost:2480' without bolt scheme, 'http://' instead of the bolt-compatible scheme ArcadeDB expects, trailing garbage in the URI, or empty URI.

Related errors


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/cc7ab010a2365d07. Report an issue: GitHub.