openapi-agent-ready 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/CHANGELOG.md +62 -22
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/PKG-INFO +24 -22
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/README.md +23 -21
- openapi_agent_ready-0.3.0/openapi.yaml +11890 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/pyproject.toml +1 -1
- openapi_agent_ready-0.3.0/src/agent_ready/__init__.py +24 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/src/agent_ready/auditor.py +21 -3
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/src/agent_ready/cli.py +36 -2
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/src/agent_ready/rubric.py +54 -12
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/tests/test_audit.py +145 -0
- openapi_agent_ready-0.2.0/src/agent_ready/__init__.py +0 -16
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/.github/workflows/ci.yml +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/.github/workflows/publish.yml +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/.gitignore +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/CONTRIBUTING.md +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/LICENSE +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/examples/agent_ready_booking_api.yaml +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/examples/sample_booking_api.yaml +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/src/agent_ready/mcp_generator.py +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/src/agent_ready/report_generator.py +0 -0
- {openapi_agent_ready-0.2.0 → openapi_agent_ready-0.3.0}/tests/test_mcp_conformance.py +0 -0
|
@@ -5,6 +5,49 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2026-07-31
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Progress indicator for long audits.** The ambiguity check dominates runtime
|
|
12
|
+
on large specs and previously produced no output while running — a 587-endpoint
|
|
13
|
+
spec looked like the tool had hung. A progress bar now reports on stderr, shown
|
|
14
|
+
only for specs above 150 endpoints and only when stderr is a terminal, so piped
|
|
15
|
+
output and `--format json` stay clean.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Ambiguity check is ~4.7x faster** (Stripe: 77s to 16s; Asana: 6.4s to 1.6s)
|
|
19
|
+
using `SequenceMatcher`'s `real_quick_ratio` and `quick_ratio` as prefilters.
|
|
20
|
+
Both are documented upper bounds on `ratio()`, so a pair rejected by a cheap
|
|
21
|
+
bound could not have exceeded the threshold anyway. Results are verified
|
|
22
|
+
identical to the unoptimised implementation.
|
|
23
|
+
|
|
24
|
+
Truncating comparison text was also tried and rejected: another ~5x, but it
|
|
25
|
+
changed which pairs were reported. A faster check that disagrees with itself
|
|
26
|
+
is not an optimisation.
|
|
27
|
+
|
|
28
|
+
A subtler trap surfaced here too: `SequenceMatcher.ratio()` is not symmetric,
|
|
29
|
+
because the autojunk heuristic applies to the second sequence only. The first
|
|
30
|
+
version of this optimisation reversed the argument order to reuse a cached
|
|
31
|
+
sequence — it was faster, passed every existing test, and silently reported
|
|
32
|
+
different pairs. Results are now pinned against a reference implementation.
|
|
33
|
+
|
|
34
|
+
## [0.2.1] - 2026-07-31
|
|
35
|
+
|
|
36
|
+
Found by running the published 0.2.0 against Asana's public spec.
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
- **Generated scaffolds could contain duplicate arguments and fail to parse.**
|
|
40
|
+
OpenAPI identifies a parameter by name *and* location, and an operation-level
|
|
41
|
+
declaration overrides a path-level one. The extractor concatenated both lists
|
|
42
|
+
without deduplicating, so a spec declaring the same parameter at each level —
|
|
43
|
+
Asana's declares `project_gid` that way — produced a function with two
|
|
44
|
+
identically-named arguments, a Python `SyntaxError`. Parameters declared at
|
|
45
|
+
both levels are now deduplicated with operation-level winning; the same name
|
|
46
|
+
in a different location is still treated as distinct.
|
|
47
|
+
- **`--version` reported a stale hardcoded number.** The CLI printed `0.1.0`
|
|
48
|
+
from a published 0.2.0 install. The version is now read from installed package
|
|
49
|
+
metadata, so `pyproject.toml` is the single source of truth and cannot drift.
|
|
50
|
+
|
|
8
51
|
## [0.2.0] - 2026-07-30
|
|
9
52
|
|
|
10
53
|
The generated MCP scaffold is now verified against the real protocol rather than
|
|
@@ -16,18 +59,27 @@ against the current SDK.
|
|
|
16
59
|
against mcp 2.x.
|
|
17
60
|
|
|
18
61
|
### Added
|
|
19
|
-
- **MCP conformance test suite
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
62
|
+
- **MCP conformance test suite.** Launches the generated scaffold as a
|
|
63
|
+
subprocess, completes a real MCP handshake over stdio using the official
|
|
64
|
+
client, and validates the advertised tool definitions: name format,
|
|
65
|
+
uniqueness, description presence, input-schema validity as JSON Schema,
|
|
23
66
|
required-argument correctness, and side-effect disclosure. Previously the only
|
|
24
67
|
check on generated output was that the file compiled.
|
|
68
|
+
- **Tool Surface & Schema Strictness** category (category 8), derived from
|
|
69
|
+
OpenAI's function-calling guidance: flags catalogues far above the ~20-tool
|
|
70
|
+
ceiling, request bodies incompatible with strict mode
|
|
71
|
+
(`additionalProperties: false`, all properties required), and parameters that
|
|
72
|
+
imply a fixed value set but accept free-form strings where an enum belongs.
|
|
25
73
|
- **`ToolAnnotations` on generated tools** (`readOnlyHint`, `destructiveHint`,
|
|
26
74
|
`idempotentHint`, `openWorldHint`), derived from the HTTP method. Prose in a
|
|
27
75
|
description helps a model reason about side effects; annotations let a client
|
|
28
76
|
*enforce* — auto-approving reads while requiring confirmation for writes.
|
|
29
77
|
- **`[server]` extra**, a clearer alias for `[mcp]`: these are dependencies the
|
|
30
78
|
*generated* server needs at runtime, not dependencies of the auditor.
|
|
79
|
+
- Findings now carry a `scope` ("endpoint" or "spec"). Spec-level findings are
|
|
80
|
+
weighted at 50% of their category so a single whole-API finding isn't averaged
|
|
81
|
+
away against hundreds of endpoint findings. Stripe's tool-surface score was
|
|
82
|
+
99/100 before this fix and 49.6/100 after.
|
|
31
83
|
|
|
32
84
|
### Fixed
|
|
33
85
|
- **Generated scaffolds failed to import on mcp 2.0.** FastMCP was replaced by
|
|
@@ -57,6 +109,10 @@ against mcp 2.x.
|
|
|
57
109
|
wrapper and leaves the real error truncated.
|
|
58
110
|
|
|
59
111
|
### Changed
|
|
112
|
+
- **Distribution renamed to `openapi-agent-ready`.** PyPI rejected `agent-ready`
|
|
113
|
+
as too similar to the existing `agentready` package — its similarity check
|
|
114
|
+
strips separators before comparing. Import name (`agent_ready`), CLI command
|
|
115
|
+
(`agent-ready`), and repository name are unchanged.
|
|
60
116
|
- **Generated scaffolds are self-documenting.** The file header states its
|
|
61
117
|
dependencies, how to run it, a paste-ready Claude Desktop config block, and
|
|
62
118
|
three things to fix before shipping — notably that the scaffold sends no
|
|
@@ -67,26 +123,10 @@ against mcp 2.x.
|
|
|
67
123
|
- Tool listings are fetched once per generated file and cached rather than
|
|
68
124
|
spawning a server subprocess per test, cutting spawns from ~14 to 4.
|
|
69
125
|
|
|
70
|
-
## [0.1.1] - 2026-07-29
|
|
71
|
-
|
|
72
|
-
### Added
|
|
73
|
-
- **Tool Surface & Schema Strictness** category (category 8), derived from
|
|
74
|
-
OpenAI's function-calling guidance: flags catalogues far above the ~20-tool
|
|
75
|
-
ceiling, request bodies incompatible with strict mode
|
|
76
|
-
(`additionalProperties: false`, all properties required), and parameters that
|
|
77
|
-
imply a fixed value set but accept free-form strings where an enum belongs.
|
|
78
|
-
- Findings now carry a `scope` ("endpoint" or "spec"). Spec-level findings are
|
|
79
|
-
weighted at 50% of their category so a single whole-API finding isn't averaged
|
|
80
|
-
away against hundreds of endpoint findings. Stripe's tool-surface score was
|
|
81
|
-
99/100 before this fix and 49.6/100 after.
|
|
82
|
-
|
|
83
|
-
### Changed
|
|
84
|
-
- Distribution name is `openapi-agent-ready` (PyPI rejected `agent-ready` as too
|
|
85
|
-
similar to the existing `agentready` package). Import name, CLI command, and
|
|
86
|
-
repo name are unchanged.
|
|
87
|
-
|
|
88
126
|
## [0.1.0] - 2026-07-28
|
|
89
127
|
|
|
128
|
+
Initial release.
|
|
129
|
+
|
|
90
130
|
### Added
|
|
91
131
|
- Seven-category AI-readiness rubric for OpenAPI specs
|
|
92
132
|
- CLI with text, markdown, and JSON output formats
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openapi-agent-ready
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Audit any OpenAPI spec for AI-agent and MCP readiness, and generate an MCP server scaffold.
|
|
5
5
|
Project-URL: Homepage, https://github.com/sfaisal/agent-ready
|
|
6
6
|
Project-URL: Issues, https://github.com/sfaisal/agent-ready/issues
|
|
@@ -75,18 +75,17 @@ agent-ready https://example.com/openapi.yaml
|
|
|
75
75
|
|
|
76
76
|
```
|
|
77
77
|
Generic Booking Platform API (v1.0)
|
|
78
|
-
AI-readiness score:
|
|
79
|
-
Endpoints: 4 Fails:
|
|
78
|
+
AI-readiness score: 54.4/100
|
|
79
|
+
Endpoints: 4 Fails: 6 Warnings: 12
|
|
80
80
|
|
|
81
81
|
Category scores:
|
|
82
|
-
Description Clarity
|
|
83
|
-
Side Effects
|
|
84
|
-
Error Responses
|
|
85
|
-
Auth Clarity
|
|
86
|
-
Ambiguity
|
|
87
|
-
Parameter Explanation
|
|
88
|
-
Usage Guidelines
|
|
89
|
-
Tool Surface 100.0/100
|
|
82
|
+
Description Clarity 37.5/100
|
|
83
|
+
Side Effects 70.0/100
|
|
84
|
+
Error Responses 62.5/100
|
|
85
|
+
Auth Clarity 50.0/100
|
|
86
|
+
Ambiguity 100.0/100
|
|
87
|
+
Parameter Explanation 16.7/100
|
|
88
|
+
Usage Guidelines 50.0/100
|
|
90
89
|
```
|
|
91
90
|
|
|
92
91
|
## Why this exists
|
|
@@ -112,9 +111,11 @@ directly onto the rubric:
|
|
|
112
111
|
| **Frictionless authentication** | 4 (auth/scope clarity) |
|
|
113
112
|
| **Structured error handling** | 3 (actionable errors) |
|
|
114
113
|
|
|
115
|
-
Categories 2 (side effects) and 5 (ambiguity)
|
|
116
|
-
— they
|
|
117
|
-
|
|
114
|
+
Categories 2 (side effects) and 5 (ambiguity) have no counterpart in the
|
|
115
|
+
article — they were added during implementation, once it became clear that
|
|
116
|
+
unsignalled write operations and confusable endpoint descriptions cause agent
|
|
117
|
+
failures as often as the original three. Category 8 came later still, from
|
|
118
|
+
OpenAI's function-calling guidance.
|
|
118
119
|
|
|
119
120
|
The gap is measurable, and enormous. A 2026 study of 856 tools across 103 MCP
|
|
120
121
|
servers found that **97.1% of tool descriptions contained at least one quality
|
|
@@ -128,7 +129,7 @@ agent failures in production.
|
|
|
128
129
|
|
|
129
130
|
```bash
|
|
130
131
|
pip install openapi-agent-ready # core
|
|
131
|
-
pip install "openapi-agent-ready[server]"
|
|
132
|
+
pip install "openapi-agent-ready[server]" # + deps to RUN a generated scaffold
|
|
132
133
|
```
|
|
133
134
|
|
|
134
135
|
From source:
|
|
@@ -156,6 +157,10 @@ agent-ready openapi.yaml --format json
|
|
|
156
157
|
|
|
157
158
|
# Generate an MCP server for the endpoints that pass
|
|
158
159
|
agent-ready openapi.yaml --generate-mcp server.py
|
|
160
|
+
|
|
161
|
+
# Generating only writes a file — running it needs the server deps:
|
|
162
|
+
pip install "openapi-agent-ready[server]"
|
|
163
|
+
python server.py
|
|
159
164
|
```
|
|
160
165
|
|
|
161
166
|
### Use it as a CI gate
|
|
@@ -191,10 +196,8 @@ numbers:
|
|
|
191
196
|
|
|
192
197
|
```
|
|
193
198
|
Stripe API (v2026-06-24.dahlia)
|
|
194
|
-
AI-readiness score:
|
|
195
|
-
Endpoints: 587 Fails: 393 Warnings: 2133
|
|
199
|
+
AI-readiness score: 62.9/100
|
|
196
200
|
|
|
197
|
-
Category scores:
|
|
198
201
|
Description Clarity 68.3/100
|
|
199
202
|
Side Effects 64.7/100
|
|
200
203
|
Error Responses 100.0/100
|
|
@@ -202,7 +205,6 @@ Category scores:
|
|
|
202
205
|
Ambiguity 50.0/100
|
|
203
206
|
Parameter Explanation 43.0/100
|
|
204
207
|
Usage Guidelines 51.2/100
|
|
205
|
-
Tool Surface 49.6/100
|
|
206
208
|
```
|
|
207
209
|
|
|
208
210
|
Two things worth drawing out.
|
|
@@ -211,11 +213,11 @@ Two things worth drawing out.
|
|
|
211
213
|
in this tool, not in Stripe.** Stripe documents errors via OpenAPI's `default`
|
|
212
214
|
response rather than enumerating explicit 4xx/5xx codes. Perfectly valid, and
|
|
213
215
|
arguably cleaner. The check only looked for `4`/`5` prefixes, so it failed all
|
|
214
|
-
587 endpoints. Fixed, regression-tested, and the reason
|
|
215
|
-
real spec before trusting it.
|
|
216
|
+
587 endpoints. Fixed, regression-tested, and the reason the README says to run
|
|
217
|
+
this against a real spec before trusting it.
|
|
216
218
|
|
|
217
219
|
**Stripe is widely and correctly regarded as agent-ready, yet its raw OpenAPI
|
|
218
|
-
spec scores
|
|
220
|
+
spec scores 62.9.** That isn't a contradiction — it's the whole point. Stripe's
|
|
219
221
|
agent-readiness comes from the *Agent Toolkit* layered on top: curated tool
|
|
220
222
|
definitions, an MCP server, managed OAuth. The raw spec is the input to that
|
|
221
223
|
layer, not the layer itself. Which is exactly why this tool ships with
|
|
@@ -20,18 +20,17 @@ agent-ready https://example.com/openapi.yaml
|
|
|
20
20
|
|
|
21
21
|
```
|
|
22
22
|
Generic Booking Platform API (v1.0)
|
|
23
|
-
AI-readiness score:
|
|
24
|
-
Endpoints: 4 Fails:
|
|
23
|
+
AI-readiness score: 54.4/100
|
|
24
|
+
Endpoints: 4 Fails: 6 Warnings: 12
|
|
25
25
|
|
|
26
26
|
Category scores:
|
|
27
|
-
Description Clarity
|
|
28
|
-
Side Effects
|
|
29
|
-
Error Responses
|
|
30
|
-
Auth Clarity
|
|
31
|
-
Ambiguity
|
|
32
|
-
Parameter Explanation
|
|
33
|
-
Usage Guidelines
|
|
34
|
-
Tool Surface 100.0/100
|
|
27
|
+
Description Clarity 37.5/100
|
|
28
|
+
Side Effects 70.0/100
|
|
29
|
+
Error Responses 62.5/100
|
|
30
|
+
Auth Clarity 50.0/100
|
|
31
|
+
Ambiguity 100.0/100
|
|
32
|
+
Parameter Explanation 16.7/100
|
|
33
|
+
Usage Guidelines 50.0/100
|
|
35
34
|
```
|
|
36
35
|
|
|
37
36
|
## Why this exists
|
|
@@ -57,9 +56,11 @@ directly onto the rubric:
|
|
|
57
56
|
| **Frictionless authentication** | 4 (auth/scope clarity) |
|
|
58
57
|
| **Structured error handling** | 3 (actionable errors) |
|
|
59
58
|
|
|
60
|
-
Categories 2 (side effects) and 5 (ambiguity)
|
|
61
|
-
— they
|
|
62
|
-
|
|
59
|
+
Categories 2 (side effects) and 5 (ambiguity) have no counterpart in the
|
|
60
|
+
article — they were added during implementation, once it became clear that
|
|
61
|
+
unsignalled write operations and confusable endpoint descriptions cause agent
|
|
62
|
+
failures as often as the original three. Category 8 came later still, from
|
|
63
|
+
OpenAI's function-calling guidance.
|
|
63
64
|
|
|
64
65
|
The gap is measurable, and enormous. A 2026 study of 856 tools across 103 MCP
|
|
65
66
|
servers found that **97.1% of tool descriptions contained at least one quality
|
|
@@ -73,7 +74,7 @@ agent failures in production.
|
|
|
73
74
|
|
|
74
75
|
```bash
|
|
75
76
|
pip install openapi-agent-ready # core
|
|
76
|
-
pip install "openapi-agent-ready[server]"
|
|
77
|
+
pip install "openapi-agent-ready[server]" # + deps to RUN a generated scaffold
|
|
77
78
|
```
|
|
78
79
|
|
|
79
80
|
From source:
|
|
@@ -101,6 +102,10 @@ agent-ready openapi.yaml --format json
|
|
|
101
102
|
|
|
102
103
|
# Generate an MCP server for the endpoints that pass
|
|
103
104
|
agent-ready openapi.yaml --generate-mcp server.py
|
|
105
|
+
|
|
106
|
+
# Generating only writes a file — running it needs the server deps:
|
|
107
|
+
pip install "openapi-agent-ready[server]"
|
|
108
|
+
python server.py
|
|
104
109
|
```
|
|
105
110
|
|
|
106
111
|
### Use it as a CI gate
|
|
@@ -136,10 +141,8 @@ numbers:
|
|
|
136
141
|
|
|
137
142
|
```
|
|
138
143
|
Stripe API (v2026-06-24.dahlia)
|
|
139
|
-
AI-readiness score:
|
|
140
|
-
Endpoints: 587 Fails: 393 Warnings: 2133
|
|
144
|
+
AI-readiness score: 62.9/100
|
|
141
145
|
|
|
142
|
-
Category scores:
|
|
143
146
|
Description Clarity 68.3/100
|
|
144
147
|
Side Effects 64.7/100
|
|
145
148
|
Error Responses 100.0/100
|
|
@@ -147,7 +150,6 @@ Category scores:
|
|
|
147
150
|
Ambiguity 50.0/100
|
|
148
151
|
Parameter Explanation 43.0/100
|
|
149
152
|
Usage Guidelines 51.2/100
|
|
150
|
-
Tool Surface 49.6/100
|
|
151
153
|
```
|
|
152
154
|
|
|
153
155
|
Two things worth drawing out.
|
|
@@ -156,11 +158,11 @@ Two things worth drawing out.
|
|
|
156
158
|
in this tool, not in Stripe.** Stripe documents errors via OpenAPI's `default`
|
|
157
159
|
response rather than enumerating explicit 4xx/5xx codes. Perfectly valid, and
|
|
158
160
|
arguably cleaner. The check only looked for `4`/`5` prefixes, so it failed all
|
|
159
|
-
587 endpoints. Fixed, regression-tested, and the reason
|
|
160
|
-
real spec before trusting it.
|
|
161
|
+
587 endpoints. Fixed, regression-tested, and the reason the README says to run
|
|
162
|
+
this against a real spec before trusting it.
|
|
161
163
|
|
|
162
164
|
**Stripe is widely and correctly regarded as agent-ready, yet its raw OpenAPI
|
|
163
|
-
spec scores
|
|
165
|
+
spec scores 62.9.** That isn't a contradiction — it's the whole point. Stripe's
|
|
164
166
|
agent-readiness comes from the *Agent Toolkit* layered on top: curated tool
|
|
165
167
|
definitions, an MCP server, managed OAuth. The raw spec is the input to that
|
|
166
168
|
layer, not the layer itself. Which is exactly why this tool ships with
|