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

Function _format_skill_list

openkb/agent/query.py:232–243  ·  view source on GitHub ↗

Render the skill catalog as a compact text block for the agent.

(skills: list[dict[str, str]])

Source from the content-addressed store, hash-verified

230
231
232def _format_skill_list(skills: list[dict[str, str]]) -> str:
233 """Render the skill catalog as a compact text block for the agent."""
234 if not skills:
235 return "No skills installed."
236 lines = [f"{len(skills)} skill(s) available:\n"]
237 for s in skills:
238 lines.append(f"- {s['name']}")
239 # Indent description; keep it one paragraph so the agent reads it fast.
240 desc = " ".join(s["description"].split())
241 lines.append(f" {desc}")
242 lines.append("\nTo use a skill, call read_skill(name) and follow its instructions.")
243 return "\n".join(lines)
244
245
246async def run_query(

Callers 1

build_chat_agentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected