googleapis/mcp-toolbox · error
INTERNAL_ERROR
INTERNAL_ERROR
Error message
error generating manifest: %w
What it means
toolsListHandler wraps any error returned by GenerateListToolsResult with "error generating manifest" and reports it as INTERNAL_ERROR. The underlying cause is one of the manifest-generation failures: missing tool (260), missing source (261), or GetParameters failure (262).
Source
Thrown at internal/server/mcp/v20250326/method.go:124
func pingHandler(id jsonrpc.RequestId) (any, error) {
return jsonrpc.JSONRPCResponse{
Jsonrpc: jsonrpc.JSONRPC_VERSION,
Id: id,
Result: struct{}{},
}, nil
}
func toolsListHandler(ctx context.Context, id jsonrpc.RequestId, primitiveMgr *primitives.PrimitiveManager, g group.Group, body []byte) (any, error) {
var req ListToolsRequest
if err := json.Unmarshal(body, &req); err != nil {
err = fmt.Errorf("invalid mcp tools list request: %w", err)
return jsonrpc.NewError(id, jsonrpc.INVALID_REQUEST, err.Error(), nil), err
}
urlParams, _ := util.UrlParamsFromContext(ctx)
listToolsResult, err := GenerateListToolsResult(primitiveMgr, g, urlParams)
if err != nil {
err = fmt.Errorf("error generating manifest: %w", err)
return jsonrpc.NewError(id, jsonrpc.INTERNAL_ERROR, err.Error(), nil), err
}
return jsonrpc.JSONRPCResponse{
Jsonrpc: jsonrpc.JSONRPC_VERSION,
Id: id,
Result: listToolsResult,
}, nil
}
// toolsCallHandler generate a response for tools call.
func toolsCallHandler(ctx context.Context, id jsonrpc.RequestId, g group.Group, primitiveMgr *primitives.PrimitiveManager, body []byte, header http.Header) (any, error) {
if header != nil {
if clientIP := util.ExtractClientIP(header); clientIP != "" {
ctx = util.WithClientIP(ctx, clientIP)
}
}
View on GitHub (pinned to 8cc6e09de2)
Solutions
- Inspect the wrapped cause in the error chain to identify the failing tool/source
- Fix source initialization (connection, credentials) or remove tools referencing dead sources
- Ensure groups are rebuilt after tool/source registration changes
- Restart the server after config edits and verify startup logs show all sources/tools registered
Defensive patterns
Strategy: retry
Validate before calling
// client-side: refresh tools and confirm the server is healthy before listing
const health = await fetch(`${serverUrl}/api/health`)
if (!health.ok) throw new Error("server sources not ready") Try / catch
try {
const tools = await client.listTools()
} catch (e) {
if (e.code === -32603) { // INTERNAL_ERROR: transient source/registry issue
await waitForServerReady()
return client.listTools()
}
throw e
} Prevention
- Only call tools/list after the server finishes startup and sources initialize
- Monitor server logs for source init failures
- Retry tools/list with backoff on INTERNAL_ERROR during startup windows
When it happens
Trigger: Any error propagating out of GenerateListToolsResult during tools/list handling — unresolvable tool or source names, or GetParameters failures.
Common situations: Server-side registration inconsistencies after config changes; sources that failed to initialize; custom tools whose schema generation hits a down database.
Related errors
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/04cf4acb5ffa321e.
Report an issue: GitHub.