Skip to content

Commit 1e58c5b

Browse files
committed
docs: update documentation to reflect MCP-based architecture
Update CLAUDE.md: - Remove references to OpenAPI Parser and OAS specs - Update StackOneToolSet description to mention MCP endpoint - Replace get_tools example with fetch_tools usage - Remove "Adding New SaaS Integration" section (no longer applicable) - Update "Modifying Tool Behavior" section with RPC tool info Update .cursor/rules/no-relative-imports.mdc: - Replace OAS_DIR import examples with DEFAULT_HYBRID_ALPHA
1 parent bfb8eaa commit 1e58c5b

File tree

2 files changed

+20
-33
lines changed

2 files changed

+20
-33
lines changed

.cursor/rules/no-relative-imports.mdc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ actions:
2424
1. Always use absolute imports:
2525
```python
2626
# Good
27-
from stackone_ai.tools import ToolDefinition
28-
from stackone_ai.constants import OAS_DIR
29-
27+
from stackone_ai.models import ToolDefinition
28+
from stackone_ai.constants import DEFAULT_HYBRID_ALPHA
29+
3030
# Bad
31-
from .tools import ToolDefinition
32-
from ..constants import OAS_DIR
31+
from .models import ToolDefinition
32+
from ..constants import DEFAULT_HYBRID_ALPHA
3333
```
3434

3535
2. Guidelines:
@@ -40,12 +40,12 @@ actions:
4040
examples:
4141
- input: |
4242
# Bad: Using relative imports
43-
from .tools import ToolDefinition
44-
from ..constants import OAS_DIR
43+
from .models import ToolDefinition
44+
from ..constants import DEFAULT_HYBRID_ALPHA
4545

4646
# Good: Using absolute imports
47-
from stackone_ai.tools import ToolDefinition
48-
from stackone_ai.constants import OAS_DIR
47+
from stackone_ai.models import ToolDefinition
48+
from stackone_ai.constants import DEFAULT_HYBRID_ALPHA
4949
output: "Correctly formatted absolute imports"
5050

5151
metadata:

CLAUDE.md

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,34 +44,29 @@ make mcp-inspector # Run MCP server inspector for debugging
4444

4545
1. **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

5050
2. **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(
9993
2. **Pre-commit**: Hooks configured for ruff and mypy - run on all commits
10094
3. **Python Version**: Requires Python >=3.11
10195
4. **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

Comments
 (0)