Skip to main content
Glama

memory_lookup

Search the AIOS knowledge base for relevant memories including past decisions, design constraints, code parameters, and performance data when you need specific context during reasoning.

Instructions

在 AIOS 知识库中主动检索相关记忆(推理中断 / demand paging)。

当你推理时发现需要某类知识但不确定时,调用此工具:
- 上次关于某模块的决策
- 某功能的已知设计约束
- 某段代码的参数格式
- 之前总结的性能数据

Args:
    query: 查询字符串(自然语言或关键词均可)
    top_k: 返回结果数量(默认 5)
    chunk_types: 可选,过滤 chunk 类型(如 ["design_constraint", "decision"])
    project: 可选,指定项目 ID(默认自动推断)

Returns:
    格式化的检索结果,包含 summary 和 content 摘要

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
chunk_typesNo
projectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears full responsibility for behavioral disclosure. It describes the tool as an active retrieval operation with 'reasoning interruption / demand paging' context, implying a read-only action. However, it does not mention any side effects, permission requirements, or rate limits. The description is adequate but could be more detailed about behavioral traits such as whether results are cached or if there are size limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured: a one-line introduction, a bulleted list of usage examples, and clearly labeled Args/Returns sections. Every sentence adds value. It is concise without being overly brief; the examples make it practical. Minor redundancy: the examples could be more concise, but overall it is well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has an output schema (not shown but noted), the description does not need to detail return values, though it provides a brief summary. It covers the essential context: when to use, what parameters to provide, and example queries. The description is complete enough for an AI agent to understand the tool's role and usage, though it could mention that it is a read-only operation explicitly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the tool description must compensate. It explains each parameter: query (natural language or keywords), top_k (default 5), chunk_types (optional filter with examples), and project (optional, auto-inferred). This adds significant meaning beyond the schema, which only provides names and types. The examples for chunk_types are particularly helpful. A small improvement would be to clarify the format of the query string.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: active retrieval of relevant memories from the AIOS knowledge base. It provides concrete examples of queries (e.g., decisions, design constraints, performance data), making the specific resource and action unambiguous. The function is well-distinguished from siblings (list_pinned, memory_stats, pin_memory, unpin_memory) which handle different memory operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use the tool: 'when you need knowledge but are unsure' during reasoning. It gives example scenarios that guide appropriate usage. However, it lacks explicit guidance on when NOT to use it or alternatives, though siblings are distinct. A clear context is provided, but no exclusions are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/soolaugust/0CompactMem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server