Skip to content

Add fetch_web_page tool and implementation#419

Open
GuiZanchetta wants to merge 2 commits into
Ircam-Partiels:neuralyzer/lmstudio-dev1from
GuiZanchetta:lmstudio-dev1-zan
Open

Add fetch_web_page tool and implementation#419
GuiZanchetta wants to merge 2 commits into
Ircam-Partiels:neuralyzer/lmstudio-dev1from
GuiZanchetta:lmstudio-dev1-zan

Conversation

@GuiZanchetta

Copy link
Copy Markdown
Contributor

Introduce a new fetch_web_page tool and implement network fetching support.

  • BinaryData/Neuralyzer/tools_list.json: add fetch_web_page tool schema (url, format, maxLength) and output shape.
  • BinaryData/Neuralyzer/Instructions.md: allow fetching web pages from the internet when external info is required.
  • Source/Application/AnlApplicationNeuralyzerMcp.cpp: add htmlToPlainText helper, performWebFetch function, include , and wire the tool into the MCP dispatcher so network fetches run off the message thread. The implementation validates inputs, supports http/https, text or raw HTML output, truncation, basic entity decoding and stripping of scripts/styles/comments, sets headers and timeouts, follows redirects, and returns structured JSON with error handling.

Introduce a new fetch_web_page tool and implement network fetching support.

- BinaryData/Neuralyzer/tools_list.json: add fetch_web_page tool schema (url, format, maxLength) and output shape.
- BinaryData/Neuralyzer/Instructions.md: allow fetching web pages from the internet when external info is required.
- Source/Application/AnlApplicationNeuralyzerMcp.cpp: add htmlToPlainText helper, performWebFetch function, include <regex>, and wire the tool into the MCP dispatcher so network fetches run off the message thread. The implementation validates inputs, supports http/https, text or raw HTML output, truncation, basic entity decoding and stripping of scripts/styles/comments, sets headers and timeouts, follows redirects, and returns structured JSON with error handling.
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.

1 participant