Skip to content

fix: improve tool definitions for web_fetch and get_file_content_by_file_link - #228

Merged
kyteinsky merged 2 commits into
mainfrom
fix/disambiguate-nc-link-and-web-fetch
Aug 13, 2026
Merged

fix: improve tool definitions for web_fetch and get_file_content_by_file_link#228
kyteinsky merged 2 commits into
mainfrom
fix/disambiguate-nc-link-and-web-fetch

Conversation

@kyteinsky

@kyteinsky kyteinsky commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

also, some hardenings to both the tools:

  • don't fetch folders
  • limit file/content size to 100kB
  • limit mimetype to text-like

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:

image image image

called from a local instance takes the normal web_fetch path:
image
image

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

…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 lukasdotcom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@kyteinsky
kyteinsky merged commit c36c0d2 into main Aug 13, 2026
5 of 6 checks passed
@kyteinsky
kyteinsky deleted the fix/disambiguate-nc-link-and-web-fetch branch August 13, 2026 12:48
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