@@ -44,34 +44,29 @@ make mcp-inspector # Run MCP server inspector for debugging
4444
45451 . ** StackOneToolSet** (` stackone_ai/toolset.py ` ): Main entry point
4646 - Handles authentication (API key + optional account ID)
47- - Manages tool loading with glob pattern filtering
47+ - Fetches tools dynamically via MCP endpoint
4848 - Provides format converters for OpenAI/LangChain
4949
50502 . ** Models** (` stackone_ai/models.py ` ): Data structures
5151 - ` StackOneTool ` : Base class with execution logic
5252 - ` Tools ` : Container for managing multiple tools
5353 - Format converters for different AI frameworks
5454
55- 3 . ** OpenAPI Parser** (` stackone_ai/specs/parser.py ` ): Spec conversion
56- - Converts OpenAPI specs to tool definitions
57- - Handles file upload detection (` format: binary ` → ` type: file ` )
58- - Resolves schema references
59-
60- 4 . ** MCP Server** (` stackone_ai/server.py ` ): Protocol implementation
55+ 3 . ** MCP Server** (` stackone_ai/server.py ` ): Protocol implementation
6156 - Async tool execution
6257 - CLI interface via ` stackmcp ` command
6358
64- ### OpenAPI Specifications
65-
66- All tool definitions are generated from OpenAPI specs in ` stackone_ai/oas/ ` :
67- - ` core.json ` , ` ats.json ` , ` crm.json ` , ` documents.json ` , ` hris.json ` , ` iam.json ` , ` lms.json ` , ` marketing.json `
68-
6959## Key Development Patterns
7060
71- ### Tool Filtering
61+ ### Tool Fetching
7262``` python
73- # Use glob patterns for tool selection
74- tools = StackOneToolSet(include_tools = [" hris_*" , " !hris_create_*" ])
63+ # Fetch tools dynamically from MCP endpoint
64+ toolset = StackOneToolSet(api_key = " your-api-key" )
65+ tools = toolset.fetch_tools(
66+ account_ids = [" account-1" ],
67+ providers = [" hibob" ],
68+ actions = [" *_list_*" ]
69+ )
7570```
7671
7772### Authentication
@@ -89,7 +84,6 @@ toolset = StackOneToolSet(
8984- Use generics for better IDE support
9085
9186### Testing
92- - Snapshot testing for tool parsing (` tests/snapshots/ ` )
9387- Async tests use ` pytest-asyncio `
9488- Example validation: See @./.cursor/rules/examples-standards
9589
@@ -99,20 +93,13 @@ toolset = StackOneToolSet(
99932 . ** Pre-commit** : Hooks configured for ruff and mypy - run on all commits
100943 . ** Python Version** : Requires Python >=3.11
101954 . ** Error Handling** : Custom exceptions (` StackOneError ` , ` StackOneAPIError ` )
102- 5 . ** File Uploads** : Binary parameters auto-detected from OpenAPI specs
103- 6 . ** Context Window** : Tool loading warns when loading all tools (large context)
10496
10597## Common Tasks
10698
107- ### Adding New SaaS Integration
108- 1 . Add OpenAPI spec to ` stackone_ai/oas/ `
109- 2 . Parser automatically converts to tool definitions
110- 3 . Test with ` make test-tools `
111-
11299### Modifying Tool Behavior
113100- Core execution logic in ` StackOneTool.execute() ` method
114101- HTTP configuration via ` ExecuteConfig ` class
115- - Response handling in ` _process_response() `
102+ - RPC tool execution via ` _StackOneRpcTool ` class
116103
117104### Updating Documentation
118105- Examples requirements: See @./.cursor/rules/examples-standards
0 commit comments