Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(types): remove unused import to fix compiler warning

Steven Enamakelf507c953f959
diff --git a/crates/openhuman-core/src/mcp/server/tools/types.rs b/crates/openhuman-core/src/mcp/server/tools/types.rs
index 6c8df5aff1..b3926ebdee 100644
--- a/crates/openhuman-core/src/mcp/server/tools/types.rs
+++ b/crates/openhuman-core/src/mcp/server/tools/types.rs
@@ -1,41 +1,63 @@
use serde_json::Value;
-pub const DEFAULT_LIMIT: u64 = 10;
-pub const MAX_LIMIT: u64 = 50;
-pub const QUERY_ARGUMENTS: &[&str] = &["query", "k"];
+/// Largest `limit` the memory tools accept; mirrors the memory domain's own cap
+/// (`memory::types::MAX_LIMIT`). Oversize values are rejected, not clamped.
+pub const MEMORY_MAX_LIMIT: u64 = 100;
+/// Upper bound on the number of ids `memory.forget` accepts per call.
+pub const MEMORY_FORGET_MAX_IDS: usize = 100;
pub const SEARXNG_SEARCH_ARGUMENTS: &[&str] = &["query", "max_results"];
pub const WEB_SEARCH_ARGUMENTS: &[&str] = &["query", "max_results", "provider"];
pub const WEB_ANSWER_ARGUMENTS: &[&str] = &["query", "depth"];
/// Upper bound for `max_results` on the search tools.
pub const SEARCH_MAX_RESULTS: usize = 20;
-pub const TREE_READ_CHUNK_ARGUMENTS: &[&str] = &["chunk_id"];
pub const SUBAGENT_RUN_ARGUMENTS: &[&str] = &["agent_id", "prompt"];
-pub const TREE_BROWSE_ARGUMENTS: &[&str] = &[
- "source_kinds",
- "source_ids",
- "entity_ids",
- "since_ms",
- "until_ms",
- "query",
- "k",
- "offset",
+pub const MEMORY_RECALL_ARGUMENTS: &[&str] = &["question", "filter", "limit"];
+pub const MEMORY_FETCH_ARGUMENTS: &[&str] = &["query", "mode", "filter", "limit", "cursor"];
+pub const MEMORY_LIST_ARGUMENTS: &[&str] = &["filter", "limit", "cursor"];
+pub const MEMORY_LEARN_ARGUMENTS: &[&str] = &["text", "kind", "confidence"];
+pub const MEMORY_FORGET_ARGUMENTS: &[&str] = &["ids"];
+/// Fields of a `MetaFilter` that are plain exact-match strings.
+pub const FILTER_STRING_FIELDS: &[&str] = &[
+ "workspace",
+ "folder",
+ "file_path",
+ "language",
+ "repo",
+ "commit",
+ "url",
+ "thread_id",
+ "agent_id",
];
-pub const TREE_TOP_ENTITIES_ARGUMENTS: &[&str] = &["kind", "k"];
-pub const TREE_LIST_SOURCES_ARGUMENTS: &[&str] = &["user_email_hint"];
-pub const MEMORY_STORE_ARGUMENTS: &[&str] = &["title", "content", "namespace", "tags"];
-pub const MEMORY_NOTE_ARGUMENTS: &[&str] = &["chunk_id", "note_text"];
-pub const TREE_TAG_ARGUMENTS: &[&str] = &["chunk_id", "tags"];
-/// Upper bound on the number of tags `tree.tag` accepts per call.
-/// Matches the "explicit rejection over silent clamping" pattern used
-/// elsewhere in the MCP layer; prevents a misbehaving client from
-/// flooding a chunk's tag-record document with thousands of entries.
-pub const TREE_TAG_MAX_TAGS: usize = 50;
-/// Upper bound on a single tag's character length. Tags are categorical
-/// labels — anything past ~128 chars is almost certainly free-form text
-/// that should be `memory.note` instead, so reject up-front to surface
-/// the misuse rather than silently writing a giant token into the
-/// queryable `tags` index.
-pub const TREE_TAG_MAX_TAG_LENGTH: usize = 128;
+pub const FILTER_FIELDS: &[&str] = &[
+ "workspace",
+ "folder",
+ "file_path",
+ "language",
+ "repo",
+ "commit",
+ "url",
+ "thread_id",
+ "agent_id",
+ "kinds",
+ "sources",
+ "tags_any",
+ "observed_after",
+ "observed_before",
+];
+pub const ITEM_KINDS: &[&str] = &["document", "conversation", "learning"];
+pub const SOURCE_KINDS: &[&str] = &[
+ "folder",
+ "file",
+ "link",
+ "github",
+ "rss",
+ "composio",
+ "conversation",
+ "agent",
+ "import",
+];
+pub const FETCH_MODES: &[&str] = &["keyword", "vector", "hybrid"];
+pub const LEARNING_KINDS: &[&str] = &["preference", "fact", "procedure", "correction", "other"];
#[derive(Debug, Clone)]
pub struct McpToolSpec {