Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

mokronos
Copy link

@mokronos mokronos commented Oct 6, 2025

Add the option to print tool calls and their results in the .to_cli() method. Would really help debugging.

@Kludex
Copy link
Member

Kludex commented Oct 7, 2025

I don't think we need to give an option, but the experience should be good.

@Kludex Kludex requested a review from DouweM October 7, 2025 09:41
config_dir: Path | None = None,
deps: AgentDepsT = None,
message_history: list[ModelMessage] | None = None,
show_tool_calls: bool = False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with @Kludex -- we can always show tool calls, and remove the flag.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok nice, just wasn't sure if some people maybe don't want them. I removed the option.

)
elif isinstance(event, FunctionToolResultEvent):
console.print(
Markdown(f'[Tool] {event.result.tool_name!r} returned => {event.result.content}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show a screenshot of what this looks like please?

I wonder if we can get some prettier styling from Rich as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, we probably can. I updated it today a bit, so the status update works correctly and shows when a model is called and when tools are exectuted. Currently it looks like this:

pydantic_ai_model_call

I could involve colors or rich Panels. If you have any preference, please tell me :)

I wasn't sure how to manage long tool results (e.g. whole document parts from retrieval tools) or long tool calls. I just truncated it for now, because it feels cluttered otherwise. On the other hand, this feature (.to_cli()) feels more like just a debugging tool for dev's, which might prefer to just have all the output instead of nice visuals (assuming they are still readable).
I think other cli's manages it by having a keybind for collapsing and expaning long content sections, so that might be an option at some point, although more complex.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it looks a bit too much like logging now, rather than a UI. People definitely use this as a full blown LLM chat client, not just a debugging tool. So having this optional is good, but I'd also want a way to have it display more like in chat apps, showing that the LLM is doing work more than dumping the entire payload. Perhaps we can start with a verbosity flag, and then add keybinding at some future point?

@mokronos mokronos requested a review from DouweM October 15, 2025 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.