Skip to main content
Glama

ask_knowledge_base

Find precise answers in your knowledge base by asking questions in natural language. Leverages semantic search, knowledge graphs, and LLM generation to summarize and extract information from full documents.

Instructions

向知识库提问,使用 IMA 完整的 RAG 搜索引擎(语义检索 + 知识图谱 + LLM 生成回答)。这是与 IMA 网页端完全一致的问答能力,能深入检索文档全文内容。需要配置 IMA_COOKIE 环境变量(从浏览器开发者工具获取)。⚠️ knowledge_base_id 请使用 list_knowledge_bases_full 返回的 cookie_knowledge_base_id 字段。典型用法:'上周会议的主要结论是什么?'、'总结知识库里关于 X 的所有内容'、'这些文档中的关键数据是什么?'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYes要向知识库提问的问题。支持自然语言,越长越具体越好。
knowledge_base_idYes知识库 ID,请使用 list_knowledge_bases_full 返回的 cookie_knowledge_base_id 字段值。
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the IMA_COOKIE environment variable requirement, the RAG-based behavior, deep full-text search, and the specific ID field warning. It does not describe return format or failure modes, but it meaningfully adds context beyond the input schema.

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 front-loaded with a clear purpose statement, followed by auth requirement, a warning about the ID, and example queries. Each sentence adds value, though there is minor redundancy with the web-interface equivalence and full-text mention. Overall well-structured for its length.

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 the absence of annotations and output schema, the description covers essential operational needs: tool purpose, required IMA_COOKIE, correct knowledge_base_id sourcing, and example questions. It stops short of describing output format or error cases, but for selecting and invoking the tool, it is sufficiently complete.

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

Parameters3/5

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

The input schema already provides 100% coverage with descriptions for both parameters, including the instruction to use cookie_knowledge_base_id. The description adds typical usage examples (e.g., 'what were the main conclusions of last week's meeting?'), which slightly enrich the question parameter's semantics, but the core meaning is already in the schema. Baseline 3 is appropriate.

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 it asks questions to a knowledge base using IMA's RAG search engine (semantic search + knowledge graph + LLM), and differentiates itself from siblings like list_knowledge_bases_full (listing) and get_note_content (retrieving notes) by focusing on natural-language question answering over full document text.

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?

It provides clear context: same Q&A capability as the web interface and typical usage examples. It also instructs using cookie_knowledge_base_id from list_knowledge_bases_full, which is a useful alternative reference. However, it does not explicitly state when not to use this tool vs other retrieval tools.

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/qqpp13465/ima-mcp-server'

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