Summary
brain_list MCP tool always fails with a 400 error regardless of whether a category parameter is provided. The server receives category=[object Object] in the query string instead of the correct value (or nothing).
Steps to Reproduce
Call brain_list via MCP:
- With
{category: "architecture", limit: 3} -> error
- With
{limit: 2} (no category at all) -> same error
Actual Result
error: "pi error (400): Failed to deserialize query string: unknown variant `[object Object]`, expected one of `architecture`, `pattern`, `solution`, `convention`, `security`, `performance`, `tooling`, `debug`, `sota`, `discovery`, `hypothesis`, `cross_domain`, `neural_architecture`, `compression`, `self_learning`, `reinforcement_learning`, `graph_intelligence`, `distributed_systems`, `edge_computing`, `hardware_acceleration`, `quantum`, `neuromorphic`, `bio_computing`, `cognitive_science`, `formal_methods`, `geopolitics`, `climate`, `biomedical`, `space`, `finance`, `meta_cognition`, `benchmark`, `consciousness`, `information_decomposition`, `custom`"
Expected Result
List of memories, optionally filtered by category.
Evidence
REST API works fine (bypassing the MCP handler):
GET /v1/memories/list?category=architecture&limit=3
Returns 3 results with total_count: 2129 -- correct.
Related MCP tool works: brain_search with {query: "architecture patterns", category: "architecture"} returns results successfully. Both handlers use the identical pattern for extracting category from args.
Root Cause
The deployed brain_list MCP handler on pi.ruv.io is constructing query params with category=[object Object] regardless of the provided arguments. The error text uses pi error not API error, confirming the deployed binary differs from the current main branch source at crates/mcp-brain-server/src/routes.rs.
The main branch handler (lines 6070-6078) looks correct:
"brain_list" => {
let mut params = Vec::new();
if let Some(c) = args.get("category").and_then(|v| v.as_str()) {
params.push(("category", c.to_string()));
}
if let Some(l) = args.get("limit").and_then(|v| v.as_u64()) {
params.push(("limit", l.to_string()));
}
proxy_get(&client, &base, "/v1/memories/list", api_key, ¶ms).await
}
The fix is to rebuild and redeploy the brain server from main.
Workaround
Use the REST API directly:
curl -H "Authorization: Bearer $KEY" "https://pi.ruv.io/v1/memories/list?category=architecture&limit=5"
Or use brain_search which handles the category parameter correctly.
aidevops.sh v3.32.145 plugin for OpenCode v1.18.3
Summary
brain_listMCP tool always fails with a 400 error regardless of whether acategoryparameter is provided. The server receivescategory=[object Object]in the query string instead of the correct value (or nothing).Steps to Reproduce
Call
brain_listvia MCP:{category: "architecture", limit: 3}-> error{limit: 2}(no category at all) -> same errorActual Result
Expected Result
List of memories, optionally filtered by category.
Evidence
REST API works fine (bypassing the MCP handler):
Returns 3 results with
total_count: 2129-- correct.Related MCP tool works:
brain_searchwith{query: "architecture patterns", category: "architecture"}returns results successfully. Both handlers use the identical pattern for extractingcategoryfrom args.Root Cause
The deployed
brain_listMCP handler onpi.ruv.iois constructing query params withcategory=[object Object]regardless of the provided arguments. The error text usespi errornotAPI error, confirming the deployed binary differs from the currentmainbranch source atcrates/mcp-brain-server/src/routes.rs.The
mainbranch handler (lines 6070-6078) looks correct:The fix is to rebuild and redeploy the brain server from
main.Workaround
Use the REST API directly:
Or use
brain_searchwhich handles the category parameter correctly.aidevops.sh v3.32.145 plugin for OpenCode v1.18.3