Skip to content

Conversation

@grantmca
Copy link
Contributor

@grantmca grantmca commented Aug 11, 2025

Add support for merging MCP tool annotations and spec meta field into LangChain metadata.
Meta information is stored under a _meta key to avoid conflicts while preserving annotation behavior.

Key changes:

  • Merge tool.annotations and tool.meta into LangChain metadata
  • Store meta under _meta to prevent conflicts
  • Add tests covering all metadata merge scenarios

Adds metadata merging in convert_mcp_tool_to_langchain_tool to include both
annotations and optional tool.meta under _meta.
@eyurtsev eyurtsev self-assigned this Sep 8, 2025
@eyurtsev eyurtsev changed the title Merge MCP tool annotations and meta into LangChain metadata merge MCP tool annotations and meta into LangChain metadata Sep 9, 2025
@eyurtsev eyurtsev merged commit 3b514f0 into langchain-ai:main Sep 9, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants