Tencent/WeKnora · error

operation timed out

Error message

operation timed out

What it means

Sentinel returned when an MCP operation (request to the server) exceeds its deadline or the configured timeout. It is the mcp package's sentinel; unrelated numeric codes ErrTimeout=1009 exist in internal/errors for HTTP responses, so do not conflate the two.

Source

Thrown at internal/mcp/errors.go:28

	ErrNotConnected = errors.New("client not connected")

	// ErrAlreadyConnected is returned when trying to connect an already connected client
	ErrAlreadyConnected = errors.New("client already connected")

	// ErrInitializeFailed is returned when MCP initialize handshake fails
	ErrInitializeFailed = errors.New("MCP initialize handshake failed")

	// ErrToolNotFound is returned when requested tool is not found
	ErrToolNotFound = errors.New("tool not found")

	// ErrResourceNotFound is returned when requested resource is not found
	ErrResourceNotFound = errors.New("resource not found")

	// ErrInvalidResponse is returned when server response is invalid
	ErrInvalidResponse = errors.New("invalid response from server")

	// ErrTimeout is returned when operation times out
	ErrTimeout = errors.New("operation timed out")

	// ErrConnectionClosed is returned when connection is closed unexpectedly
	ErrConnectionClosed = errors.New("connection closed")
)

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Retry the operation with backoff; MCP tool calls are often transiently slow
  2. Increase the MCP client's timeout configuration for long-running tools
  3. Pass a context with an appropriate deadline instead of relying on defaults
  4. Check server-side load or tool hang if timeouts persist
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at internal/mcp/errors.go:28 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/1d932acff77b3be5. Report an issue: GitHub.