-
Notifications
You must be signed in to change notification settings - Fork 5
Fix: Use FpsContext slug if available #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the server identification mechanism to use the FpsContext slug when available, falling back to the server name when not present. This ensures that the correct server identifier is used for API calls and tracing operations.
- Uses FpsContext slug from configuration files as the primary server identifier
- Adds a new
slugproperty to UiPathMcpRuntime that returns the FpsContext slug or falls back to server name - Updates SessionServer constructor to accept and use the server slug parameter
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/uipath_mcp/_cli/_runtime/_context.py |
Adds from_config method to parse FpsContext from uipath.json and extract server_id/server_slug |
src/uipath_mcp/_cli/_runtime/_runtime.py |
Adds slug property and updates all API calls and tracing to use slug instead of server name |
src/uipath_mcp/_cli/_runtime/_session.py |
Updates constructor to accept server_slug parameter and uses it for all API calls |
pyproject.toml |
Bumps version from 0.0.97 to 0.0.98 |
| server_slug: Optional[str] = None | ||
|
|
||
| @classmethod | ||
| def from_config(cls, config_path=None): |
Copilot
AI
Jul 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config_path parameter should have a type annotation. Consider adding config_path: Optional[str] = None for better API clarity.
| def from_config(cls, config_path=None): | |
| def from_config(cls, config_path: Optional[str] = None): |
| mcp_instance = cls(**instance.model_dump()) | ||
|
|
||
| # Add AgentHub-specific configuration handling | ||
| import json |
Copilot
AI
Jul 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports should be placed at the top of the file rather than inside methods. Move the json and os imports to the module level.
| import json | ||
| import os | ||
|
|
Copilot
AI
Jul 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports should be placed at the top of the file rather than inside methods. Move the json and os imports to the module level.
| import json | |
| import os |
Summary
This PR fixes the server identification mechanism to use the
FpsContextslug when available, falling back to the server name when not present. This ensures that the correct server identifier is used for API calls and tracing operations.FpsContextslug from configuration files as the primary server identifierslugproperty toUiPathMcpRuntimethat returns theFpsContextslug or falls back to server nameSessionServerconstructor to accept and use the server slug parameter