Spaces:
Running
Early Tool vs Resource Examples
While defining MCP capabilities, https://huggingface.co/learn/mcp-course/unit1/capabilities, there is a distinction between a tool and a resource. The examples often show something like getting the current weather as a tool, but getting a file is a resource. I know there isn't a hard and fast rule for the difference, but would it make sense to have a tool example that was more obvious why it isn't a resource? There is also the distinction between the tool being called by the model and the resource being called by the host. Are those not considered the same thing when creating an MCP server?
Thank you for the course, it has been very helpful.
My thoughts and confusion exactly !! I just went to delineate between the two as simple vs complex. Pulling a required file is like a resource and doing something complex as creating jira tickets with mcp is tools. But I second that there isnt hard and fast rule for the difference. for the weather example too - getting a weather is reading from the database, would be a resource type.
I can understand the confusion. I would sum it up like this:
- Tools perform actions like call weather API, calculate something, manipulate a file.
- Resources retrieve a source of information, like from a local database or documentation.
There is of course overlap where tools return information, but in general tools are interacting with the outside world and resources are reading from a source.