MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / inspect_fallback_tool

Function inspect_fallback_tool

scripts/age90_file_input_runner.py:81–95  ·  view source on GitHub ↗

Show what read_file returns if a PDF falls back to the tool path.

(pdf_path: Path)

Source from the content-addressed store, hash-verified

79
80
81def inspect_fallback_tool(pdf_path: Path) -> None:
82 """Show what read_file returns if a PDF falls back to the tool path."""
83 from crewai.tools.agent_tools.read_file_tool import ReadFileTool
84
85 tool = ReadFileTool()
86 tool.set_files({"document": PDFFile(source=str(pdf_path))})
87 result = tool._run("document")
88
89 print("\n== read_file Fallback ==")
90 print(f"Returned {len(result)} chars")
91 print(f"Contains Base64 marker: {'YES' if 'Base64:' in result else 'NO'}")
92 print("\nPreview:")
93 print(result[:1200])
94 if len(result) > 1200:
95 print("...")
96
97
98def run_crew_kickoff(

Callers 1

mainFunction · 0.85

Calls 4

set_filesMethod · 0.95
_runMethod · 0.95
ReadFileToolClass · 0.90
PDFFileClass · 0.90

Tested by

no test coverage detected