MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / query_wiki

Function query_wiki

openkb/skill/creator.py:117–132  ·  view source on GitHub ↗

Semantic search over the wiki — narrow follow-ups only. This is a nested LLM call: each invocation spawns a separate query agent with its own turn budget. Use ONLY when you have a specific sub-question that direct file reads can't easily answer (e.g. "what does the b

(question: str)

Source from the content-addressed store, hash-verified

115
116 @function_tool
117 async def query_wiki(question: str) -> str:
118 """Semantic search over the wiki — narrow follow-ups only.
119
120 This is a nested LLM call: each invocation spawns a separate
121 query agent with its own turn budget. Use ONLY when you have a
122 specific sub-question that direct file reads can't easily answer
123 (e.g. "what does the book say about X across multiple
124 chapters?"). For primary traversal, use list/read/get_page_content
125 instead — they are cheaper and give you the raw text, not
126 another LLM's summary.
127 """
128 # Lazy import to avoid a circular dependency at module load time.
129 from openkb.agent.query import run_query
130
131 kb_dir = Path(wiki_root).parent
132 return await run_query(question, kb_dir, model, stream=False)
133
134 @function_tool
135 def write_skill_file(path: str, content: str) -> str:

Callers

nothing calls this directly

Calls 1

run_queryFunction · 0.90

Tested by

no test coverage detected