Skip to content

Commit 4f2198f

Browse files
authored
Merge branch 'main' into docs/add-langchain-integration-readme
2 parents 33fd801 + 8a87462 commit 4f2198f

File tree

10 files changed

+49
-30
lines changed

10 files changed

+49
-30
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.0.4"
2+
".": "0.3.0"
33
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## [0.3.0](https://github.com/StackOneHQ/stackone-ai-python/compare/stackone-ai-v0.0.4...stackone-ai-v0.3.0) (2025-08-19)
4+
5+
6+
### Features
7+
8+
* add CLAUDE.md for Claude Code guidance ([#15](https://github.com/StackOneHQ/stackone-ai-python/issues/15)) ([ac9fe98](https://github.com/StackOneHQ/stackone-ai-python/commit/ac9fe9857f44c19394654dfcbe23fecc5cf9fbb0))
9+
* bring Python SDK to feature parity with Node SDK ([#17](https://github.com/StackOneHQ/stackone-ai-python/issues/17)) ([8b6de99](https://github.com/StackOneHQ/stackone-ai-python/commit/8b6de99184227cb7f1580964dc3eae14f8f60fc1))
10+
* remove automatic STACKONE_ACCOUNT_ID environment variable loading ([#23](https://github.com/StackOneHQ/stackone-ai-python/issues/23)) ([aa0aaf6](https://github.com/StackOneHQ/stackone-ai-python/commit/aa0aaf6d6bf528f8e29def9b008db23cf94b97c7))
11+
* simplify meta tool function names to match Node SDK ([#19](https://github.com/StackOneHQ/stackone-ai-python/issues/19)) ([4572609](https://github.com/StackOneHQ/stackone-ai-python/commit/4572609a9b85a88fc3067be12f821ec0bc54e769))
12+
13+
14+
### Miscellaneous Chores
15+
16+
* release 0.3.0 ([#24](https://github.com/StackOneHQ/stackone-ai-python/issues/24)) ([beea911](https://github.com/StackOneHQ/stackone-ai-python/commit/beea91165ed2ba3eb5f5ad6ca8656344561b0b43))
17+
318
## [0.0.4](https://github.com/StackOneHQ/stackone-ai-python/compare/stackone-ai-v0.0.3...stackone-ai-v0.0.4) (2025-03-05)
419

520

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ tools = StackOneToolSet(include_tools=["hris_*", "!hris_create_*"])
7979
# Uses environment variables or direct configuration
8080
toolset = StackOneToolSet(
8181
api_key="your-api-key", # or STACKONE_API_KEY env var
82-
account_id="optional-id" # or STACKONE_ACCOUNT_ID env var
82+
account_id="optional-id" # explicit account ID required
8383
)
8484
```
8585

examples/meta_tools_example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def example_meta_tools_basic():
3131
meta_tools = all_tools.meta_tools()
3232

3333
# Get the filter tool to search for relevant tools
34-
filter_tool = meta_tools.get_tool("meta_filter_relevant_tools")
34+
filter_tool = meta_tools.get_tool("meta_search_tools")
3535
if filter_tool:
3636
# Search for employee management tools
3737
result = filter_tool.call(query="manage employees create update list", limit=5, minScore=0.0)
@@ -55,7 +55,7 @@ def example_meta_tools_with_execution():
5555
meta_tools = all_tools.meta_tools()
5656

5757
# Step 1: Search for relevant tools
58-
filter_tool = meta_tools.get_tool("meta_filter_relevant_tools")
58+
filter_tool = meta_tools.get_tool("meta_search_tools")
5959
execute_tool = meta_tools.get_tool("meta_execute_tool")
6060

6161
if filter_tool and execute_tool:
@@ -138,7 +138,7 @@ def example_with_openai():
138138
messages=[
139139
{
140140
"role": "system",
141-
"content": "You are an HR assistant. Use meta_filter_relevant_tools to find appropriate tools, then meta_execute_tool to execute them.",
141+
"content": "You are an HR assistant. Use meta_search_tools to find appropriate tools, then meta_execute_tool to execute them.",
142142
},
143143
{"role": "user", "content": "Can you help me find tools for managing employee records?"},
144144
],

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "stackone-ai"
3-
version = "0.0.4"
3+
version = "0.3.0"
44
description = "agents performing actions on your SaaS"
55
readme = "README.md"
66
requires-python = ">=3.11"

stackone_ai/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
from .toolset import StackOneToolSet
55

66
__all__ = ["StackOneToolSet", "StackOneTool", "Tools"]
7-
__version__ = "0.0.4"
7+
__version__ = "0.3.0"

stackone_ai/meta_tools.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
class MetaToolSearchResult(BaseModel):
19-
"""Result from meta_filter_relevant_tools"""
19+
"""Result from meta_search_tools"""
2020

2121
name: str
2222
description: str
@@ -106,16 +106,16 @@ def search(self, query: str, limit: int = 5, min_score: float = 0.0) -> list[Met
106106
return search_results
107107

108108

109-
def create_meta_filter_tool(index: ToolIndex) -> StackOneTool:
110-
"""Create the meta_filter_relevant_tools tool
109+
def create_meta_search_tools(index: ToolIndex) -> StackOneTool:
110+
"""Create the meta_search_tools tool
111111
112112
Args:
113113
index: Tool search index
114114
115115
Returns:
116-
Meta tool for filtering relevant tools
116+
Meta tool for searching relevant tools
117117
"""
118-
name = "meta_filter_relevant_tools"
118+
name = "meta_search_tools"
119119
description = (
120120
"Searches for relevant tools based on a natural language query. "
121121
"This tool should be called first to discover available tools before executing them."
@@ -180,8 +180,8 @@ def execute_filter(arguments: str | JsonDict | None = None) -> JsonDict:
180180
)
181181

182182
# Create a wrapper class that delegates execute to our custom function
183-
class MetaFilterTool(StackOneTool):
184-
"""Meta tool for filtering relevant tools"""
183+
class MetaSearchTool(StackOneTool):
184+
"""Meta tool for searching relevant tools"""
185185

186186
def __init__(self) -> None:
187187
super().__init__(
@@ -195,7 +195,7 @@ def __init__(self) -> None:
195195
def execute(self, arguments: str | JsonDict | None = None) -> JsonDict:
196196
return execute_filter(arguments)
197197

198-
return MetaFilterTool()
198+
return MetaSearchTool()
199199

200200

201201
def create_meta_execute_tool(tools_collection: Tools) -> StackOneTool:
@@ -210,7 +210,7 @@ def create_meta_execute_tool(tools_collection: Tools) -> StackOneTool:
210210
name = "meta_execute_tool"
211211
description = (
212212
"Executes a tool by name with the provided parameters. "
213-
"Use this after discovering tools with meta_filter_relevant_tools."
213+
"Use this after discovering tools with meta_search_tools."
214214
)
215215

216216
parameters = ToolParameters(

stackone_ai/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,22 +486,22 @@ def meta_tools(self) -> "Tools":
486486
Meta tools enable dynamic tool discovery and execution based on natural language queries.
487487
488488
Returns:
489-
Tools collection containing meta_filter_relevant_tools and meta_execute_tool
489+
Tools collection containing meta_search_tools and meta_execute_tool
490490
491491
Note:
492492
This feature is in beta and may change in future versions
493493
"""
494494
from stackone_ai.meta_tools import (
495495
ToolIndex,
496496
create_meta_execute_tool,
497-
create_meta_filter_tool,
497+
create_meta_search_tools,
498498
)
499499

500500
# Create search index
501501
index = ToolIndex(self.tools)
502502

503503
# Create meta tools
504-
filter_tool = create_meta_filter_tool(index)
504+
filter_tool = create_meta_search_tools(index)
505505
execute_tool = create_meta_execute_tool(self)
506506

507507
return Tools([filter_tool, execute_tool])

stackone_ai/toolset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(
4242
4343
Args:
4444
api_key: Optional API key. If not provided, will try to get from STACKONE_API_KEY env var
45-
account_id: Optional account ID. If not provided, will try to get from STACKONE_ACCOUNT_ID env var
45+
account_id: Optional account ID
4646
base_url: Optional base URL override for API requests. If not provided, uses the URL from the OAS
4747
4848
Raises:
@@ -55,7 +55,7 @@ def __init__(
5555
"STACKONE_API_KEY environment variable"
5656
)
5757
self.api_key: str = api_key_value
58-
self.account_id = account_id or os.getenv("STACKONE_ACCOUNT_ID")
58+
self.account_id = account_id
5959
self.base_url = base_url
6060

6161
def _parse_parameters(self, parameters: list[dict[str, Any]]) -> dict[str, dict[str, str]]:

tests/test_meta_tools.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
import responses
55

66
from stackone_ai import StackOneTool, Tools
7-
from stackone_ai.meta_tools import ToolIndex, create_meta_execute_tool, create_meta_filter_tool
7+
from stackone_ai.meta_tools import (
8+
ToolIndex,
9+
create_meta_execute_tool,
10+
create_meta_search_tools,
11+
)
812
from stackone_ai.models import ExecuteConfig, ToolParameters
913

1014

@@ -128,21 +132,21 @@ def test_search_limit(self, sample_tools):
128132
assert len(results) <= 3
129133

130134

131-
class TestMetaFilterTool:
132-
"""Test the meta_filter_relevant_tools functionality"""
135+
class TestMetaSearchTool:
136+
"""Test the meta_search_tools functionality"""
133137

134138
def test_filter_tool_creation(self, sample_tools):
135139
"""Test creating the filter tool"""
136140
index = ToolIndex(sample_tools)
137-
filter_tool = create_meta_filter_tool(index)
141+
filter_tool = create_meta_search_tools(index)
138142

139-
assert filter_tool.name == "meta_filter_relevant_tools"
143+
assert filter_tool.name == "meta_search_tools"
140144
assert "natural language query" in filter_tool.description.lower()
141145

142146
def test_filter_tool_execute(self, sample_tools):
143147
"""Test executing the filter tool"""
144148
index = ToolIndex(sample_tools)
145-
filter_tool = create_meta_filter_tool(index)
149+
filter_tool = create_meta_search_tools(index)
146150

147151
# Execute with a query
148152
result = filter_tool.execute(
@@ -167,7 +171,7 @@ def test_filter_tool_execute(self, sample_tools):
167171
def test_filter_tool_call(self, sample_tools):
168172
"""Test calling the filter tool with call method"""
169173
index = ToolIndex(sample_tools)
170-
filter_tool = create_meta_filter_tool(index)
174+
filter_tool = create_meta_search_tools(index)
171175

172176
# Call with kwargs
173177
result = filter_tool.call(query="candidate", limit=2)
@@ -237,15 +241,15 @@ def test_meta_tools_creation(self, tools_collection):
237241

238242
# Check tool names
239243
tool_names = [tool.name for tool in meta_tools.tools]
240-
assert "meta_filter_relevant_tools" in tool_names
244+
assert "meta_search_tools" in tool_names
241245
assert "meta_execute_tool" in tool_names
242246

243247
def test_meta_tools_functionality(self, tools_collection):
244248
"""Test that meta tools work correctly"""
245249
meta_tools = tools_collection.meta_tools()
246250

247251
# Get the filter tool
248-
filter_tool = meta_tools.get_tool("meta_filter_relevant_tools")
252+
filter_tool = meta_tools.get_tool("meta_search_tools")
249253
assert filter_tool is not None
250254

251255
# Search for tools

0 commit comments

Comments
 (0)