googleapis/mcp-toolbox · error

failed to reach graph %q: %w

Error message

failed to reach graph %q: %w

What it means

Connectivity probe failure in extractSchema: the warm-up query 'RETURN 1' against the default graph failed with an error other than 'empty key', meaning the FalkorDB instance is unreachable, misconfigured, or the graph key is in a bad state.

Source

Thrown at internal/tools/falkordb/falkordbschema/falkordbschema.go:166

// extractSchema orchestrates the concurrent extraction of the graph schema.
func (t Tool) extractSchema(ctx context.Context, source compatibleSource) (*types.SchemaInfo, error) {
	schema := &types.SchemaInfo{
		GraphInfo: types.GraphInfo{Name: source.DefaultGraph()},
		Statistics: types.Statistics{
			NodesByLabel:        make(map[string]int64),
			RelationshipsByType: make(map[string]int64),
		},
	}

	// FalkorDB creates graph keys lazily, so a graph nothing has written to
	// yet does not exist and every query on it fails. Report it as an empty
	// schema instead.
	if _, err := runReadQuery(ctx, source, "RETURN 1"); err != nil {
		if strings.Contains(err.Error(), "empty key") {
			return schema, nil
		}
		return nil, fmt.Errorf("failed to reach graph %q: %w", source.DefaultGraph(), err)
	}

	var mu sync.Mutex

	tasks := []struct {
		name string
		fn   func() error
	}{
		{
			name: "node-schema",
			fn: func() error {
				nodeLabels, err := t.extractNodeLabels(ctx, source)
				if err != nil {
					return fmt.Errorf("failed to extract node schema: %w", err)
				}
				mu.Lock()
				defer mu.Unlock()
				schema.NodeLabels = nodeLabels

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Verify the FalkorDB host, port and credentials in the source configuration
  2. Confirm the graph key exists and is not corrupted
  3. Check network connectivity and that the FalkorDB server is running
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at internal/tools/falkordb/falkordbschema/falkordbschema.go:166 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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