3 ms·
I may be failing to understand the protocol here, but the thing it returns for a weather request is intented to be ingested by an LLM, which then uses that info
by maverwa 2y ago
I may be failing to understand the protocol here, but the thing it returns for a weather request is intented to be ingested by an LLM, which then uses that information to reply to a user, right?
Whats the benefit of adding CSS styling, or even HTML formatting to the output over just a plaintext response? I'd image that adds a lot of unecessary tokens the LM has to grasp?
- ricardobeat 2y agoThe LLM passes the HTML back in their response, translated, so it can be rendered to the user as-is. The tool description is self-explanatory: https://github.com/TuanKiri/weather-mcp-server/blob/master/internal/server/tools/weather.go#L13-L19 https://github.com/TuanKiri/weather-mcp-server/blob/master/i... You could have it respond with JSON, but then the rendering of the weather widget would have to be defined by the consumer instead of the tool server -- now the 'chat' part of your system needs to be aware of all possible content types, how to detect and render them; it's also doable but a different set of trade-offs.
- maverwa 2y agoThanks, I should have read the tool description more carefully.