You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"modelDescription": "Provides details about the Python environment for a specified file or workspace, including environment type, Python version, run command, and installed packages with their versions. Use this tool to determine the correct command for executing Python code in this workspace.",
"modelDescription": "This tool will retrieve the details of the Python Environment for the specified file or workspace. The details returned include the 1. Type of Environment (conda, venv, etec), 2. Version of Python, 3. List of all installed packages with their versions. ",
1472
1472
"toolReferenceName": "pythonGetEnvironmentInfo",
1473
1473
"tags": [
1474
1474
"ms-python.python"
@@ -1483,11 +1483,53 @@
1483
1483
}
1484
1484
},
1485
1485
"description": "The path to the Python file or workspace to get the environment information for.",
"modelDescription": "This tool will retrieve the details of the Python Environment for the specified file or workspace. ALWAYS use this tool before executing any Python command in the terminal. This tool returns the details of how to construct the fully qualified path and or command including details such as arguments required to run Python in a terminal. Note: Instead of executing `python --version` or `python -c 'import sys; print(sys.executable)'`, use this tool to get the Python executable path to replace the `python` command. E.g. instead of using `python -c 'import sys; print(sys.executable)'`, use this tool to build the command `conda run -n <env_name> -c 'import sys; print(sys.executable)'`.",
1494
+
"toolReferenceName": "pythonExecutableCommand",
1495
+
"tags": [
1496
+
"ms-python.python"
1497
+
],
1498
+
"icon": "$(files)",
1499
+
"canBeReferencedInPrompt": true,
1500
+
"inputSchema": {
1501
+
"type": "object",
1502
+
"properties": {
1503
+
"resourcePath": {
1504
+
"type": "string"
1505
+
}
1506
+
},
1507
+
"description": "The path to the Python file or workspace to get the executable information for. If not provided, the current workspace will be used. Where possible pass the path to the file or workspace.",
"modelDescription": "This tool will retrieve the list of all installed packages installed in a Python Environment for the specified file or workspace. ALWAYS use this tool instead of executing Python command in the terminal to fetch the list of installed packages. WARNING: Packages installed can change over time, hence the list of packages returned by this tool may not be accurate. Use this tool to get the list of installed packages in a Python environment.",
1516
+
"toolReferenceName": "listPythonPackages",
1517
+
"tags": [
1518
+
"ms-python.python"
1519
+
],
1520
+
"icon": "$(files)",
1521
+
"canBeReferencedInPrompt": true,
1522
+
"inputSchema": {
1523
+
"type": "object",
1524
+
"properties": {
1525
+
"resourcePath": {
1526
+
"type": "string"
1527
+
}
1528
+
},
1529
+
"description": "The path to the Python file or workspace to list the packages. If not provided, the current workspace will be used. Where possible pass the path to the file or workspace.",
1530
+
"required": []
1489
1531
},
1490
-
"when": "!pythonEnvExtensionInstalled"
1532
+
"when": "false"
1491
1533
},
1492
1534
{
1493
1535
"name": "install_python_package",
@@ -1512,12 +1554,11 @@
1512
1554
},
1513
1555
"resourcePath": {
1514
1556
"type": "string",
1515
-
"description": "The path to the Python file or workspace to get the environment information for."
1557
+
"description": "The path to the Python file or workspace into which the packages are installed. If not provided, the current workspace will be used. Where possible pass the path to the file or workspace."
"python.languageModelTools.python_environment.userDescription": "Get Python environment info for a file or path, including version, packages, and the command to run it.",
4
-
"python.languageModelTools.python_install_package.userDescription": "Installs Python packages in the given workspace.",
3
+
"python.languageModelTools.get_python_environment_info.userDescription": "Get information for a Python Environment, such as Type, Version, Packages, and more.",
4
+
"python.languageModelTools.python_install_package.userDescription": "Installs Python packages in a Python Environment.",
5
+
"python.languageModelTools.get_python_executable.userDescription": "Get executable info for a Python Environment",
6
+
"python.languageModelTools.list_python_packages.userDescription": "Get a list of all installed packages in a Python Environment.",
// Create a formatted string that looks like JSON but preserves comments
131
-
letenvTypeDescriptor: string=`This environment is managed by ${envInfo.type} environment manager. Use the install tool to install packages into this environment.`;
132
-
133
-
// TODO: If this is setup as python.defaultInterpreterPath, then do not include this message.
134
-
if(envInfo.type==='system'){
135
-
envTypeDescriptor=
136
-
'System pythons are pythons that ship with the OS or are installed globally. These python installs may be used by the OS for running services and core functionality. Confirm with the user before installing packages into this environment, as it can lead to issues with any services on the OS.';
// Installed Python packages, each in the format <name> or <name> (<version>). The version may be omitted if unknown. Returns an empty array if no packages are installed.
0 commit comments