Skip to content

Conversation

@mylux
Copy link
Contributor

@mylux mylux commented Oct 17, 2025

Today, when a tool produces an error, tool agent silently drops it and does not return the result to the AppAgent and, therefore, the user cannot send custom messages to punish the AI when the tool was misused.
This PR aims to return the fail to serve as a feedback to the AppAgent and can be passed as a custom message to the LLM or take any other decision based on the error details.

@mylux
Copy link
Contributor Author

mylux commented Oct 17, 2025

I just don´t know a good way to fix the breaking integration tests. It seems to be an issue with the tests themselves, not the application code

@evalstate
Copy link
Owner

Cool - thanks - this was needed.
OK, made a couple of tweaks to the code and tests; I'm going to merge as-is. A failed Tool Use now results in a new User message containing the Error Message. I'll merge - can you double check yourself this behaviour.

@evalstate evalstate merged commit 4143ac5 into evalstate:main Oct 17, 2025
6 checks passed
@mylux
Copy link
Contributor Author

mylux commented Oct 17, 2025

Cool - thanks - this was needed.
OK, made a couple of tweaks to the code and tests; I'm going to merge as-is. A failed Tool Use now results in a new User message containing the Error Message. I'll merge - can you double check yourself this behaviour.

Yes, of course. If you could create a new tag it would be helpful, as my environment is set to use uvx to install the latest version by default

@evalstate
Copy link
Owner

I'm releasing now (just completing the e2e suite before pushing the button).

@evalstate
Copy link
Owner

0.3.15 is on pypi now including this PR. This I think is relevant too: modelcontextprotocol/modelcontextprotocol#1303 likely to be included in spec.

for content in tool_result.content
]
if tool_result_contents:
if result.content is None:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By Looking at this, I imagine this is line is unnecessary, right?

@mylux
Copy link
Contributor Author

mylux commented Oct 17, 2025

I'm releasing now (just completing the e2e suite before pushing the button).

Great, will test this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants