googleapis/mcp-toolbox · error

failed to extract node schema: %w

Error message

failed to extract node schema: %w

What it means

Task-failure wrap inside the concurrent schema extraction: the 'node-schema' task (CALL db.labels() plus per-label sampling) failed, aborting the whole schema extraction.

Source

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

	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
				for _, label := range nodeLabels {
					schema.Statistics.NodesByLabel[label.Name] = label.Count
				}
				return nil
			},
		},
		{
			name: "relationship-schema",
			fn: func() error {
				relationships, err := t.extractRelationships(ctx, source)
				if err != nil {
					return fmt.Errorf("failed to extract relationship schema: %w", err)
				}
				mu.Lock()

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Inspect the wrapped error for the underlying FalkorDB query failure
  2. Verify the database is reachable and the graph is not being written concurrently at max load
  3. Retry the schema extraction once transient errors clear
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at internal/tools/falkordb/falkordbschema/falkordbschema.go:180 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/e9de88056d8f0046. Report an issue: GitHub.