How to use MCP resources with agents and LLMs? #1711
-
Hi, I’m exploring MCP resources and how they can be integrated with agents and LLMs. I have a few questions and would appreciate guidance or examples: 1. Resource selection similar to tools: Can we implement a similar mechanism for MCP resources, where a list of 3–4 resources is evaluated and the LLM chooses the most relevant one? What metadata or description exists for MCP resources that can help an agent/LLM make this selection? 2. Resource usage as tools: Is it possible to “use” resources in the same way as tools, where the agent dynamically selects and invokes the resource? If yes, are there examples or a recommended approach for proving this works in an implementation? 3. Agent integration: How does an agent work with MCP resources? If the agent cannot directly consume resources in a standardized way, how can MCP resources still be useful to the agent or LLM for answering queries? 4. Implementation guidance: Any code samples or references for dynamically selecting resources based on a query using an LLM or agent would be very helpful. Thank you! @jlowin I’m exploring MCP resources and their integration with agents/LLMs. I have a few questions about usage of resources. I’d really appreciate any guidance, examples, or pointers you could share. Thank you for your time! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Generally, in contemporary clients resources are left up to human users to add to context. However, a more interesting practice is to introduce tools to accomplish what you described. This lets the agent make decisions about resources independently. |
Beta Was this translation helpful? Give feedback.
Generally, in contemporary clients resources are left up to human users to add to context. However, a more interesting practice is to introduce tools to accomplish what you described. This lets the agent make decisions about resources independently.