googleapis/mcp-toolbox · error

failed to extract relationship schema: %w

Error message

failed to extract relationship schema: %w

What it means

Task-failure wrap inside the concurrent schema extraction: the 'relationship-schema' task (listing relationship types and their counts) failed, aborting the whole schema extraction.

Source

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

				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()
				defer mu.Unlock()
				schema.Relationships = relationships
				for _, relationship := range relationships {
					schema.Statistics.RelationshipsByType[relationship.Type] = relationship.Count
				}
				return nil
			},
		},
		{
			name: "counts",
			fn: func() error {
				nodeResult, err := runReadQuery(ctx, source, "MATCH (n) RETURN count(n) AS count")
				if err != nil {
					return fmt.Errorf("failed to count nodes: %w", err)
				}
				edgeResult, err := runReadQuery(ctx, source, "MATCH ()-[r]->() RETURN count(r) AS count")

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Inspect the wrapped error for the underlying FalkorDB query failure
  2. Verify the graph is reachable and not mid-migration
  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:196 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/c56527bd9980a63d. Report an issue: GitHub.