Springing into AI - Part 14: MCP Server - Tools Playground ( Sampling )
About In MCP Server, Sampling refers to the process where the server itself may ask LLM on the client side to analyze information it gathered. Through means of system prompts we can instruct LLM from the server side to operate in defined boundaries. A typical example of this can be text summarization where we have our fetched database records and would like to have LLM summarize its observation about it. Project In Hobbits Inc, we will create a dumb hobbit food recipe analyzer tool simulating interaction between MCP Server and the LLM. Since we do not have a MCP Client for it with a LLM, MCP Inspector will be used to simulate real world LLM interaction with ability to add desired content and propagate back to MCP Server where the tool will obtain data and respond back. An architecture overview of our tools playground is shown below: Setup Our project setup encompasses the following: Java: ...