googleapis/mcp-toolbox · error · ClientServerError
exceeded max retries waiting for operation
Error message
exceeded max retries waiting for operation
What it means
The polling loop in Invoke exhausted its configured maxRetries while the Cloud SQL operation was still not done — the operation is taking longer than delay/maxDelay/multiplier/maxRetries allow, and the tool returns a 504 Gateway Timeout.
Source
Thrown at internal/tools/cloudsql/cloudsqlwaitforoperation/cloudsqlwaitforoperation.go:252
return nil, util.NewClientServerError("timed out waiting for operation", http.StatusRequestTimeout, ctx.Err())
default:
}
op, err := source.GetWaitForOperations(ctx, service, project, operationID, cloudSQLConnectionMessageTemplate, delay)
if err != nil {
return nil, util.ProcessGcpError(err)
} else if op != nil {
return op, nil
}
time.Sleep(delay)
delay = time.Duration(float64(delay) * multiplier)
if delay > maxDelay {
delay = maxDelay
}
retries++
}
return nil, util.NewClientServerError("exceeded max retries waiting for operation", http.StatusGatewayTimeout, fmt.Errorf("exceeded max retries"))
}
// Authorized checks if the tool is authorized.
func (t Tool) Authorized(verifiedAuthServices []string) bool {
return true
}
func (t Tool) RequiresClientAuthorization(source sources.Source) (bool, error) {
s, ok := source.(compatibleSource)
if !ok {
return false, fmt.Errorf("invalid source for %q tool: source %q is not a compatible type", t.Cfg.Type, t.Cfg.Source)
}
return s.UseClientAuthorization(), nil
}
// buildParams builds the tool's parameters. A non-empty project means the source has a
// configured default project, which is baked into the project param; otherwise the plain form is used.
func buildParams(project string) parameters.Parameters {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Increase maxRetries or maxDelay for long-running operations
- Check the operation's progress in the Cloud SQL console for blockers
- Retry the tool invocation to continue waiting
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at internal/tools/cloudsql/cloudsqlwaitforoperation/cloudsqlwaitforoperation.go:252 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/77d49f3017391582.
Report an issue: GitHub.