Conversation
…s only
Remove all deprecated OpenAPI Specification (OAS) based tool generation
and migrate exclusively to the MCP-based fetch_tools() API.
BREAKING CHANGES:
- get_tools() method removed from StackOneToolSet
- get_tool() method removed from StackOneToolSet
- OpenAPI spec parser and loader removed
- Bundled OAS JSON files removed (~1.5MB)
- Python 3.10+ now required for fetch_tools()
Deleted:
- stackone_ai/oas/ directory (8 JSON spec files)
- stackone_ai/specs/ directory (parser.py, loader.py)
- tests/test_parser.py and related snapshots
- examples/available_tools.py, custom_base_url.py, error_handling.py
Modified:
- StackOneToolSet: now only exposes fetch_tools()
- stackone_ai/constants.py: removed OAS_DIR constant
- stackone_ai/server.py: updated to use fetch_tools()
- All examples updated to use fetch_tools()
- Tests updated for new API
- README.md: updated documentation with migration guide
Migration path:
Before: toolset.get_tools("hris_*", account_id="acc-123")
After: toolset.fetch_tools(actions=["hris_*"], account_ids=["acc-123"])
This aligns the Python SDK with the Node SDK architecture (PR #148),
removing maintenance burden of bundled OAS specs and enabling
dynamic tool discovery via MCP.
There was a problem hiding this comment.
Pull request overview
This PR introduces a breaking change by removing the deprecated OpenAPI Specification (OAS)-based tool generation system and migrating exclusively to the MCP-based fetch_tools() API. This aligns the Python SDK with the Node SDK implementation and removes approximately 1.5MB of bundled OAS JSON files.
Key changes include:
- Complete removal of OAS-based tool loading infrastructure (specs, parser, loader)
- Removal of
get_tools()andget_tool()methods fromStackOneToolSet - Migration of all examples and tests to use
fetch_tools()API - Updated MCP server implementation to use the new API
Reviewed changes
Copilot reviewed 28 out of 37 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
stackone_ai/toolset.py |
Removed deprecated get_tools(), get_tool(), and _parse_parameters() methods; removed unused imports |
stackone_ai/specs/parser.py |
Deleted entire OpenAPI parser implementation (231 lines) |
stackone_ai/specs/loader.py |
Deleted OAS spec loader (20 lines) |
stackone_ai/constants.py |
Removed OAS_DIR constant; fixed "optimized" spelling to British English |
stackone_ai/server.py |
Updated to use fetch_tools() instead of deprecated methods |
tests/test_toolset.py |
Removed all OAS-based tests, added new filter matching tests |
tests/test_parser.py |
Deleted entire parser test file (731 lines) |
tests/test_feedback.py |
Updated to use create_feedback_tool() directly, added skip marker |
examples/stackone_account_ids.py |
Updated example to use fetch_tools() with proper parameter names |
examples/test_examples.py |
Updated dependency requirements and removed mock responses |
uv.lock |
Version bump to 0.3.4 |
| Multiple OAS JSON files | Deleted all bundled OpenAPI specification files |
| Multiple snapshot files | Deleted all parser test snapshots |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| def crewai_integration(): | ||
| toolset = StackOneToolSet() | ||
| tools = toolset.get_tools("hris_*", account_id=account_id) | ||
| tools = toolset.fetch_tools(actions=["hris_*"], account_ids=[account_id]) |
There was a problem hiding this comment.
I don't think this hris_ example is useful anymore as we dont prefix with categories. Actions are like this list_workers so maybe as an example *_workers is better or *list_*
(and that's the case for everywhere we mention a category, eg. hris, ats etc.
There was a problem hiding this comment.
yeah i'll fix it later!!
Summary
Remove all deprecated OpenAPI Specification (OAS) based tool generation and migrate exclusively to the MCP-based
fetch_tools()API.This PR mirrors the changes made in the Node SDK: StackOneHQ/stackone-ai-node#148
Breaking Changes
get_tools()method removed fromStackOneToolSetget_tool()method removed fromStackOneToolSetfetch_tools()Changes
Deleted:
stackone_ai/oas/directory (8 JSON spec files)stackone_ai/specs/directory (parser.py, loader.py)tests/test_parser.pyand related snapshotsexamples/available_tools.py,custom_base_url.py,error_handling.pyModified:
StackOneToolSet- now only exposesfetch_tools()stackone_ai/constants.py- removedOAS_DIRconstantstackone_ai/server.py- updated to usefetch_tools()fetch_tools()README.md- updated documentation with migration guideMigration
Before:
After:
Test plan
Summary by cubic
Removed deprecated OAS-based tool generation and moved the SDK to MCP-backed fetch_tools() only. This is a breaking change that simplifies the API and enables dynamic tool discovery.
Refactors
Migration
Written for commit 72e0940. Summary will update automatically on new commits.