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

Function run_read

agents/s07_task_system.py:143–150  ·  view source on GitHub ↗
(path: str, limit: int = None)

Source from the content-addressed store, hash-verified

141 return "Error: Timeout (120s)"
142
143def run_read(path: str, limit: int = None) -> str:
144 try:
145 lines = safe_path(path).read_text().splitlines()
146 if limit and limit < len(lines):
147 lines = lines[:limit] + [f"... ({len(lines) - limit} more)"]
148 return "\n".join(lines)[:50000]
149 except Exception as e:
150 return f"Error: {e}"
151
152def run_write(path: str, content: str) -> str:
153 try:

Callers 1

s07_task_system.pyFile · 0.70

Calls 1

safe_pathFunction · 0.70

Tested by

no test coverage detected