[PR #2342] Add tool registry SDK methods (closes LSPE-365) #2256

Open
opened 2026-02-15 23:17:07 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langsmith-sdk/pull/2342
Author: @bentanny
Created: 2/4/2026
Status: 🔄 Open

Base: mainHead: tannyhill/tools


📝 Commits (10+)

  • e16dc5c feat(python): add tool registry SDK methods
  • d0022a7 style: fix ruff formatting
  • 4022751 fix: update tool registry endpoints to /v1/platform/tools
  • 9266af9 fix: resolve CI lint and test failures
  • f2e277a chore: sync workflow action versions with main
  • a6bef57 fix: revert actions/cache to v4 for benchmark compatibility
  • b7f7910 Merge remote-tracking branch 'origin/main' into pr-2342
  • 629edeb fix: make benchmark cache miss non-fatal
  • 80a2e8a fix: use assert_any_call in test_env_var_ttl for robustness
  • 51cc293 Merge branch 'main' into tannyhill/tools

📊 Changes

4 files changed (+298 additions, -7 deletions)

View changed files

📝 .github/workflows/py-bench.yml (+14 -5)
📝 python/langsmith/client.py (+211 -0)
📝 python/langsmith/schemas.py (+71 -0)
📝 python/tests/unit_tests/test_otel_exporter.py (+2 -2)

📄 Description

Summary

Adds SDK methods for creating, listing, getting, updating, and deleting tools. This will require additional work on the backend of langchain-plus (in progress at ) as these methods are calling APIs that are still in prog. This enables framework-agnostic tool management via the Python SDK, allowing users to define tool schemas (name, description, parameters) without requiring LangChain dependencies.

Why this approach?

  • Framework agnostic: Uses plain dict[str, Any] for JSON Schema parameters, matching existing patterns like inputs_schema/outputs_schema in create_dataset()
  • Follows existing SDK patterns: Method signatures and docstrings mirror create_prompt(), list_prompts(), etc.
  • Slug-based identification: Uses slugs (URL-safe identifiers) similar to Braintrust's approach for human-readable tool references

Test Plan

  • Backend API endpoints (/tools, /tools/{slug}) need to be implemented in langchainplus-1 before testing
  • Manual testing with backend once available
  • Unit tests for schema validation
  • Integration tests for CRUD operations

🔄 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/langsmith-sdk/pull/2342 **Author:** [@bentanny](https://github.com/bentanny) **Created:** 2/4/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `tannyhill/tools` --- ### 📝 Commits (10+) - [`e16dc5c`](https://github.com/langchain-ai/langsmith-sdk/commit/e16dc5c32d9dabbcf69dca651749e517bca23a4c) feat(python): add tool registry SDK methods - [`d0022a7`](https://github.com/langchain-ai/langsmith-sdk/commit/d0022a7bfe3c487ac5b88f59587309206ac6551c) style: fix ruff formatting - [`4022751`](https://github.com/langchain-ai/langsmith-sdk/commit/40227515f3d43b221f9afb3c8534314d6dd2c744) fix: update tool registry endpoints to /v1/platform/tools - [`9266af9`](https://github.com/langchain-ai/langsmith-sdk/commit/9266af968970095cf3adc37efb88d9aaa2610ebe) fix: resolve CI lint and test failures - [`f2e277a`](https://github.com/langchain-ai/langsmith-sdk/commit/f2e277a31e796a685c52f480dea4b1e1a93659b9) chore: sync workflow action versions with main - [`a6bef57`](https://github.com/langchain-ai/langsmith-sdk/commit/a6bef57a2079f544ab04a82a3b5eee40742db5d1) fix: revert actions/cache to v4 for benchmark compatibility - [`b7f7910`](https://github.com/langchain-ai/langsmith-sdk/commit/b7f79102df1db1ec537dd2416a27cc688ad2ad10) Merge remote-tracking branch 'origin/main' into pr-2342 - [`629edeb`](https://github.com/langchain-ai/langsmith-sdk/commit/629edebc2e9b3bd192920aab39ed45437430bc51) fix: make benchmark cache miss non-fatal - [`80a2e8a`](https://github.com/langchain-ai/langsmith-sdk/commit/80a2e8ae95636a9de0f3e0f3b43546d7c1527a90) fix: use assert_any_call in test_env_var_ttl for robustness - [`51cc293`](https://github.com/langchain-ai/langsmith-sdk/commit/51cc2932e19f0e04e856a57d6f49e2002c41c163) Merge branch 'main' into tannyhill/tools ### 📊 Changes **4 files changed** (+298 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/py-bench.yml` (+14 -5) 📝 `python/langsmith/client.py` (+211 -0) 📝 `python/langsmith/schemas.py` (+71 -0) 📝 `python/tests/unit_tests/test_otel_exporter.py` (+2 -2) </details> ### 📄 Description ## Summary Adds SDK methods for creating, listing, getting, updating, and deleting tools. This will require additional work on the backend of langchain-plus (in progress at [)](https://github.com/langchain-ai/langchainplus/pull/16898) as these methods are calling APIs that are still in prog. This enables framework-agnostic tool management via the Python SDK, allowing users to define tool schemas (name, description, parameters) without requiring LangChain dependencies. ## Why this approach? - **Framework agnostic**: Uses plain `dict[str, Any]` for JSON Schema parameters, matching existing patterns like `inputs_schema`/`outputs_schema` in `create_dataset()` - **Follows existing SDK patterns**: Method signatures and docstrings mirror `create_prompt()`, `list_prompts()`, etc. - **Slug-based identification**: Uses slugs (URL-safe identifiers) similar to Braintrust's approach for human-readable tool references ## Test Plan - [ ] Backend API endpoints (`/tools`, `/tools/{slug}`) need to be implemented in langchainplus-1 before testing - [ ] Manual testing with backend once available - [x] Unit tests for schema validation - [x] Integration tests for CRUD operations --- <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-02-15 23:17:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langsmith-sdk#2256