MCP Interaction Workflow: A Step-by-Step Example
22%
Step 3 - Discovery and Introspection
Now the client needs to discover what the server makes available. The client sends a standard tools/list request to get the list of available tools and their input schemas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}
In plain language, the client is saying:
Please give me the list of tools you have, along with their descriptions and input schemas. I want to know what actions I can ask you to perform later on.
The standard response includes tool names, descriptions, and input schemas. For our air-quality server, the response could look like this:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "get_air_quality",
"description": "Returns current air quality for a given location.",
"inputSchema": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description":Practical MCP with FastMCP & LangChain
Engineering the Agentic ExperienceEnroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!
