MCPcopy Index your code
hub / github.com/google/adk-python / read_file

Function read_file

contributing/samples/adk_team/adk_pr_triaging_agent/utils.py:74–81  ·  view source on GitHub ↗

Read the content of the given file.

(file_path: str)

Source from the content-addressed store, hash-verified

72
73
74def read_file(file_path: str) -> str:
75 """Read the content of the given file."""
76 try:
77 with open(file_path, "r") as f:
78 return f.read()
79 except FileNotFoundError:
80 print(f"Error: File not found: {file_path}.")
81 return ""
82
83
84def parse_number_string(number_str: str | None, default_value: int = 0) -> int:

Callers 1

agent.pyFile · 0.90

Calls 2

openFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected