[PR #2882] [MERGED] feat: clarify tool return value behaviors #2968

Closed
opened 2026-06-05 18:20:33 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/2882
Author: @npentrel
Created: 3/3/2026
Status: Merged
Merged: 3/5/2026
Merged by: @npentrel

Base: mainHead: open-swe/a40fd5ab-39b2-8c75-66e6-5b452cecc37f


📝 Commits (3)

  • 8932ee3 Clarify tool return type behavior so users can choose the right return pattern with confidence.
  • f2ee0df Move to separate snippets
  • 9cb59dc Merge branch 'main' into open-swe/a40fd5ab-39b2-8c75-66e6-5b452cecc37f

📊 Changes

1 file changed (+89 additions, -0 deletions)

View changed files

📝 src/oss/langchain/tools.mdx (+89 -0)

📄 Description

Description primary PR content:

This PR improves LangChain docs clarity around tool return types, which has been a recurring source of confusion for users.

Changes:

  • Added a new Tool return values section to src/oss/langchain/tools.mdx
  • Documented behavior and recommended usage for the three key Python tool return cases:
    • returning a string
    • returning an object (dict)
    • returning a Command

AI agent assisted in drafting and applying these documentation changes.

https://langchain-5e9cc07a-preview-opensw-1772551886-3bfcb30.mintlify.app/oss/python/langchain/tools#tool-return-values


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/2882 **Author:** [@npentrel](https://github.com/npentrel) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/5/2026 **Merged by:** [@npentrel](https://github.com/npentrel) **Base:** `main` ← **Head:** `open-swe/a40fd5ab-39b2-8c75-66e6-5b452cecc37f` --- ### 📝 Commits (3) - [`8932ee3`](https://github.com/langchain-ai/docs/commit/8932ee327ae54a22371aea342527f0db44851a50) Clarify tool return type behavior so users can choose the right return pattern with confidence. - [`f2ee0df`](https://github.com/langchain-ai/docs/commit/f2ee0dfa18a8e4e62d6a87300418892a1aeec1e4) Move to separate snippets - [`9cb59dc`](https://github.com/langchain-ai/docs/commit/9cb59dc8ea45e6e0b8a307b2f03628ae0836a27c) Merge branch 'main' into open-swe/a40fd5ab-39b2-8c75-66e6-5b452cecc37f ### 📊 Changes **1 file changed** (+89 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/oss/langchain/tools.mdx` (+89 -0) </details> ### 📄 Description ## Description primary PR content: This PR improves LangChain docs clarity around tool return types, which has been a recurring source of confusion for users. Changes: - Added a new **Tool return values** section to `src/oss/langchain/tools.mdx` - Documented behavior and recommended usage for the three key Python tool return cases: - returning a string - returning an object (`dict`) - returning a `Command` AI agent assisted in drafting and applying these documentation changes. https://langchain-5e9cc07a-preview-opensw-1772551886-3bfcb30.mintlify.app/oss/python/langchain/tools#tool-return-values --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:20:33 -04:00
yindo closed this issue 2026-06-05 18:20:33 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2968