MCPcopy Index your code
hub / github.com/shareAI-lab/learn-claude-code / assemble_system_prompt

Function assemble_system_prompt

s19_mcp_plugin/code.py:261–270  ·  view source on GitHub ↗
(context: dict)

Source from the content-addressed store, hash-verified

259
260
261def assemble_system_prompt(context: dict) -> str:
262 sections = [PROMPT_SECTIONS["identity"],
263 PROMPT_SECTIONS["tools"],
264 PROMPT_SECTIONS["workspace"]]
265 if context.get("memories"):
266 sections.append(f"Relevant memories:\n{context['memories']}")
267 mcp_names = list(mcp_clients.keys())
268 if mcp_names:
269 sections.append(f"Connected MCP servers: {', '.join(mcp_names)}")
270 return "\n\n".join(sections)
271
272
273# ── Basic Tools ──

Callers 1

agent_loopFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected