toolright 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- toolright/__init__.py +57 -0
- toolright/__main__.py +3 -0
- toolright-0.0.1.dist-info/METADATA +43 -0
- toolright-0.0.1.dist-info/RECORD +8 -0
- toolright-0.0.1.dist-info/WHEEL +5 -0
- toolright-0.0.1.dist-info/entry_points.txt +2 -0
- toolright-0.0.1.dist-info/licenses/LICENSE +21 -0
- toolright-0.0.1.dist-info/top_level.txt +1 -0
toolright/__init__.py
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Python launcher for the Toolright CLI.
|
|
2
|
+
|
|
3
|
+
Toolright is a Node.js tool (https://www.npmjs.com/package/toolright). This package
|
|
4
|
+
exists so that ``pip install toolright`` gives you a ``toolright`` command. It does not
|
|
5
|
+
reimplement anything: it runs the npm package of the SAME version through ``npx``.
|
|
6
|
+
|
|
7
|
+
Requirements: Node.js 20+ (which provides ``npx``) on your PATH.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
import os
|
|
13
|
+
import shutil
|
|
14
|
+
import subprocess
|
|
15
|
+
import sys
|
|
16
|
+
from typing import List, Optional, Sequence
|
|
17
|
+
|
|
18
|
+
__version__ = "0.0.1"
|
|
19
|
+
|
|
20
|
+
NPM_PACKAGE = "toolright"
|
|
21
|
+
_GUARD = "TOOLRIGHT_PY_LAUNCHER"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def build_command(npx: str, args: Sequence[str]) -> List[str]:
|
|
25
|
+
"""The exact command we run. The npm version is pinned to this package's version."""
|
|
26
|
+
return [npx, "--yes", f"{NPM_PACKAGE}@{__version__}", *args]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main(argv: Optional[Sequence[str]] = None) -> int:
|
|
30
|
+
args = list(sys.argv[1:] if argv is None else argv)
|
|
31
|
+
|
|
32
|
+
if os.environ.get(_GUARD):
|
|
33
|
+
sys.stderr.write("toolright: launcher recursion detected; refusing to continue.\n")
|
|
34
|
+
return 1
|
|
35
|
+
|
|
36
|
+
npx = shutil.which("npx")
|
|
37
|
+
if shutil.which("node") is None or npx is None:
|
|
38
|
+
sys.stderr.write(
|
|
39
|
+
"toolright needs Node.js 20+ (it provides `npx`), and it was not found on your PATH.\n"
|
|
40
|
+
"Install Node.js from https://nodejs.org, then run this command again.\n"
|
|
41
|
+
)
|
|
42
|
+
return 127
|
|
43
|
+
|
|
44
|
+
env = dict(os.environ)
|
|
45
|
+
env[_GUARD] = "1"
|
|
46
|
+
try:
|
|
47
|
+
# A list, never a shell string: arguments are passed through untouched.
|
|
48
|
+
return subprocess.call(build_command(npx, args), env=env)
|
|
49
|
+
except KeyboardInterrupt:
|
|
50
|
+
return 130
|
|
51
|
+
except OSError as exc:
|
|
52
|
+
sys.stderr.write(f"toolright: could not start npx: {exc}\n")
|
|
53
|
+
return 1
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
if __name__ == "__main__": # pragma: no cover
|
|
57
|
+
raise SystemExit(main())
|
toolright/__main__.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: toolright
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Does your agent pick the right tool? Test MCP tool descriptions against real models. Python launcher for the Toolright Node.js CLI.
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/ab-rar-6024/toolright
|
|
7
|
+
Project-URL: Repository, https://github.com/ab-rar-6024/toolright
|
|
8
|
+
Project-URL: Issues, https://github.com/ab-rar-6024/toolright/issues
|
|
9
|
+
Project-URL: npm, https://www.npmjs.com/package/toolright
|
|
10
|
+
Keywords: mcp,model-context-protocol,llm,evaluation,tool-calling,agents
|
|
11
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: JavaScript
|
|
16
|
+
Classifier: Topic :: Software Development :: Testing
|
|
17
|
+
Requires-Python: >=3.8
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# toolright (Python launcher)
|
|
23
|
+
|
|
24
|
+
**Does your agent pick the right tool?** Test your MCP server's tool descriptions against real models, then keep only the rewrites that measurably help.
|
|
25
|
+
|
|
26
|
+
This package is a thin Python launcher for [Toolright](https://github.com/ab-rar-6024/toolright), which is a **Node.js** tool. It does not reimplement anything: `pip install toolright` gives you a `toolright` command that runs the npm package of the **same version** through `npx`.
|
|
27
|
+
|
|
28
|
+
**You need Node.js 20+** on your PATH (it provides `npx`).
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install toolright
|
|
32
|
+
|
|
33
|
+
toolright lint -- python my_mcp_server.py # Tier 1: no model, no API key
|
|
34
|
+
toolright eval -m ollama:qwen2.5:3b --prompts prompts.json -- python my_mcp_server.py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The first run downloads the pinned npm package once; later runs use npm's cache.
|
|
38
|
+
|
|
39
|
+
Full documentation, the three tiers, security model and limits: <https://github.com/ab-rar-6024/toolright>
|
|
40
|
+
|
|
41
|
+
Prefer Node directly? `npx toolright ...` or `npm install -g toolright`.
|
|
42
|
+
|
|
43
|
+
> Pre-release (0.0.1). Model-facing code has not yet been run against live provider APIs. See the main README for the honest status.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
toolright/__init__.py,sha256=aBM5fCiw-u-T5bA2enHRWP3PLjMobKgGMVAmYbBjo7U,1827
|
|
2
|
+
toolright/__main__.py,sha256=BHLi_-4Bx1gsZn-z6x7wECPn1YTxdc74y0deRea9FzY,45
|
|
3
|
+
toolright-0.0.1.dist-info/licenses/LICENSE,sha256=kPTbftroBsh5b6wVBZtwlV7Q1gqE3pRgLO8w72EHD_E,1079
|
|
4
|
+
toolright-0.0.1.dist-info/METADATA,sha256=l6yidd5f2BIgkdxUR2er7r9tvgsYXgU-blmYINd9nks,2099
|
|
5
|
+
toolright-0.0.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
6
|
+
toolright-0.0.1.dist-info/entry_points.txt,sha256=Uw8xl-uoLyKj5DwxXSJRqfty-_ZCbCxK80MZA77p4Lw,45
|
|
7
|
+
toolright-0.0.1.dist-info/top_level.txt,sha256=UIwDO-m9x5vsRHes7HUf4hL2NNl7ukBryrKa4NV5OBM,10
|
|
8
|
+
toolright-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Toolright contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
toolright
|