mcp-from-openapi 2.6.0 → 2.6.1

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.
package/README.md CHANGED
@@ -6,6 +6,7 @@
6
6
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-yellow.svg)](https://opensource.org/license/apache-2-0)
7
7
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0+-blue.svg)](https://www.typescriptlang.org/)
8
8
  [![Node.js](https://img.shields.io/badge/Node.js-20+-green.svg)](https://nodejs.org/)
9
+ [![CodeQL](https://github.com/agentfront/mcp-from-openapi/actions/workflows/codeql.yml/badge.svg)](https://github.com/agentfront/mcp-from-openapi/actions/workflows/codeql.yml)
9
10
 
10
11
  ## What This Solves
11
12
 
@@ -52,6 +53,8 @@ Now you know exactly how to build the HTTP request.
52
53
 
53
54
  - **Built-in Request Builder** -- `buildHttpRequest()` applies the full OpenAPI serialization table (form/deepObject/pipeDelimited queries, label/matrix paths, multipart, binary, `wholeBody`) so you never hand-write request assembly
54
55
  - **Client Compatibility Targets** -- `target: 'claude' | 'openai' | 'gemini' | 'strict'` emits schemas each client actually accepts (inlined refs, closed objects, collapsed unions, demoted formats)
56
+ - **Context-Budget Reports** -- `analyzeToolSet()` estimates the token bill per tool and warns at the thresholds where agent accuracy degrades
57
+ - **Overlays & Lint** -- apply [OpenAPI Overlay](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/curation.md) curation files at load time; `lint()` flags the spec gaps that hurt tool-calling accuracy
55
58
  - **Curation-Grade Filtering** -- Filter by tag, method, path glob (`/admin/**`), operationId, a `readOnlyOnly` safety switch, and `x-mcp` extension flags with root < path < operation precedence
56
59
  - **Smart Parameter Handling** -- Automatic conflict detection and resolution across path, query, header, cookie, and body; `allOf` bodies flatten, union and binary bodies map cleanly (`wholeBody`, `binary` markers)
57
60
  - **Complete Schemas** -- Input schema combines all parameters; output schema from responses (with oneOf unions); clean JSON Schema 2020-12 output (`nullable` unions, normalized `examples`)
@@ -146,6 +149,7 @@ for (const tool of await generator.generateTools({ target: "claude" })) {
146
149
  | [Parameter Conflicts](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/parameter-conflicts.md) | How conflict detection and resolution works |
147
150
  | [Request Builder](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/request-builder.md) | `buildHttpRequest` — full OpenAPI parameter serialization |
148
151
  | [Client Targets](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/client-targets.md) | Per-client schema dialects (Claude, OpenAI, Gemini) |
152
+ | [Curation](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/curation.md) | Token budgets, overlays, lint, trimming, response hints |
149
153
  | [Response Schemas](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/response-schemas.md) | Output schemas, status codes, oneOf unions |
150
154
  | [Annotations & Extensions](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/annotations.md) | Tool title, annotation inference, `x-mcp` extension family |
151
155
  | [Security](https://github.com/agentfront/mcp-from-openapi/blob/main/docs/security.md) | SecurityResolver, all auth types, custom resolvers |
@@ -167,7 +171,18 @@ for (const tool of await generator.generateTools({ target: "claude" })) {
167
171
 
168
172
  ## Contributing
169
173
 
170
- Contributions are welcome! Please see our [issues page](https://github.com/agentfront/mcp-from-openapi/issues).
174
+ Contributions are welcome! Start with the
175
+ [contributing guide](https://github.com/agentfront/mcp-from-openapi/blob/main/CONTRIBUTING.md);
176
+ this project follows the
177
+ [Contributor Covenant](https://github.com/agentfront/mcp-from-openapi/blob/main/CODE_OF_CONDUCT.md).
178
+ Bug reports and feature requests go through the
179
+ [issue templates](https://github.com/agentfront/mcp-from-openapi/issues/new/choose).
180
+
181
+ ## Security
182
+
183
+ Report vulnerabilities privately — see the
184
+ [security policy](https://github.com/agentfront/mcp-from-openapi/blob/main/SECURITY.md).
185
+ When loading untrusted specs, use `secureDefaults: true`.
171
186
 
172
187
  ## Related Projects
173
188
 
package/errors.d.ts CHANGED
@@ -43,6 +43,13 @@ export declare class ValidationError extends OpenAPIToolError {
43
43
  export declare class GenerationError extends OpenAPIToolError {
44
44
  constructor(message: string, context?: Record<string, any>);
45
45
  }
46
+ /**
47
+ * Error thrown when an OpenAPI Overlay document is malformed or its JSONPath
48
+ * target uses unsupported syntax
49
+ */
50
+ export declare class OverlayError extends OpenAPIToolError {
51
+ constructor(message: string, context?: Record<string, any>);
52
+ }
46
53
  /**
47
54
  * Error thrown when an HTTP request cannot be built from a tool's mapper
48
55
  * (missing required parameters, unserializable values, injection attempts)