googleapis/mcp-toolbox · error

unable to execute query: %w

Error message

unable to execute query: %w

What it means

Error "unable to execute query: %w" thrown in googleapis/mcp-toolbox.

Source

Thrown at internal/sources/neo4j/neo4j.go:135

	cf := sourceClassifier.Classify(cypherStr)
	if cf.Error != nil {
		return nil, cf.Error
	}

	if cf.Type == classifier.WriteQuery && readOnly {
		return nil, fmt.Errorf("this tool is read-only and cannot execute write queries")
	}

	if dryRun {
		// Add EXPLAIN to the beginning of the query to validate it without executing
		cypherStr = "EXPLAIN " + cypherStr
	}

	config := neo4j.ExecuteQueryWithDatabase(s.Neo4jDatabase())
	results, err := neo4j.ExecuteQuery[*neo4j.EagerResult](ctx, s.Neo4jDriver(), cypherStr, params,
		neo4j.EagerResultTransformer, config)
	if err != nil {
		return nil, fmt.Errorf("unable to execute query: %w", err)
	}

	// If dry run, return the summary information only
	if dryRun {
		summary := results.Summary
		plan := summary.Plan()
		execPlan := map[string]any{
			"queryType":     cf.Type.String(),
			"statementType": summary.QueryType(),
			"operator":      plan.Operator(),
			"arguments":     plan.Arguments(),
			"identifiers":   plan.Identifiers(),
			"childrenCount": len(plan.Children()),
		}
		if len(plan.Children()) > 0 {
			execPlan["children"] = addPlanChildren(plan)
		}
		return []map[string]any{execPlan}, nil

View on GitHub (pinned to 8cc6e09de2)

When it happens

Trigger: Thrown at internal/sources/neo4j/neo4j.go:135 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/bd043e9495c5857f. Report an issue: GitHub.