-
Notifications
You must be signed in to change notification settings - Fork 341
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request
Description
Feature Request
I think it would be useful to have some get_resources(...) and get_prompts(...) methods, that similarly to what we do for tools, allow the agents to discover all the features that are available and at their service from the MCP server.
I've seen the resources part is being covered in PR #43, but I think it could be nice to have something similar for the prompts.
Expected Functionality
- A new method
get_promptsthat allows for auto-discovery of prompts similar toget_toolsandget_resources. - This method should return a list of all available prompts from the MCP server, including the name, description, and necessary fields for completion, but not the prompt content itself. This way, the agent can know that there is a prompt available for a specific task or use-case.
Use Case
This feature would make it easier to manage and utilize prompts within the LangChain framework, enhancing the overall user experience and efficiency. For example, an agent could auto-discover available prompts and select the most appropriate one based on the context, without hardcoding specific prompt names.
Examples
# Example usage of get_prompts
prompts = mcp_client.get_prompts()
for prompt in prompts:
print(f"Name: {prompt['name']}")
print(f"Description: {prompt['description']}")
print(f"Fields: {prompt['fields']}")mr-brobot, shivsant, yhdelgado, niklasvm, fab2112 and 10 more
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or request