Repository navigation
Simplify docs to highlight account_id usage - #2
Conversation
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="examples/calendly_agent.py">
<violation number="1" location="examples/calendly_agent.py:46">
P3: Use the correct parameter name in the comment to avoid misleading users (account_id, not accountID).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
There was a problem hiding this comment.
Pull request overview
This PR updates documentation and examples to emphasize using the account_id parameter when initializing StackOnePlugin, positioning it as the recommended approach over auto-discovery. The changes reorganize the README's "Tool Filtering" section to place "By Account ID" first and mark it as "Recommended", and update code examples throughout to show account_id usage.
Changes:
- Updated all code examples in README.md to include
account_id="YOUR_ACCOUNT_ID"parameter - Reorganized README.md "Tool Filtering" section to prioritize "By Account ID" (marked as "Recommended")
- Updated docstring example in examples/calendly_agent.py to show account_id usage
- Added clarifying comments about account_id vs auto-discovery behavior
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| examples/calendly_agent.py | Updated docstring example and comments to highlight account_id usage and explain auto-discovery as an alternative |
| README.md | Reordered "Tool Filtering" section to place account_id first with "Recommended" label, updated all code examples to show account_id parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # Optionally filter by provider or scope to a specific account: | ||
| # plugin = StackOnePlugin(providers=["calendly"], account_id="your-account-id") | ||
| # You can also filter by accountID: |
There was a problem hiding this comment.
Inconsistent naming: use "account_id" instead of "accountID" to maintain consistency with the parameter name and rest of the codebase. All other references in this file and the README use snake_case "account_id".
| # You can also filter by accountID: | |
| # You can also filter by account_id: |
| async def main(): | ||
| # StackOne replaces manual tool functions | ||
| plugin = StackOnePlugin() # reads STACKONE_API_KEY from env | ||
| # Reads STACKONE_API_KEY from env and auto-discovers connected accounts |
There was a problem hiding this comment.
Misleading comment: The comment states the plugin will "auto-discover connected accounts", but when account_id is provided, auto-discovery is skipped (as seen in plugin.py lines 93-99). Either remove the "auto-discovers connected accounts" part or remove the account_id parameter to match the comment's description.
| # Reads STACKONE_API_KEY from env and auto-discovers connected accounts | |
| # Reads STACKONE_API_KEY from env and uses the specified account_id |
| # Discovers tools from your connected providers. | ||
| # Pass account_id to scope tools to a specific connected account, | ||
| # or omit it to auto-discover all connected accounts. | ||
| plugin = StackOnePlugin() |
There was a problem hiding this comment.
Inconsistency between docstring example and actual code: The docstring on line 7 shows using account_id as the primary approach, but the actual implementation on line 44 omits it to demonstrate auto-discovery. Given the PR's goal to "make the account ID usage primary", consider updating line 44 to match the docstring example or updating the docstring to reflect that this example demonstrates auto-discovery.
Summary
Summary by cubic
Make account_id the primary way to scope StackOnePlugin tools, and set it as the default in examples. README adds a “By Account ID (Recommended)” section and updates quick-start and discovery snippets; calendly_agent.py clarifies passing account_id or omitting it for auto-discovery.
Written for commit 8326a25. Summary will update on new commits.