fix: improve tool definitions for web_fetch and get_file_content_by_file_link - #228
Merged
Merged
Conversation
…fetch Signed-off-by: kyteinsky <kyteinsky@gmail.com> Assisted-by: Github Copilot: claude-opus-4-6
also more hardenings of the fetches: - don't fetch folders - limit file/content size to 100kB - limit mimetype to text-like Signed-off-by: kyteinsky <kyteinsky@gmail.com> Assisted-by: Github Copilot: claude-opus-4-6
lukasdotcom
approved these changes
Aug 12, 2026
lukasdotcom
left a comment
Member
There was a problem hiding this comment.
Looks good. For the future files in multimodal agent could just be passed to the model directly (for all kinds of files as there is built in parsing also for text files) instead of downloading it in context agent, as that would also support other file types, but that is a future thing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
also, some hardenings to both the tools:
in the above cases, the metadata of the file/folder is passed on to the agent so the model can make the user aware of it and can take informed steps.
tolerance for web_fetch to allow internal file links and call it properly was also added.
tests with mistral small 24B:
called from a local instance takes the normal web_fetch path:


🤖 AI (if applicable)