crewAIInc / crewAIInc/crewAI

[BUG] LLM().call() doesn't work with Tools

Open
#7,004 5 comments 0 reactions 1 assignee View on GitHub

@Vidit-Ostwal is already working on this.

Since Aug 25, 2026.

bug
Dominant language
Python
Stars
58.8k
Forks
8.5k
Avg merge
1d 15h
Merged PRs (30d)
109

Description

Description

LLM().call() doesn't work with Tools

Steps to Reproduce

code

Expected behavior

I want to use the LLM() class without Agent() for more control over the "messages" (lower level).

Screenshots/Code snippets
import crewai as c
import crewai.flow as cf
import crewai_tools as ct
import logging
from pathlib import Path

logging.basicConfig(level=logging.DEBUG)

llm = c.LLM(model="ollama/my", base_url="http://127.0.0.1:8080")
print(c.__version__)

ROOT = Path(Path(__file__).parent, "_temp").resolve()
ROOT.mkdir(parents=True, exist_ok=True)
fwriter = ct.FileWriterTool(base_dir=str(ROOT))
freader = ct.FileReadTool(base_dir=str(ROOT))

print(llm.call(
    messages=[{"role":"user","content":"Who are you?"}],
    tools=[fwriter, freader],
))
Operating System

Windows 10

Python Version

3.12

crewAI Version

1.15.16

crewAI Tools Version

1.15.16

Virtual Environment

Venv

Evidence

DEBUG:asyncio:Using proactor: IocpProactor
ERROR:root:OpenAI: Error extracting tool info: Tool must be a dictionary
ERROR:root:OpenAI: Tool structure: name='File Writer Tool' description="A tool to write content to a specified file. Accepts filename, content, and optionally a directory path and overwrite flag as input. Writes are confined to the tool's allowed directory; a filename or directory that resolves outside it is rejected." env_vars=[] args_schema=<class 'crewai_tools.tools.file_writer_tool.file_writer_tool.FileWriterToolInput'> result_schema=None description_updated=False cache_function=<function _default_cache_function at 0x000001EB2B7C5F80> result_as_answer=False max_usage_count=None tool_failure_policy=None current_usage_count=0 base_dir='/cw/_temp' encoding='utf-8' tool_type='crewai_tools.tools.file_writer_tool.file_writer_tool.FileWriterTool'
ERROR:root:OpenAI: Error converting tool: Tool must be a dictionary
ERROR:root:OpenAI API call failed: Tool must be a dictionary

Possible Solution

None

Additional context

None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.