From d153665fb73eec39a1e1c5b78b6276a40ae22c8f Mon Sep 17 00:00:00 2001 From: Steve Sfartz Date: Tue, 8 Sep 2026 14:20:01 +0200 Subject: [PATCH] Add RC.4 tooling support --- ROADMAP.md | 3 + package-lock.json | 6 +- packages/core/CHANGELOG.md | 19 +- packages/core/README.md | 60 +- packages/core/package.json | 4 +- .../core/scripts/check-browser-bundle.mjs | 6 +- packages/core/scripts/check-consumer.mjs | 77 +- packages/core/src/components.ts | 9 +- packages/core/src/index.ts | 10 +- packages/core/src/migration.ts | 24 +- packages/core/src/snapshot.ts | 24 +- packages/core/test/components.test.ts | 41 +- packages/core/test/merge.test.ts | 12 +- packages/core/test/migration.test.ts | 56 +- packages/core/test/projection.test.ts | 69 +- packages/core/test/selection.test.ts | 18 +- .../core/test/specification-support.test.ts | 45 +- packages/validator/CHANGELOG.md | 19 +- packages/validator/README.md | 33 +- packages/validator/index.d.ts | 18 +- packages/validator/package.json | 4 +- .../validator/scripts/build-standalone.mjs | 2 +- .../scripts/check-browser-bundle.mjs | 4 +- packages/validator/scripts/check-package.mjs | 10 +- packages/validator/snapshot-integrity.json | 408 +++ packages/validator/src/index.js | 16 +- .../src/snapshots/0.8.0-rc.4/base.js | 1412 +++++++++ .../src/snapshots/0.8.0-rc.4/index.js | 17 + .../src/snapshots/0.8.0-rc.4/schema.json | 2820 +++++++++++++++++ .../src/snapshots/0.8.0-rc.4/semantic.js | 971 ++++++ packages/validator/standalone.js | 2 +- packages/validator/test/api.test.js | 55 +- packages/validator/test/browser.test.js | 4 +- packages/validator/test/fixtures.test.js | 2 +- packages/validator/test/snapshot.test.js | 18 +- .../test/snapshots/0.8.0-rc.4/README.md | 3 + .../closed-protocol-enum.json | 17 + .../component-contextual-examples.json | 64 + .../component-contextual-schemas.json | 29 + .../component-extension-boundaries.json | 10 + .../component-protocol-scope.json | 31 + .../component-reference-resolution.json | 21 + ...components-empty-and-reference-shapes.json | 15 + .../duplicate-mcp-header.json | 35 + .../duplicate-security-scope.json | 39 + .../duplicate-tag-reference.json | 34 + .../elicitation-branch-mixing.json | 35 + .../elicitation-form-semantics.json | 57 + .../elicitation-scope-outside-parent.json | 37 + .../elicitation-version-mismatch.json | 34 + .../empty-client-capability-requirements.json | 17 + .../empty-ordinary-nested-collections.json | 34 + .../empty-ordinary-root-collections.json | 19 + .../empty-tag-catalog-reference.json | 30 + .../invalid-completion-example-semantics.json | 213 ++ .../invalid-mcp-header-placement.json | 35 + .../invalid-mcp-header-value.json | 31 + .../invalid-prompt-example-semantics.json | 96 + .../invalid-resource-annotations.json | 38 + .../invalid-security-scheme-name.json | 23 + ...invalid-tool-example-result-semantics.json | 67 + ...id-tool-interaction-example-semantics.json | 140 + .../malformed-completion-examples.json | 39 + .../malformed-extension-identifier.json | 24 + ...lformed-pre-dialect-tool-schema-shape.json | 26 + .../malformed-prompt-examples.json | 53 + .../malformed-resource-examples.json | 81 + .../malformed-resource-template-example.json | 37 + .../malformed-tool-examples.json | 50 + .../malformed-tool-interaction-examples.json | 27 + .../malformed-tool-schema.json | 26 + .../expected-invalid/meta-invalid-key.json | 16 + .../meta-reserved-key-misuse.json | 28 + .../missing-tool-input-schema.json | 22 + .../expected-invalid/non-oauth-scopes.json | 30 + .../non-object-output-schema-before-2026.json | 32 + .../oauth-flow-missing-required-url.json | 28 + ...ct-level-extension-cannot-weaken-core.json | 19 + ...ect-level-extension-in-capability-map.json | 20 + .../object-level-extension-in-domain-map.json | 16 + ...ect-level-extension-in-native-content.json | 34 + ...vel-extension-in-security-requirement.json | 18 + .../object-level-unknown-property.json | 20 + .../overlapping-capabilities.json | 37 + .../overlapping-tool-scope.json | 37 + .../resource-example-cache-fields.json | 83 + .../resource-example-result-semantics.json | 89 + .../revision-inapplicable-execution.json | 29 + .../revision-inapplicable-mcp-header.json | 31 + ...revision-inapplicable-streamable-http.json | 17 + ...sion-inapplicable-tool-schema-dialect.json | 27 + ...atible-client-capability-requirements.json | 26 + .../revision-incompatible-tool-example.json | 29 + .../root-version-without-transport.json | 21 + .../scoped-version-not-in-root.json | 20 + .../tool-example-schema-mismatches.json | 32 + .../unknown-security-reference.json | 36 + .../unresolved-local-tool-ref.json | 31 + .../client-capability-requirements.json | 109 + ...istinct-tool-and-resource-annotations.json | 61 + .../elicitation-declarations.json | 96 + .../integrated-draft2-features.yaml | 56 + .../expected-valid/meta-literal-values.json | 102 + .../minimal-zero-primitives.json | 12 + .../named-completion-examples.json | 172 + .../expected-valid/named-prompt-examples.json | 90 + .../named-resource-examples.json | 140 + .../expected-valid/named-tool-examples.json | 105 + .../named-tool-interaction-examples.json | 258 ++ ...object-level-specification-extensions.json | 203 ++ .../protocol-coverage-and-tool-schemas.json | 173 + .../protocol-independent-info-metadata.json | 23 + .../protocol-scoped-primitives.json | 63 + .../expected-valid/reusable-components.json | 100 + .../security-composition-and-inheritance.json | 112 + .../security-root-and-override.json | 135 + .../expected-valid/tagged-surface.json | 56 + .../unknown-extension-identifier.json | 26 + ...ecated-client-capability-requirements.json | 33 + .../legacy-completion-examples.json | 47 + .../legacy-sse-modern-revision.json | 17 + .../logging-deprecated-2026.json | 22 + .../pre-dialect-tool-example.json | 38 + .../pre-dialect-tool-schema-shape.json | 34 + .../pre-standard-extension-capabilities.json | 24 + .../resource-example-consistency.json | 57 + ...on-client-requirements-contradictions.json | 124 + .../uncatalogued-oauth-scope.json | 47 + .../uncatalogued-openid-scope.json | 30 + ...unknown-reserved-extension-identifier.json | 26 + .../unknown-reserved-meta-key.json | 17 + .../unresolved-external-tool-example-ref.json | 38 + .../unresolved-external-tool-ref.json | 35 + packages/validator/test/standalone.test.js | 2 +- packages/validator/test/types/api.test.ts | 33 +- 135 files changed, 11101 insertions(+), 308 deletions(-) create mode 100644 packages/validator/src/snapshots/0.8.0-rc.4/base.js create mode 100644 packages/validator/src/snapshots/0.8.0-rc.4/index.js create mode 100644 packages/validator/src/snapshots/0.8.0-rc.4/schema.json create mode 100644 packages/validator/src/snapshots/0.8.0-rc.4/semantic.js create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/README.md create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/closed-protocol-enum.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-schemas.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-extension-boundaries.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-protocol-scope.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-reference-resolution.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/components-empty-and-reference-shapes.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-mcp-header.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-security-scope.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-tag-reference.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-branch-mixing.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-form-semantics.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-scope-outside-parent.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-version-mismatch.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-client-capability-requirements.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-nested-collections.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-root-collections.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-tag-catalog-reference.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-completion-example-semantics.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-placement.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-value.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-prompt-example-semantics.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-resource-annotations.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-security-scheme-name.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-example-result-semantics.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-completion-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-extension-identifier.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-prompt-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-template-example.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-interaction-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-schema.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-invalid-key.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-reserved-key-misuse.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/missing-tool-input-schema.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-oauth-scopes.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-object-output-schema-before-2026.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/oauth-flow-missing-required-url.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-capability-map.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-domain-map.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-native-content.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-security-requirement.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-unknown-property.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-capabilities.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-tool-scope.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-cache-fields.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-result-semantics.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-execution.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-mcp-header.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-streamable-http.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-tool-example.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/root-version-without-transport.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/scoped-version-not-in-root.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/tool-example-schema-mismatches.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unknown-security-reference.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unresolved-local-tool-ref.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/client-capability-requirements.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/distinct-tool-and-resource-annotations.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/elicitation-declarations.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/integrated-draft2-features.yaml create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/meta-literal-values.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/minimal-zero-primitives.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-completion-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-prompt-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-resource-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-interaction-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/object-level-specification-extensions.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-independent-info-metadata.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-scoped-primitives.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/reusable-components.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-composition-and-inheritance.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-root-and-override.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/tagged-surface.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/unknown-extension-identifier.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/deprecated-client-capability-requirements.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-completion-examples.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-sse-modern-revision.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/logging-deprecated-2026.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-example.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-schema-shape.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-standard-extension-capabilities.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/resource-example-consistency.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-oauth-scope.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-openid-scope.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-extension-identifier.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-meta-key.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-example-ref.json create mode 100644 packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-ref.json diff --git a/ROADMAP.md b/ROADMAP.md index aed243e..18a1a77 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -45,6 +45,9 @@ repository. unresolved-reference diagnostics. - [x] Narrow current runtime and package support to RC.2 and RC.3, deprecate RC.2, and retain retired snapshot artifacts as repository history. +- [x] Adopt RC.4 across validation and supported core operations, advance the + active transition window to RC.3 and RC.4, and record component reference + resolution as unsupported until snapshot provenance is available. - Add normalization or comparison operations only where multiple consumers demonstrate the same requirement. diff --git a/package-lock.json b/package-lock.json index f3f8704..60b3da6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2200,10 +2200,10 @@ }, "packages/core": { "name": "@mcpdesc/core", - "version": "0.9.1", + "version": "0.10.0", "license": "Apache-2.0", "dependencies": { - "@mcpdesc/validator": "0.10.1", + "@mcpdesc/validator": "0.11.0", "jsonc-parser": "3.3.1", "yaml": "2.9.0" }, @@ -2213,7 +2213,7 @@ }, "packages/validator": { "name": "@mcpdesc/validator", - "version": "0.10.1", + "version": "0.11.0", "license": "Apache-2.0", "dependencies": { "@cfworker/json-schema": "^4.1.1", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 6256b84..cd543ba 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -4,6 +4,22 @@ All notable changes to `@mcpdesc/core` are documented in this file. ## [Unreleased] +## [0.10.0] - 2026-09-08 + +### Added + +- Added MCP Description `0.8.0-rc.4` support for projection, merge, declaration + selection, and migration from 0.7.0, including protocol-independent root info + metadata behavior. + +### Changed + +- Narrowed current core support to RC.3 and RC.4, deprecated RC.3, removed RC.2 + from the current API, and pinned `@mcpdesc/validator` `0.11.0`. +- Marked RC.4 component reference resolution intentionally unsupported because + the snapshot resolver does not expose the terminal-target provenance required + by the core operation contract. + ## [0.9.1] - 2026-09-07 ### Changed @@ -188,7 +204,8 @@ tarball verification. The corresponding Git tag has not yet been created. - Apache-2.0 licensing, provenance, contribution guidance, and repository instructions for coding assistants. -[Unreleased]: https://github.com/mcpdesc/core/compare/v0.9.1...HEAD +[Unreleased]: https://github.com/mcpdesc/core/compare/v0.10.0...HEAD +[0.10.0]: https://github.com/mcpdesc/core/compare/v0.9.1...v0.10.0 [0.9.1]: https://github.com/mcpdesc/core/compare/v0.9.0...v0.9.1 [0.9.0]: https://github.com/mcpdesc/core/compare/v0.8.1...v0.9.0 [0.8.1]: https://github.com/mcpdesc/core/compare/v0.8.0...v0.8.1 diff --git a/packages/core/README.md b/packages/core/README.md index 3ce1924..36555d1 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -10,7 +10,7 @@ See [CHANGELOG.md](CHANGELOG.md) for package release history. ```ts import { - migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc4, mergeEffectiveProtocolViews, projectEffectiveProtocolView, serializeMcpDescriptionMigrationReport, @@ -28,7 +28,7 @@ if (!parsed.ok) { } const result = projectEffectiveProtocolView(document, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); @@ -39,19 +39,19 @@ if (result.ok) { } const merged = mergeEffectiveProtocolViews(protocolViews, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', }); const subset = selectMcpDescriptionDeclarations(document, { - specification: '0.8.0-rc.3', + specification: '0.8.0-rc.4', selections: { tools: ['search'], resources: ['docs://index'], }, }); -const migrated = migrateMcpDescription07ToRc2(validatedLegacyDocument, { - specification: '0.8.0-rc.2', +const migrated = migrateMcpDescription07ToRc4(validatedLegacyDocument, { + specification: '0.8.0-rc.4', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }); @@ -67,50 +67,52 @@ if (resolved.ok) { console.log(serializeMcpDescriptionMigrationReport(migrated.report)); ``` -Semantic operations require an exact immutable selector and support `0.8.0-rc.2` -and `0.8.0-rc.3`. RC.2 remains operational but is deprecated; new integrations -should select RC.3. The operations validate their source and result with +Semantic operations require an exact immutable selector and support `0.8.0-rc.3` +and `0.8.0-rc.4`. RC.3 remains operational but is deprecated; new integrations +should select RC.4. The operations validate their source and result with `@mcpdesc/validator`. Declaration selection uses MCP Description identities: tool and prompt `name`, resource `uri`, and resource template `uriTemplate`. It preserves all selected protocol-scoped variants and omits empty declaration collections. -| Operation | RC.2 | RC.3 | -| ---------------------------------- | --------------------- | --------- | -| Effective Protocol View projection | Supported, deprecated | Supported | -| Effective Protocol View merge | Supported, deprecated | Supported | -| Declaration selection | Supported, deprecated | Supported | -| Migration from 0.7.0 | Supported, deprecated | Supported | -| Component reference resolution | Supported, deprecated | Supported | +| Operation | RC.3 | RC.4 | +| ---------------------------------- | --------------------- | -------------------------------------- | +| Effective Protocol View projection | Supported, deprecated | Supported | +| Effective Protocol View merge | Supported, deprecated | Supported | +| Declaration selection | Supported, deprecated | Supported | +| Migration from 0.7.0 | Supported, deprecated | Supported | +| Component reference resolution | Supported, deprecated | Unsupported: snapshot omits provenance | | Specification selector | First validator release | First core release | | ---------------------- | ----------------------- | ------------------ | +| `0.8.0-rc.4` | `0.11.0` | `0.10.0` | | `0.8.0-rc.3` | `0.10.0` | `0.9.0` | -| `0.8.0-rc.2` | `0.9.0` | `0.8.0` | -Consumers that still require Draft 4 or RC.1 can pin an older immutable core and -validator release. Those runtime snapshots are retained in Git for integrity -history but are not part of the current package API or tarballs. +Consumers that still require Draft 4, RC.1, or RC.2 can pin an older immutable +core and validator release. Those runtime snapshots are retained in Git for +integrity history but are not part of the current package API or tarballs. -RC.2 and RC.3 projection preserve pre-standard server extension maps in every +RC.3 and RC.4 projection preserve pre-standard server extension maps in every applicable Effective Protocol View. `mergeEffectiveProtocolViews` combines compatible views, retains semantically equivalent declarations across scopes, and rejects conflicting views or unscoped metadata without mutating inputs. -Component reference resolution supports RC.2 and RC.3. It validates before -resolving, returns a deep-cloned document with root component registries -retained, and reports deterministic provenance from each authored reference path -to its terminal component path. Intermediate chain hops are not exposed. The -operation uses the resolver exported through `@mcpdesc/validator/standalone`; -this keeps the snapshot-owned traversal authoritative while avoiding the runtime -AJV entry and a dependency cycle. +Component reference resolution supports RC.3. It validates before resolving, +returns a deep-cloned document with root component registries retained, and +reports deterministic provenance from each authored reference path to its +terminal component path. Intermediate chain hops are not exposed. The operation +uses the resolver exported through `@mcpdesc/validator/standalone`; this keeps +the snapshot-owned traversal authoritative while avoiding the runtime AJV entry +and a dependency cycle. RC.4 is intentionally unsupported because its snapshot +resolver does not expose the terminal-target provenance required by this +operation's public contract. Migration accepts a caller-validated MCP Description 0.7.0 value and validates the result against the exact target snapshot. It moves the protocol revision to root scope, wraps server capabilities, omits optional empty arrays, and converts inline legacy security schemes to deterministic named definitions and requirements. Generated names and deduplication are reported as warnings for -author review. RC.2 and RC.3 callers may opt into `defaultProtocolVersion` when +author review. RC.3 and RC.4 callers may opt into `defaultProtocolVersion` when the source omits `info.protocolVersion`; the source value always takes precedence, and no built-in default is applied. Every migration result includes a stable, JSON-compatible report that distinguishes success, success with diff --git a/packages/core/package.json b/packages/core/package.json index b8fc400..2648b09 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mcpdesc/core", - "version": "0.9.1", + "version": "0.10.0", "description": "Pure semantic operations for MCP Description documents", "type": "module", "license": "Apache-2.0", @@ -51,7 +51,7 @@ "typecheck": "tsc --build --pretty false" }, "dependencies": { - "@mcpdesc/validator": "0.10.1", + "@mcpdesc/validator": "0.11.0", "jsonc-parser": "3.3.1", "yaml": "2.9.0" } diff --git a/packages/core/scripts/check-browser-bundle.mjs b/packages/core/scripts/check-browser-bundle.mjs index 221bb7d..6485e6a 100644 --- a/packages/core/scripts/check-browser-bundle.mjs +++ b/packages/core/scripts/check-browser-bundle.mjs @@ -7,8 +7,8 @@ const entries = [ path: '../src/index.ts', allowsValidator: true, requiredExports: [ - 'migrateMcpDescription07ToRc2', 'migrateMcpDescription07ToRc3', + 'migrateMcpDescription07ToRc4', 'serializeMcpDescriptionMigrationReport', ], }, @@ -111,7 +111,7 @@ try { const fixture = JSON.parse( readFileSync( new URL( - '../../validator/test/snapshots/0.8.0-rc.2/fixtures/expected-valid/reusable-components.json', + '../../validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json', import.meta.url, ), 'utf8', @@ -121,7 +121,7 @@ try { root.resolveMcpDescriptionComponentReferences, components.resolveMcpDescriptionComponentReferences, ]) { - const result = operation(fixture, { specification: '0.8.0-rc.2' }); + const result = operation(fixture, { specification: '0.8.0-rc.3' }); if (!result.ok || result.provenance.length === 0) { throw new Error('Component resolution failed under strict CSP'); } diff --git a/packages/core/scripts/check-consumer.mjs b/packages/core/scripts/check-consumer.mjs index cead9be..6bd2ca1 100644 --- a/packages/core/scripts/check-consumer.mjs +++ b/packages/core/scripts/check-consumer.mjs @@ -58,12 +58,12 @@ try { ` import assert from 'node:assert/strict'; import { - RC_2_SCHEMA_URI, + RC_4_SCHEMA_URI, RC_3_SCHEMA_URI, - migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc4, migrateMcpDescription07ToRc3, projectEffectiveProtocolView, - rc2Snapshot, + rc4Snapshot, rc3Snapshot, resolveMcpDescriptionComponentReferences, serializeMcpDescriptionMigrationReport, @@ -77,7 +77,7 @@ try { import { validateMcpDescription } from '@mcpdesc/validator/browser'; const source = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'consumer-smoke', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -101,7 +101,7 @@ try { assert.deepEqual(parsed.value, source); const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); @@ -110,13 +110,13 @@ try { assert.deepEqual(result.value.tools.map((tool) => tool.name), ['current']); const selection = selectMcpDescriptionDeclarations(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: ['legacy'] }, }); assert.equal(selection.ok, true); assert.deepEqual(selection.value.tools.map((tool) => tool.name), ['legacy']); - const migration = migrateMcpDescription07ToRc2({ + const migration = migrateMcpDescription07ToRc4({ mcpdesc: '0.7.0', info: { name: 'legacy-consumer-smoke', @@ -126,19 +126,19 @@ try { transports: [{ type: 'stdio', command: 'server' }], tools: [{ name: 'legacy', inputSchema: { type: 'object' } }], }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', sourceValidated: true, }); assert.equal(migration.ok, true); assert.deepEqual(migration.value.protocolVersions, ['2025-11-25']); assert.equal(migration.report.status, 'success'); - const defaultedMigration = migrateMcpDescription07ToRc2({ + const defaultedMigration = migrateMcpDescription07ToRc4({ mcpdesc: '0.7.0', info: { name: 'defaulted-consumer-smoke', version: '1.0.0' }, transports: [{ type: 'stdio', command: 'server' }], }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }); @@ -155,29 +155,29 @@ try { defaultedMigration.report, ); assert.equal(validateMcpDescription(defaultedMigration.value, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', }).valid, true); - assert.equal(rc2Snapshot.specification, '0.8.0-rc.2'); + assert.equal(rc4Snapshot.specification, '0.8.0-rc.4'); - const rc2Migration = migrateMcpDescription07ToRc2({ + const rc4Migration = migrateMcpDescription07ToRc4({ mcpdesc: '0.7.0', info: { - name: 'legacy-rc2-consumer-smoke', + name: 'legacy-rc4-consumer-smoke', version: '1.0.0', protocolVersion: '2025-11-25', }, transports: [{ type: 'stdio', command: 'server' }], }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', sourceValidated: true, }); - assert.equal(rc2Migration.ok, true); - assert.equal(rc2Migration.value.$schema, RC_2_SCHEMA_URI); - assert.equal(rc2Migration.report.targetSpecification, '0.8.0-rc.2'); - assert.equal(validateMcpDescription(rc2Migration.value, { - specification: '0.8.0-rc.2', + assert.equal(rc4Migration.ok, true); + assert.equal(rc4Migration.value.$schema, RC_4_SCHEMA_URI); + assert.equal(rc4Migration.report.targetSpecification, '0.8.0-rc.4'); + assert.equal(validateMcpDescription(rc4Migration.value, { + specification: '0.8.0-rc.4', }).valid, true); - assert.equal(rc2Snapshot.specification, '0.8.0-rc.2'); + assert.equal(rc4Snapshot.specification, '0.8.0-rc.4'); const rc3Migration = migrateMcpDescription07ToRc3({ mcpdesc: '0.7.0', @@ -200,7 +200,7 @@ try { assert.equal(rc3Snapshot.specification, '0.8.0-rc.3'); const preStandardApps = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'pre-standard-apps', version: '1.0.0' }, protocolVersions: ['2025-11-25'], @@ -209,7 +209,7 @@ try { }], }; const appsValidation = validateMcpDescription(preStandardApps, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', }); assert.equal(appsValidation.valid, true); assert.deepEqual( @@ -218,7 +218,6 @@ try { ); for (const [specification, schemaUri] of [ - ['0.8.0-rc.2', RC_2_SCHEMA_URI], ['0.8.0-rc.3', RC_3_SCHEMA_URI], ]) { const reusable = { @@ -262,45 +261,45 @@ try { type McpDescComponentRegistries, } from '@mcpdesc/core/components'; import { - migrateMcpDescription07ToRc2, migrateMcpDescription07ToRc3, + migrateMcpDescription07ToRc4, serializeMcpDescriptionMigrationReport, - type MigrateMcpDescription07ToRc2Options, type MigrateMcpDescription07ToRc3Options, + type MigrateMcpDescription07ToRc4Options, } from '@mcpdesc/core'; const parsed = parseMcpDescriptionSource('{"mcpdesc":"0.8.0"}'); if (parsed.ok) { selectMcpDescriptionDeclarations(parsed.value, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: ['search'] }, }); } - const migrationOptions: MigrateMcpDescription07ToRc2Options = { - specification: '0.8.0-rc.2', + const migrationOptions: MigrateMcpDescription07ToRc4Options = { + specification: '0.8.0-rc.4', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }; - const migration = migrateMcpDescription07ToRc2( + const migration = migrateMcpDescription07ToRc4( { mcpdesc: '0.7.0', info: { name: 'typed', version: '1.0.0' } }, migrationOptions, ); serializeMcpDescriptionMigrationReport(migration.report); - const rc2MigrationOptions: MigrateMcpDescription07ToRc2Options = { - specification: '0.8.0-rc.2', + const rc4MigrationOptions: MigrateMcpDescription07ToRc4Options = { + specification: '0.8.0-rc.4', sourceValidated: true, }; - migrateMcpDescription07ToRc2( + migrateMcpDescription07ToRc4( { mcpdesc: '0.7.0', info: { - name: 'typed-rc2', + name: 'typed-rc4', version: '1.0.0', protocolVersion: '2025-11-25', }, }, - rc2MigrationOptions, + rc4MigrationOptions, ); const rc3MigrationOptions: MigrateMcpDescription07ToRc3Options = { specification: '0.8.0-rc.3', @@ -323,14 +322,6 @@ try { const components: McpDescComponentRegistries = { schemas: { Input: { type: 'object' }, Alias: reference }, }; - resolveMcpDescriptionComponentReferences( - { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, - { specification: '0.8.0-rc.2' }, - ); - resolveMcpDescriptionComponentReferences( - { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, - { specification: '0.8.0-rc.2' }, - ); resolveMcpDescriptionComponentReferences( { mcpdesc: '0.8.0', info: {}, protocolVersions: [], components }, { specification: '0.8.0-rc.3' }, diff --git a/packages/core/src/components.ts b/packages/core/src/components.ts index d3c4c3c..39d8022 100644 --- a/packages/core/src/components.ts +++ b/packages/core/src/components.ts @@ -5,7 +5,7 @@ import { } from '@mcpdesc/validator/standalone'; import type { CoreDiagnostic, McpDescriptionDocument } from './model.js'; -import { RC_2_SPECIFICATION, RC_3_SPECIFICATION } from './snapshot.js'; +import { RC_3_SPECIFICATION } from './snapshot.js'; export type { McpDescComponentNamespace, @@ -19,13 +19,10 @@ export type { } from './model.js'; export interface ResolveMcpDescriptionComponentReferencesOptions { - readonly specification: typeof RC_2_SPECIFICATION | typeof RC_3_SPECIFICATION; + readonly specification: typeof RC_3_SPECIFICATION; } -const componentReferenceSpecifications = new Set([ - RC_2_SPECIFICATION, - RC_3_SPECIFICATION, -]); +const componentReferenceSpecifications = new Set([RC_3_SPECIFICATION]); export interface McpDescriptionComponentReferenceProvenance { readonly referencePath: readonly (number | string)[]; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 2648098..706a89f 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -23,14 +23,14 @@ export { type ResolveMcpDescriptionComponentReferencesResult, } from './components.js'; export { - migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc4, migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, type McpDescriptionMigrationChange, type McpDescriptionMigrationDefault, type McpDescriptionMigrationReport, type McpDescriptionMigrationResult, - type MigrateMcpDescription07ToRc2Options, + type MigrateMcpDescription07ToRc4Options, type MigrateMcpDescription07ToRc3Options, } from './migration.js'; export { @@ -58,12 +58,12 @@ export { type SelectMcpDescriptionDeclarationsOptions, } from './selection.js'; export { - RC_2_SCHEMA_URI, - RC_2_SPECIFICATION, + RC_4_SCHEMA_URI, + RC_4_SPECIFICATION, RC_3_SCHEMA_URI, RC_3_SPECIFICATION, deprecatedCoreSpecifications, - rc2Snapshot, + rc4Snapshot, rc3Snapshot, type SupportedCoreSpecification, } from './snapshot.js'; diff --git a/packages/core/src/migration.ts b/packages/core/src/migration.ts index d731b0a..b0795d3 100644 --- a/packages/core/src/migration.ts +++ b/packages/core/src/migration.ts @@ -11,11 +11,11 @@ import type { McpDescriptionDocument, } from './model.js'; import { - RC_2_SCHEMA_URI, - RC_2_SPECIFICATION, + RC_4_SCHEMA_URI, + RC_4_SPECIFICATION, RC_3_SCHEMA_URI, RC_3_SPECIFICATION, - rc2Snapshot, + rc4Snapshot, rc3Snapshot, type SupportedCoreSpecification, } from './snapshot.js'; @@ -36,8 +36,8 @@ const declarationCollections = [ 'prompts', ] as const; -export interface MigrateMcpDescription07ToRc2Options { - readonly specification: typeof RC_2_SPECIFICATION; +export interface MigrateMcpDescription07ToRc4Options { + readonly specification: typeof RC_4_SPECIFICATION; readonly defaultProtocolVersion?: SupportedProtocolVersion; readonly protocolVersion?: SupportedProtocolVersion; readonly sourceValidated: true; @@ -51,7 +51,7 @@ export interface MigrateMcpDescription07ToRc3Options { } type SupportedMigrationOptions = - MigrateMcpDescription07ToRc2Options | MigrateMcpDescription07ToRc3Options; + MigrateMcpDescription07ToRc4Options | MigrateMcpDescription07ToRc3Options; export interface McpDescriptionMigrationDefault { readonly code: 'migration-default-protocol-version'; @@ -322,7 +322,7 @@ function migrateMcpDescription07( source: unknown, options: SupportedMigrationOptions, targetSpecification: SupportedCoreSpecification, - targetSchemaUri: typeof RC_2_SCHEMA_URI | typeof RC_3_SCHEMA_URI, + targetSchemaUri: typeof RC_3_SCHEMA_URI | typeof RC_4_SCHEMA_URI, targetProtocolVersions: readonly SupportedProtocolVersion[], ): McpDescriptionMigrationResult { if (options.specification !== targetSpecification) { @@ -495,16 +495,16 @@ export function serializeMcpDescriptionMigrationReport( return `${JSON.stringify(report, null, 2)}\n`; } -export function migrateMcpDescription07ToRc2( +export function migrateMcpDescription07ToRc4( source: unknown, - options: MigrateMcpDescription07ToRc2Options, + options: MigrateMcpDescription07ToRc4Options, ): McpDescriptionMigrationResult { return migrateMcpDescription07( source, options, - RC_2_SPECIFICATION, - RC_2_SCHEMA_URI, - rc2Snapshot.protocolVersions, + RC_4_SPECIFICATION, + RC_4_SCHEMA_URI, + rc4Snapshot.protocolVersions, ); } diff --git a/packages/core/src/snapshot.ts b/packages/core/src/snapshot.ts index 5fb2fab..6c7b0cd 100644 --- a/packages/core/src/snapshot.ts +++ b/packages/core/src/snapshot.ts @@ -3,28 +3,28 @@ import { supportedProtocolVersions, } from '@mcpdesc/validator/standalone'; -export const RC_2_SPECIFICATION = '0.8.0-rc.2' as const; -export const RC_2_SCHEMA_URI = - 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json' as const; +export const RC_4_SPECIFICATION = '0.8.0-rc.4' as const; +export const RC_4_SCHEMA_URI = + 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json' as const; export const RC_3_SPECIFICATION = '0.8.0-rc.3' as const; export const RC_3_SCHEMA_URI = 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' as const; export type SupportedCoreSpecification = - typeof RC_2_SPECIFICATION | typeof RC_3_SPECIFICATION; + typeof RC_3_SPECIFICATION | typeof RC_4_SPECIFICATION; export const deprecatedCoreSpecifications = Object.freeze([ - RC_2_SPECIFICATION, + RC_3_SPECIFICATION, ] as const); -const rc2Provenance = specificationProvenance[RC_2_SPECIFICATION]; const rc3Provenance = specificationProvenance[RC_3_SPECIFICATION]; +const rc4Provenance = specificationProvenance[RC_4_SPECIFICATION]; -export const rc2Snapshot = Object.freeze({ - specification: RC_2_SPECIFICATION, - schemaUri: RC_2_SCHEMA_URI, - snapshotTag: rc2Provenance.snapshotTag, - schemaSha256: rc2Provenance.schemaSha256, +export const rc4Snapshot = Object.freeze({ + specification: RC_4_SPECIFICATION, + schemaUri: RC_4_SCHEMA_URI, + snapshotTag: rc4Provenance.snapshotTag, + schemaSha256: rc4Provenance.schemaSha256, protocolVersions: supportedProtocolVersions, }); @@ -40,6 +40,6 @@ export function isSupportedCoreSpecification( specification: string, ): specification is SupportedCoreSpecification { return ( - specification === RC_2_SPECIFICATION || specification === RC_3_SPECIFICATION + specification === RC_3_SPECIFICATION || specification === RC_4_SPECIFICATION ); } diff --git a/packages/core/test/components.test.ts b/packages/core/test/components.test.ts index 63b5df1..f689179 100644 --- a/packages/core/test/components.test.ts +++ b/packages/core/test/components.test.ts @@ -11,7 +11,7 @@ import { const reusableComponents = JSON.parse( readFileSync( new URL( - '../../validator/test/snapshots/0.8.0-rc.2/fixtures/expected-valid/reusable-components.json', + '../../validator/test/snapshots/0.8.0-rc.3/fixtures/expected-valid/reusable-components.json', import.meta.url, ), 'utf8', @@ -19,15 +19,6 @@ const reusableComponents = JSON.parse( ) as JsonObject; const laterReusableComponents = { - '0.8.0-rc.2': JSON.parse( - readFileSync( - new URL( - '../../validator/test/snapshots/0.8.0-rc.2/fixtures/expected-valid/reusable-components.json', - import.meta.url, - ), - 'utf8', - ), - ) as JsonObject, '0.8.0-rc.3': JSON.parse( readFileSync( new URL( @@ -41,7 +32,7 @@ const laterReusableComponents = { function resolve(document: unknown) { return resolveMcpDescriptionComponentReferences(document, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.3', }); } @@ -58,7 +49,7 @@ function expectDiagnostic( } describe('resolveMcpDescriptionComponentReferences', () => { - for (const specification of ['0.8.0-rc.2', '0.8.0-rc.3'] as const) { + for (const specification of ['0.8.0-rc.3'] as const) { it(`resolves ${specification} references with terminal provenance`, () => { const document = laterReusableComponents[specification]; const result = resolveMcpDescriptionComponentReferences(document, { @@ -150,7 +141,7 @@ describe('resolveMcpDescriptionComponentReferences', () => { it('is a cloning no-op without components', () => { const document = { - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', mcpdesc: '0.8.0', info: { name: 'no-components', version: '1.0.0' }, protocolVersions: ['2026-07-28'], @@ -167,7 +158,7 @@ describe('resolveMcpDescriptionComponentReferences', () => { it('composes with Effective Protocol View projection in either order', () => { const document = { - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', mcpdesc: '0.8.0', info: { name: 'composition', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -194,12 +185,12 @@ describe('resolveMcpDescriptionComponentReferences', () => { ); if (!resolvedFirst.ok) return; const thenProjected = projectEffectiveProtocolView(resolvedFirst.value, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.3', protocolVersion: '2026-07-28', }); const projectedFirst = projectEffectiveProtocolView(document, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.3', protocolVersion: '2026-07-28', }); expect(projectedFirst.ok).toBe(true); @@ -328,12 +319,12 @@ describe('resolveMcpDescriptionComponentReferences', () => { ]); }); - it('does not silently dispatch Draft 4 to the RC.1 resolver', () => { + it('rejects selectors without the required provenance-aware resolver', () => { const result = resolveMcpDescriptionComponentReferences( reusableComponents, { specification: '0.8.0-draft.4', - } as unknown as { specification: '0.8.0-rc.2' }, + } as unknown as { specification: '0.8.0-rc.3' }, ); expect(result).toEqual({ @@ -346,5 +337,19 @@ describe('resolveMcpDescriptionComponentReferences', () => { }), ], }); + + const rc4 = resolveMcpDescriptionComponentReferences(reusableComponents, { + specification: '0.8.0-rc.4', + } as unknown as { specification: '0.8.0-rc.3' }); + expect(rc4).toEqual({ + ok: false, + diagnostics: [ + expect.objectContaining({ + code: 'unsupported-specification', + phase: 'operation', + path: [], + }), + ], + }); }); }); diff --git a/packages/core/test/merge.test.ts b/packages/core/test/merge.test.ts index 439bf74..615f479 100644 --- a/packages/core/test/merge.test.ts +++ b/packages/core/test/merge.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; import { - RC_2_SCHEMA_URI, + RC_4_SCHEMA_URI, areMcpDescriptionDocumentsSemanticallyEquivalent, mergeEffectiveProtocolViews, projectEffectiveProtocolView, @@ -11,7 +11,7 @@ const extensions = { 'io.modelcontextprotocol/ui': { mimeTypes: ['text/html;profile=mcp-app'] }, }; const source = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'extension-round-trip', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -23,7 +23,7 @@ describe('mergeEffectiveProtocolViews', () => { const original = structuredClone(source); const views = source.protocolVersions.map((protocolVersion) => { const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion, }); expect(result.ok).toBe(true); @@ -32,7 +32,7 @@ describe('mergeEffectiveProtocolViews', () => { }); const merged = mergeEffectiveProtocolViews(views, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', }); expect(merged.ok).toBe(true); if (!merged.ok) return; @@ -40,7 +40,7 @@ describe('mergeEffectiveProtocolViews', () => { for (const [index, protocolVersion] of source.protocolVersions.entries()) { const roundTrip = projectEffectiveProtocolView(merged.value, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion, }); expect(roundTrip.ok).toBe(true); @@ -61,7 +61,7 @@ describe('mergeEffectiveProtocolViews', () => { mimeTypes: ['text/plain'], }; const result = mergeEffectiveProtocolViews([source, changed], { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', }); expect(result.ok).toBe(false); expect(result.diagnostics).toContainEqual( diff --git a/packages/core/test/migration.test.ts b/packages/core/test/migration.test.ts index e9897b9..3bef8bf 100644 --- a/packages/core/test/migration.test.ts +++ b/packages/core/test/migration.test.ts @@ -1,12 +1,12 @@ import { describe, expect, it } from 'vitest'; import { - RC_2_SCHEMA_URI, + RC_4_SCHEMA_URI, RC_3_SCHEMA_URI, - migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc4, migrateMcpDescription07ToRc3, serializeMcpDescriptionMigrationReport, - type MigrateMcpDescription07ToRc2Options, + type MigrateMcpDescription07ToRc4Options, } from '../src/index.js'; const source = { @@ -41,20 +41,20 @@ const source = { 'x-example': { retained: true }, }; -describe('migrateMcpDescription07ToRc2', () => { - it('uses a source protocol version and validates the exact RC.2 snapshot', () => { - const result = migrateMcpDescription07ToRc2(source, { - specification: '0.8.0-rc.2', +describe('migrateMcpDescription07ToRc4', () => { + it('uses a source protocol version and validates the exact RC.4 snapshot', () => { + const result = migrateMcpDescription07ToRc4(source, { + specification: '0.8.0-rc.4', sourceValidated: true, }); expect(result.ok).toBe(true); if (!result.ok) return; - expect(result.value.$schema).toBe(RC_2_SCHEMA_URI); + expect(result.value.$schema).toBe(RC_4_SCHEMA_URI); expect(result.value.mcpdesc).toBe('0.8.0'); expect(result.value.protocolVersions).toEqual(['2025-11-25']); expect(result.report.sourceSpecification).toBe('0.7.0'); - expect(result.report.targetSpecification).toBe('0.8.0-rc.2'); + expect(result.report.targetSpecification).toBe('0.8.0-rc.4'); expect(result.report.defaultsApplied).toEqual([]); }); @@ -62,14 +62,14 @@ describe('migrateMcpDescription07ToRc2', () => { const { protocolVersion: _, ...info } = source.info; const withoutProtocol = { ...source, info }; const options = { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', defaultProtocolVersion: '2026-07-28', sourceValidated: true, } as const; const originalSource = structuredClone(withoutProtocol); const originalOptions = structuredClone(options); - const result = migrateMcpDescription07ToRc2(withoutProtocol, options); + const result = migrateMcpDescription07ToRc4(withoutProtocol, options); expect(result.ok).toBe(true); if (!result.ok) return; @@ -102,9 +102,9 @@ describe('migrateMcpDescription07ToRc2', () => { it('returns the existing required error when no protocol version is available', () => { const { protocolVersion: _, ...info } = source.info; - const result = migrateMcpDescription07ToRc2( + const result = migrateMcpDescription07ToRc4( { ...source, info }, - { specification: '0.8.0-rc.2', sourceValidated: true }, + { specification: '0.8.0-rc.4', sourceValidated: true }, ); expect(result.ok).toBe(false); @@ -117,8 +117,8 @@ describe('migrateMcpDescription07ToRc2', () => { }); it('prefers the source over a conflicting default but preserves explicit override conflicts', () => { - const defaultResult = migrateMcpDescription07ToRc2(source, { - specification: '0.8.0-rc.2', + const defaultResult = migrateMcpDescription07ToRc4(source, { + specification: '0.8.0-rc.4', defaultProtocolVersion: '2026-07-28', sourceValidated: true, }); @@ -133,8 +133,8 @@ describe('migrateMcpDescription07ToRc2', () => { ); } - const conflict = migrateMcpDescription07ToRc2(source, { - specification: '0.8.0-rc.2', + const conflict = migrateMcpDescription07ToRc4(source, { + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', sourceValidated: true, }); @@ -149,11 +149,11 @@ describe('migrateMcpDescription07ToRc2', () => { it('rejects unsupported defaults at the runtime boundary', () => { const { protocolVersion: _, ...info } = source.info; const options = { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', defaultProtocolVersion: '2099-01-01', sourceValidated: true, - } as unknown as MigrateMcpDescription07ToRc2Options; - const result = migrateMcpDescription07ToRc2({ ...source, info }, options); + } as unknown as MigrateMcpDescription07ToRc4Options; + const result = migrateMcpDescription07ToRc4({ ...source, info }, options); expect(result.ok).toBe(false); expect(result.diagnostics).toContainEqual( @@ -166,8 +166,8 @@ describe('migrateMcpDescription07ToRc2', () => { }); it('reports generated names, deduplication, and result-validation failures', () => { - const converted = migrateMcpDescription07ToRc2(source, { - specification: '0.8.0-rc.2', + const converted = migrateMcpDescription07ToRc4(source, { + specification: '0.8.0-rc.4', sourceValidated: true, }); expect(converted.report.status).toBe('success-with-warnings'); @@ -188,8 +188,8 @@ describe('migrateMcpDescription07ToRc2', () => { transports: [{ type: 'stdio', command: 'server' }], tools: [{ name: 'missing_input_schema' }], }; - const failed = migrateMcpDescription07ToRc2(invalidTarget, { - specification: '0.8.0-rc.2', + const failed = migrateMcpDescription07ToRc4(invalidTarget, { + specification: '0.8.0-rc.4', sourceValidated: true, }); expect(failed.ok).toBe(false); @@ -212,12 +212,12 @@ describe('migrateMcpDescription07ToRc2', () => { }, transports: [{ type: 'stdio', command: 'server' }], }; - const first = migrateMcpDescription07ToRc2(minimalSource, { - specification: '0.8.0-rc.2', + const first = migrateMcpDescription07ToRc4(minimalSource, { + specification: '0.8.0-rc.4', sourceValidated: true, }); - const second = migrateMcpDescription07ToRc2(minimalSource, { - specification: '0.8.0-rc.2', + const second = migrateMcpDescription07ToRc4(minimalSource, { + specification: '0.8.0-rc.4', sourceValidated: true, }); diff --git a/packages/core/test/projection.test.ts b/packages/core/test/projection.test.ts index a0e3553..dc457a2 100644 --- a/packages/core/test/projection.test.ts +++ b/packages/core/test/projection.test.ts @@ -1,15 +1,15 @@ import { describe, expect, it } from 'vitest'; import { - RC_2_SCHEMA_URI, + RC_4_SCHEMA_URI, RC_3_SCHEMA_URI, projectEffectiveProtocolView, - rc2Snapshot, + rc4Snapshot, rc3Snapshot, } from '../src/index.js'; const source = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'projection-test', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -63,7 +63,7 @@ describe('projectEffectiveProtocolView', () => { it('projects scoped declarations without mutating the source', () => { const original = structuredClone(source); const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); @@ -97,7 +97,7 @@ describe('projectEffectiveProtocolView', () => { it('rejects a target absent from the root protocol scope', () => { const result = projectEffectiveProtocolView(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2025-06-18', }); @@ -115,7 +115,7 @@ describe('projectEffectiveProtocolView', () => { const result = projectEffectiveProtocolView( { ...source, tools: [{ name: 'invalid' }] }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }, ); @@ -129,14 +129,14 @@ describe('projectEffectiveProtocolView', () => { ); }); - it('preserves pre-standard extension maps in RC.2 protocol views', () => { + it('preserves pre-standard extension maps in RC.4 protocol views', () => { const extensions = { 'io.modelcontextprotocol/ui': { mimeTypes: ['text/html;profile=mcp-app'], }, }; const document = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'pre-standard-extensions', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -145,7 +145,7 @@ describe('projectEffectiveProtocolView', () => { for (const protocolVersion of document.protocolVersions) { const result = projectEffectiveProtocolView(document, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion, }); expect(result.ok).toBe(true); @@ -153,14 +153,14 @@ describe('projectEffectiveProtocolView', () => { expect(result.value.capabilities).toEqual([{ extensions }]); } - expect(rc2Snapshot).toMatchObject({ - specification: '0.8.0-rc.2', - schemaUri: RC_2_SCHEMA_URI, - snapshotTag: 'v0.8.0-rc.2', + expect(rc4Snapshot).toMatchObject({ + specification: '0.8.0-rc.4', + schemaUri: RC_4_SCHEMA_URI, + snapshotTag: 'v0.8.0-rc.4', schemaSha256: - '40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8', + 'd38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef', }); - expect(Object.isFrozen(rc2Snapshot)).toBe(true); + expect(Object.isFrozen(rc4Snapshot)).toBe(true); }); it('publishes RC.3 snapshot metadata', () => { @@ -174,9 +174,36 @@ describe('projectEffectiveProtocolView', () => { expect(Object.isFrozen(rc3Snapshot)).toBe(true); }); + it('preserves protocol-independent RC.4 info metadata in older protocol views', () => { + const info = { + name: 'metadata-server', + title: 'Metadata Server', + version: '1.0.0', + description: 'Document-wide metadata', + icons: [{ src: 'https://example.com/icon.png' }], + websiteUrl: 'https://example.com/server', + }; + const result = projectEffectiveProtocolView( + { + $schema: RC_4_SCHEMA_URI, + mcpdesc: '0.8.0', + info, + protocolVersions: ['2024-11-05'], + }, + { + specification: '0.8.0-rc.4', + protocolVersion: '2024-11-05', + }, + ); + + expect(result.ok).toBe(true); + if (!result.ok) return; + expect(result.value.info).toEqual(info); + }); + it('projects every scoped root collection and preserves unscoped semantics', () => { const comprehensive = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'comprehensive', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -242,7 +269,7 @@ describe('projectEffectiveProtocolView', () => { }; const result = projectEffectiveProtocolView(comprehensive, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); @@ -274,14 +301,14 @@ describe('projectEffectiveProtocolView', () => { it('is idempotent for an already projected view', () => { const first = projectEffectiveProtocolView(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); expect(first.ok).toBe(true); if (!first.ok) return; const second = projectEffectiveProtocolView(first.value, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); expect(second).toEqual(first); @@ -289,14 +316,14 @@ describe('projectEffectiveProtocolView', () => { it('does not duplicate a warning emitted for both source and result', () => { const warningSource = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'warning', version: '1.0.0' }, protocolVersions: ['2026-07-28'], capabilities: [{ logging: {} }], }; const result = projectEffectiveProtocolView(warningSource, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', protocolVersion: '2026-07-28', }); diff --git a/packages/core/test/selection.test.ts b/packages/core/test/selection.test.ts index c8a7730..15709b5 100644 --- a/packages/core/test/selection.test.ts +++ b/packages/core/test/selection.test.ts @@ -1,12 +1,12 @@ import { describe, expect, it } from 'vitest'; import { - RC_2_SCHEMA_URI, + RC_4_SCHEMA_URI, selectMcpDescriptionDeclarations, } from '../src/index.js'; const source = { - $schema: RC_2_SCHEMA_URI, + $schema: RC_4_SCHEMA_URI, mcpdesc: '0.8.0', info: { name: 'selection-test', version: '1.0.0' }, protocolVersions: ['2025-11-25', '2026-07-28'], @@ -43,7 +43,7 @@ describe('selectMcpDescriptionDeclarations', () => { it('selects by normative identity and preserves every scoped variant', () => { const original = structuredClone(source); const result = selectMcpDescriptionDeclarations(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: ['shared'], resources: ['test://selected'], @@ -71,7 +71,7 @@ describe('selectMcpDescriptionDeclarations', () => { it('omits unselected and empty declaration collections', () => { const result = selectMcpDescriptionDeclarations(source, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: [] }, }); @@ -87,7 +87,7 @@ describe('selectMcpDescriptionDeclarations', () => { const result = selectMcpDescriptionDeclarations( { ...source, tools: [{ name: 'invalid' }] }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: ['invalid'] }, }, ); @@ -103,9 +103,9 @@ describe('selectMcpDescriptionDeclarations', () => { it('selects declarations from an RC.2 document', () => { const result = selectMcpDescriptionDeclarations( - { ...source, $schema: RC_2_SCHEMA_URI }, + { ...source, $schema: RC_4_SCHEMA_URI }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: ['other'] }, }, ); @@ -122,9 +122,9 @@ describe('selectMcpDescriptionDeclarations', () => { it('selects declarations from an RC.2 document', () => { const result = selectMcpDescriptionDeclarations( - { ...source, $schema: RC_2_SCHEMA_URI }, + { ...source, $schema: RC_4_SCHEMA_URI }, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', selections: { tools: ['other'] }, }, ); diff --git a/packages/core/test/specification-support.test.ts b/packages/core/test/specification-support.test.ts index a52407b..493f299 100644 --- a/packages/core/test/specification-support.test.ts +++ b/packages/core/test/specification-support.test.ts @@ -1,11 +1,11 @@ import { describe, expect, it } from 'vitest'; import { - RC_2_SCHEMA_URI, + RC_4_SCHEMA_URI, RC_3_SCHEMA_URI, deprecatedCoreSpecifications, mergeEffectiveProtocolViews, - migrateMcpDescription07ToRc2, + migrateMcpDescription07ToRc4, migrateMcpDescription07ToRc3, projectEffectiveProtocolView, resolveMcpDescriptionComponentReferences, @@ -20,18 +20,18 @@ type SelectorSensitiveOperation = | 'migrationFrom07' | 'projection' | 'selection'; -type SupportDisposition = 'supported'; +type SupportDisposition = 'supported' | 'unsupported'; const supportBySpecification = { - '0.8.0-rc.2': { + '0.8.0-rc.3': { componentResolution: 'supported', merge: 'supported', migrationFrom07: 'supported', projection: 'supported', selection: 'supported', }, - '0.8.0-rc.3': { - componentResolution: 'supported', + '0.8.0-rc.4': { + componentResolution: 'unsupported', merge: 'supported', migrationFrom07: 'supported', projection: 'supported', @@ -43,21 +43,21 @@ const supportBySpecification = { >; const schemaBySpecification = { - '0.8.0-rc.2': RC_2_SCHEMA_URI, '0.8.0-rc.3': RC_3_SCHEMA_URI, + '0.8.0-rc.4': RC_4_SCHEMA_URI, } as const satisfies Record; const migrateBySpecification = { - '0.8.0-rc.2': (source: unknown) => - migrateMcpDescription07ToRc2(source, { - specification: '0.8.0-rc.2', - sourceValidated: true, - }), '0.8.0-rc.3': (source: unknown) => migrateMcpDescription07ToRc3(source, { specification: '0.8.0-rc.3', sourceValidated: true, }), + '0.8.0-rc.4': (source: unknown) => + migrateMcpDescription07ToRc4(source, { + specification: '0.8.0-rc.4', + sourceValidated: true, + }), } satisfies Record< SupportedCoreSpecification, (source: unknown) => { readonly ok: boolean } @@ -75,8 +75,8 @@ const legacyDocument = { }; describe('selector-sensitive operation support', () => { - it('marks RC.2 as deprecated while keeping it operational', () => { - expect(deprecatedCoreSpecifications).toEqual(['0.8.0-rc.2']); + it('marks RC.3 as deprecated while keeping it operational', () => { + expect(deprecatedCoreSpecifications).toEqual(['0.8.0-rc.3']); expect(Object.isFrozen(deprecatedCoreSpecifications)).toBe(true); }); @@ -115,7 +115,22 @@ describe('selector-sensitive operation support', () => { const resolution = resolveMcpDescriptionComponentReferences(document, { specification, } as ResolveMcpDescriptionComponentReferencesOptions); - expect(resolution.ok).toBe(true); + if ( + supportBySpecification[specification].componentResolution === + 'supported' + ) { + expect(resolution.ok).toBe(true); + } else { + expect(resolution).toEqual({ + ok: false, + diagnostics: [ + expect.objectContaining({ + code: 'unsupported-specification', + phase: 'operation', + }), + ], + }); + } }); } }); diff --git a/packages/validator/CHANGELOG.md b/packages/validator/CHANGELOG.md index c8c8e63..9c4bae6 100644 --- a/packages/validator/CHANGELOG.md +++ b/packages/validator/CHANGELOG.md @@ -8,6 +8,22 @@ Dates for published releases are the UTC publication dates recorded by npm. ## [Unreleased] +## [0.11.0] - 2026-09-08 + +### Added + +- Added the immutable `0.8.0-rc.4` selector, including protocol-independent + root info metadata behavior and its frozen conformance fixture corpus. + +### Changed + +- Narrowed active runtime support to RC.3 and RC.4, deprecated RC.3, and removed + RC.2 from current registries, declarations, generated bundles, and package + contents while retaining its immutable source and fixtures in Git. +- Kept component reference resolution on RC.3 because RC.4's snapshot resolver + does not expose the terminal-target provenance required by the public result + contract. + ## [0.10.1] - 2026-09-07 ### Changed @@ -139,7 +155,8 @@ Dates for published releases are the UTC publication dates recorded by npm. - Added synchronous structural and semantic validation for parsed JavaScript values with deterministic diagnostics and exact selector dispatch. - Added ESM browser support, TypeScript declarations, embedded schema provenance, frozen fixtures, and package-content checks. -[Unreleased]: https://github.com/mcpdesc/core/compare/validator-v0.10.1...HEAD +[Unreleased]: https://github.com/mcpdesc/core/compare/validator-v0.11.0...HEAD +[0.11.0]: https://github.com/mcpdesc/core/compare/validator-v0.10.1...validator-v0.11.0 [0.10.1]: https://github.com/mcpdesc/core/compare/validator-v0.10.0...validator-v0.10.1 [0.10.0]: https://github.com/mcpdesc/core/compare/validator-v0.9.0...validator-v0.10.0 [0.9.0]: https://github.com/mcpdesc/core/compare/validator-v0.8.0...validator-v0.9.0 diff --git a/packages/validator/README.md b/packages/validator/README.md index f9ce99d..a3038b9 100644 --- a/packages/validator/README.md +++ b/packages/validator/README.md @@ -25,7 +25,7 @@ npm install @mcpdesc/validator import { validateMcpDescription } from '@mcpdesc/validator'; const result = validateMcpDescription(parsedDocument, { - specification: '0.8.0-rc.2', + specification: '0.8.0-rc.4', }); for (const diagnostic of result.diagnostics) { @@ -48,15 +48,19 @@ The package supports these immutable selectors, newest first: | Selector | First validator release | Embedded schema SHA-256 | |---|---|---| -| `0.8.0-rc.3` | `0.10.0` | `a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4` | -| `0.8.0-rc.2` (deprecated) | `0.9.0` | `40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8` | +| `0.8.0-rc.4` | `0.11.0` | `d38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef` | +| `0.8.0-rc.3` (deprecated) | `0.10.0` | `a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4` | The validator package embeds the schema and executable behavior for each -selector. RC.2 remains available for migration compatibility; new integrations -should select RC.3. Earlier selectors remain available by pinning an older +selector. RC.3 remains available for migration compatibility; new integrations +should select RC.4. Earlier selectors remain available by pinning an older immutable validator release. npm integrity and trusted-publishing provenance identify released package bytes; specification repository tags and commits are informational. +Component reference resolution remains available for RC.3. RC.4 validation is +supported, but its snapshot resolver does not expose the terminal-target +provenance required by the package's public resolution result contract. + ## Usage The `options` argument and exact `specification` selector are required. The unqualified selector `0.8.0` is intentionally unsupported because draft and release-candidate iterations are immutable compatibility contracts. @@ -127,20 +131,19 @@ Structural paths start with AJV's instance path. A `required` error appends its ## Support metadata -The package exports frozen `supportedSpecifications`, `deprecatedSpecifications`, `supportedProtocolVersions`, and `specificationProvenance` values. Provenance records include the snapshot tag, recorded schema URI, and embedded schema SHA-256 digest. Public validation dispatches through a registry keyed by exact specification selectors. The active selector set is `0.8.0-rc.2` and `0.8.0-rc.3`; `deprecatedSpecifications` contains RC.2. The protocol-version export is the deduplicated union supported by active snapshots. +The package exports frozen `supportedSpecifications`, `deprecatedSpecifications`, `supportedProtocolVersions`, and `specificationProvenance` values. Provenance records include the snapshot tag, recorded schema URI, and embedded schema SHA-256 digest. Public validation dispatches through a registry keyed by exact specification selectors. The active selector set is `0.8.0-rc.3` and `0.8.0-rc.4`; `deprecatedSpecifications` contains RC.3. The protocol-version export is the deduplicated union supported by active snapshots. -RC.2 and RC.3 also export the frozen `mcpExtensionCatalogue` and -`mcpExtensionMaturity` classifier. The catalogue pins its authoritative source, -effective date, and official or experimental identifier assignments. Catalogue -recognition establishes authority and maturity only; it does not validate -extension-specific settings. +The package also exports the frozen `mcpExtensionCatalogue` and +`mcpExtensionMaturity` classifier pinned by the RC.3 snapshot. The catalogue +records its authoritative source, effective date, and official or experimental +identifier assignments. Catalogue recognition establishes authority and +maturity only; it does not validate extension-specific settings. npm package SemVer tracks implementation releases independently from specification snapshot identity. Adding a later snapshot is additive: it must use a sibling implementation and selector rather than changing an existing snapshot's schema, semantics, metadata, fixtures, or results. -The RC.2 and RC.3 component resolvers report authored and terminal target -paths for successful substitutions. The additive tooling corrections do not -change snapshot schemas, validation results, diagnostics, or fixtures and are -recorded in the integrity manifest. +The RC.3 component resolver reports authored and terminal target paths for +successful substitutions. RC.4 component resolution is unavailable because its +snapshot resolver does not expose that provenance result. The runtime bundles its schema, performs no network fetches for external schema references, and imports no Node.js built-ins. Unresolved external Tool-schema references produce incomplete-validation warnings and are preserved. All three ESM entry points support Node.js 20 or later and browser bundlers. diff --git a/packages/validator/index.d.ts b/packages/validator/index.d.ts index 0b10fd2..adcdf9d 100644 --- a/packages/validator/index.d.ts +++ b/packages/validator/index.d.ts @@ -1,4 +1,4 @@ -export type McpDescriptionSpecification = '0.8.0-rc.2' | '0.8.0-rc.3'; +export type McpDescriptionSpecification = '0.8.0-rc.3' | '0.8.0-rc.4'; export type SupportedProtocolVersion = | '2024-11-05' @@ -38,7 +38,7 @@ export interface McpDescriptionComponentResolutionResult { } export interface ResolveMcpDescriptionComponentReferencesOptions { - readonly specification: '0.8.0-rc.2' | '0.8.0-rc.3'; + readonly specification: '0.8.0-rc.3'; } export type McpExtensionMaturity = 'official' | 'experimental' | 'uncatalogued'; @@ -56,16 +56,16 @@ export interface McpExtensionCatalogue { } export interface SpecificationProvenance { - readonly '0.8.0-rc.2': { - readonly snapshotTag: 'v0.8.0-rc.2'; - readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json'; - readonly schemaSha256: '40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8'; - }; readonly '0.8.0-rc.3': { readonly snapshotTag: 'v0.8.0-rc.3'; readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json'; readonly schemaSha256: 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4'; }; + readonly '0.8.0-rc.4': { + readonly snapshotTag: 'v0.8.0-rc.4'; + readonly schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json'; + readonly schemaSha256: 'd38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef'; + }; } export interface ResolveMcpDescriptionSpecificationOptions { @@ -89,8 +89,8 @@ export type McpDescriptionSpecificationResolution = | ResolvedMcpDescriptionSpecification | UnresolvedMcpDescriptionSpecification; -export declare const supportedSpecifications: readonly ['0.8.0-rc.2', '0.8.0-rc.3']; -export declare const deprecatedSpecifications: readonly ['0.8.0-rc.2']; +export declare const supportedSpecifications: readonly ['0.8.0-rc.3', '0.8.0-rc.4']; +export declare const deprecatedSpecifications: readonly ['0.8.0-rc.3']; export declare const supportedProtocolVersions: readonly [ '2024-11-05', diff --git a/packages/validator/package.json b/packages/validator/package.json index 716f746..aef4a74 100644 --- a/packages/validator/package.json +++ b/packages/validator/package.json @@ -1,6 +1,6 @@ { "name": "@mcpdesc/validator", - "version": "0.10.1", + "version": "0.11.0", "description": "Structural and semantic validation for MCP Description snapshots", "type": "module", "types": "./index.d.ts", @@ -31,8 +31,8 @@ }, "files": [ "src/index.js", - "src/snapshots/0.8.0-rc.2", "src/snapshots/0.8.0-rc.3", + "src/snapshots/0.8.0-rc.4", "standalone.js", "index.d.ts", "CHANGELOG.md", diff --git a/packages/validator/scripts/build-standalone.mjs b/packages/validator/scripts/build-standalone.mjs index 639aab7..768dfbe 100644 --- a/packages/validator/scripts/build-standalone.mjs +++ b/packages/validator/scripts/build-standalone.mjs @@ -12,7 +12,7 @@ const output = path.join(packageRoot, 'standalone.js'); const draft7Adapter = path.join(packageRoot, 'src/standalone/ajv-adapter.js'); const draft2020Adapter = path.join(packageRoot, 'src/standalone/ajv-2020-adapter.js'); const formatsAdapter = path.join(packageRoot, 'src/standalone/ajv-formats-adapter.js'); -const selectors = ['0.8.0-rc.2', '0.8.0-rc.3']; +const selectors = ['0.8.0-rc.3', '0.8.0-rc.4']; const schemas = selectors.map((selector) => JSON.parse(fs.readFileSync( path.join(packageRoot, 'src/snapshots', selector, 'schema.json'), 'utf8' diff --git a/packages/validator/scripts/check-browser-bundle.mjs b/packages/validator/scripts/check-browser-bundle.mjs index 1a13473..995a148 100644 --- a/packages/validator/scripts/check-browser-bundle.mjs +++ b/packages/validator/scripts/check-browser-bundle.mjs @@ -80,12 +80,12 @@ if (/\beval\s*\(|\bnew\s+Function\b/.test(standalone)) { if (/\bnode:/.test(standalone)) { throw new Error('Standalone bundle contains a Node.js built-in import'); } -for (const selector of ['0.8.0-rc.2', '0.8.0-rc.3']) { +for (const selector of ['0.8.0-rc.3', '0.8.0-rc.4']) { if (!standalone.includes(selector)) { throw new Error(`Standalone bundle is missing runtime snapshot ${selector}`); } } -for (const selector of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1']) { +for (const selector of ['0.8.0-draft.1', '0.8.0-draft.2', '0.8.0-draft.3', '0.8.0-draft.4', '0.8.0-rc.1', '0.8.0-rc.2']) { if (standalone.includes(selector)) { throw new Error(`Standalone bundle contains retired runtime snapshot ${selector}`); } diff --git a/packages/validator/scripts/check-package.mjs b/packages/validator/scripts/check-package.mjs index 12ef953..951958e 100644 --- a/packages/validator/scripts/check-package.mjs +++ b/packages/validator/scripts/check-package.mjs @@ -42,14 +42,14 @@ const expected = [ 'package.json', 'standalone.js', 'src/index.js', - 'src/snapshots/0.8.0-rc.2/base.js', - 'src/snapshots/0.8.0-rc.2/index.js', - 'src/snapshots/0.8.0-rc.2/schema.json', - 'src/snapshots/0.8.0-rc.2/semantic.js', 'src/snapshots/0.8.0-rc.3/base.js', 'src/snapshots/0.8.0-rc.3/index.js', 'src/snapshots/0.8.0-rc.3/schema.json', - 'src/snapshots/0.8.0-rc.3/semantic.js' + 'src/snapshots/0.8.0-rc.3/semantic.js', + 'src/snapshots/0.8.0-rc.4/base.js', + 'src/snapshots/0.8.0-rc.4/index.js', + 'src/snapshots/0.8.0-rc.4/schema.json', + 'src/snapshots/0.8.0-rc.4/semantic.js' ].sort(); if (JSON.stringify(actual) !== JSON.stringify(expected)) { diff --git a/packages/validator/snapshot-integrity.json b/packages/validator/snapshot-integrity.json index b085172..578c1b0 100644 --- a/packages/validator/snapshot-integrity.json +++ b/packages/validator/snapshot-integrity.json @@ -123,6 +123,22 @@ "path": "src/snapshots/0.8.0-rc.3/semantic.js", "sha256": "2b18029a385e0e22a34ea058aae5e5e0ec28aeea77df532d84000d6b0a6bc680" }, + { + "path": "src/snapshots/0.8.0-rc.4/base.js", + "sha256": "6b264a90a418fa0aafad71b6dc5400d77b21a0e0d2ff453d05027b87e63825f3" + }, + { + "path": "src/snapshots/0.8.0-rc.4/index.js", + "sha256": "ead059cb6cd88f0fe38cb5a92072b8872af1cd365ce726cbc0955f7fee316e9b" + }, + { + "path": "src/snapshots/0.8.0-rc.4/schema.json", + "sha256": "d38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef" + }, + { + "path": "src/snapshots/0.8.0-rc.4/semantic.js", + "sha256": "e085d09eabb0c724fd5d5adcd4175e573a2c860f0c6fcf3b12017f934dcf3496" + }, { "path": "test/snapshots/0.8.0-draft.1/README.md", "sha256": "13c454714d2aabc3becf14a3c9e23e3dab4c3abfa1bc8f6aa3efb26e07d19c65" @@ -2622,6 +2638,398 @@ { "path": "test/snapshots/0.8.0-rc.3/fixtures/expected-warning/unresolved-external-tool-ref.json", "sha256": "53f66f56c2040ffd88bd3f47394ea4f00301ef6a53c69731d8e824aedf1d9213" + }, + { + "path": "test/snapshots/0.8.0-rc.4/README.md", + "sha256": "13bc997094f1afd1b99090c3ebda2a1eedd9bb3dc9579f046bec46591389f96b" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/closed-protocol-enum.json", + "sha256": "80584a3eb145c62661ac33a9ee43ffd10d8db18e9c0cd55e12a7b6bcc5fc05eb" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-examples.json", + "sha256": "5e02f403d8d4c88c001975412e413c4281bb2ff08dc99baed642840741cf0128" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-schemas.json", + "sha256": "13852d3292b00ee26109aecefad21448f3f95b71c889d773360d501ee4091b30" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-extension-boundaries.json", + "sha256": "797025e39c00502affd6b5c651603a9e3d94b663cba788eb53c4755fb63d98f3" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-protocol-scope.json", + "sha256": "0c666a200e3b3b3a630a8ed6cbd56a60ac698533df07003ec696267d91020ade" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-reference-resolution.json", + "sha256": "92817c8a36b14e38b8d875ce2e094fb338baa36cd0ef8cd088909f85d29f7d96" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/components-empty-and-reference-shapes.json", + "sha256": "8d905979442c3055c4d00cbb1fc9398143d8d1be72e3338df3f1a76a03a1bafc" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-mcp-header.json", + "sha256": "6419f1fac7e077248d451a405492a2b8683a071f978db8154916b98c40db1fe3" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-security-scope.json", + "sha256": "787941132c8d26f0ddacbdbddf6fb5f973f85c36b5ed4878eafbc811e7f9d144" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-tag-reference.json", + "sha256": "8e84d65e192c1216ec363ae130972106d5b8855565007136db02b2ef8148d1e0" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-branch-mixing.json", + "sha256": "e588f19f0315fe07c496f034bb37846f9be2ca8f4ee96561113f5d049b4b0b36" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-form-semantics.json", + "sha256": "fcc73c04b4f5ac6d57f5ca4577c96a2dc59ff2a4d55e491e28b78d434860f7bd" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-scope-outside-parent.json", + "sha256": "e0218efd03109c212d9e21b0ae267a04840dadc04e1ef248143197aa2fb9132f" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-version-mismatch.json", + "sha256": "ff04bc691fa27dd3381004675abd96fb6e83f2a8874d11dbdf53a28ed231b490" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-client-capability-requirements.json", + "sha256": "f67d8e6fec4c9b00526a1dd10499ebd7e274f96de9a1ed6b33f338cf3757d190" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-nested-collections.json", + "sha256": "2cfbfe8b2709807d07b16951de76ee3a7304f4f6555608cafea6337a502f1367" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-root-collections.json", + "sha256": "677bfa77dd7d768f0eafac8b08f14034017770a612f8f576b9213efaee1292c6" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-tag-catalog-reference.json", + "sha256": "e965960907fa06dcaae6a9932f29750781dc4d627a753840cbbd91d6a5e6b3ab" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-completion-example-semantics.json", + "sha256": "d5f94963fd7e8d3cd8807deed31f947e9964cd9428c024a98083ae33422ea58a" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-placement.json", + "sha256": "eb769260eae4fd9bfaa630de5797f8fc06f75dccea31436110223fef6f85c6e3" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-value.json", + "sha256": "04bcc28e21fffec80291f81a3de3e33f5d8d5038071588ab23f4a3288869139c" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-prompt-example-semantics.json", + "sha256": "b85da6c77937b8501a3f52820d8da657cd7146a3e126a0ab08b958220e2ec677" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-resource-annotations.json", + "sha256": "57eef6676ee52b3d28fcd963a834cf4bc7dd7b7a92d9c61401fc7ea81d496ce0" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-security-scheme-name.json", + "sha256": "3afbe7243a8bd4ec62b1243d8dba5baea7c8852dd797539938f2dae3e6634ccf" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-example-result-semantics.json", + "sha256": "a10c40e5ac1cc6c4b0ae3153b146849147b2ece74869a16f8ad967ddd3447b02" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json", + "sha256": "14f0fdead6f82f325d04c3a54066189e8dcf5ffcb6ce5c230a763e7e19f90a78" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-completion-examples.json", + "sha256": "4703b94465b84263fb69ae0e155dc8519ff6dfd8a8540ae655af4aa34073be7d" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-extension-identifier.json", + "sha256": "5487185dbe81bea76ab2a8aeda4e4a328dbe9d7e6309b3d8937455b8a3366e55" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json", + "sha256": "42833f6fde4096e10a0edaa38557ad3c000505c89ce7a4747c6a0fb362625c0c" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-prompt-examples.json", + "sha256": "04df377ddddd165463671a049b02f6e3153056e2b721a02158c98b49244a54c2" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-examples.json", + "sha256": "500b44e4950d6b6242cfa7879d24a9e293029d9232ad11b24faad8f245d612e7" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-template-example.json", + "sha256": "933ad9d434f126ca80efc8f159984a38130345b3d3a609f2613b850abe4f6979" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-examples.json", + "sha256": "d86441aa49f6a1482054f5e99fd19f3b4838c4d2c54fdad320152b8ed80a3311" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-interaction-examples.json", + "sha256": "be3d143d523ec5323e449416d66b42ae7ad1faefbff0ef0221c266b96cd5c418" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-schema.json", + "sha256": "95b990701002ed231cd60b590a77c5fb5f2b6ad2e162ef56b17129978f298925" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-invalid-key.json", + "sha256": "14a9723c7bf6d04e22b375ce92361b93de45f6368865c22486d1e1f5e99c66f2" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-reserved-key-misuse.json", + "sha256": "8e3fa0ec45d006ab43c98296e3370c89dc7a2fb53c4fc0b0a5af1bde243ea25d" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/missing-tool-input-schema.json", + "sha256": "3d67b43b4c24e888caeb214ac98757c6eb0661952d474a88723efe9072fc2354" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-oauth-scopes.json", + "sha256": "02b414d1a0e35605f415ed93f326a6807b2ea9846e425b94364d1ed411afdea6" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-object-output-schema-before-2026.json", + "sha256": "f7424c11b6ffa11fedb4927a2f0d6d2c5b1780664a9a6e1c35971ea5d626db72" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/oauth-flow-missing-required-url.json", + "sha256": "8941d934395e5255cbbf22e1d45fa141047c2c4a31e970e0748b0d19d5c049b1" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json", + "sha256": "51e06a6bfa887f34d55398a171d3d9611f68228693e07f20240b6debfe66da2f" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-capability-map.json", + "sha256": "c3f496309e101c6e6bfa0e11ff6424c108a9cb56ba1672a83f84beb72b4d56e6" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-domain-map.json", + "sha256": "5af2d0f99f5e33457fbd0cf2fb9fd89eb3f2b32107a3707e1c78be3a47e64475" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-native-content.json", + "sha256": "5db5188afdfbb25ef8689800d60dc4512e54ed57b23275946b389178856b1c64" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-security-requirement.json", + "sha256": "34ca2d488a9fe80e79267a6f7495247b50031117634824600ed671b39e989166" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-unknown-property.json", + "sha256": "3689a7f000da585b772db20a24077d9c5ce5889392a052b303f75a9f5ac1ff16" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-capabilities.json", + "sha256": "21cb847a35ecdb117cc26dcae21f155e2b7e5ba047d4da74f7b54eb033af89e2" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-tool-scope.json", + "sha256": "a3bca65315c76bd8d0ce5ec9e729d1b4db45009c297224fec9fd755398427d5f" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-cache-fields.json", + "sha256": "10a502fcc561e88021bee4969aa2589b6fc0df4e6d1b2ae5e34f803821fd2969" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-result-semantics.json", + "sha256": "d15ccb440144cfbffac41ca4dc52811912fca735bfd1de73bacc355b93e15a50" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-execution.json", + "sha256": "9d95e058d04e96e67f6812b27f89c993d498375a585bf89d171ee7adf191d777" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-mcp-header.json", + "sha256": "7db400388bfdf977ff29477ee4cac75f13a98e2573c12689a2a61f8b9a0f0815" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-streamable-http.json", + "sha256": "78cb85e04bcf9f5dd57f595fe57147372eec25d006105994553810d2aa94d27e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json", + "sha256": "489a0c98a5cb7c8fb8bfc21c75b490fab71c27bc88d801eba185b56c59c7b1c7" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json", + "sha256": "3bd892f3872a8fe1609a8d8f2f66b8899c4fc0ac4bb2cd50dd0b99fc1353315c" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-tool-example.json", + "sha256": "0a025ea249bc73b6209e0ff7d0bd0f5c583d408dffb37e4007a2521acbb6a70c" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/root-version-without-transport.json", + "sha256": "98b914f5b91e60d4f24e5c75eb4ed81586e77e65a9a27f0407c53f0ebd549c9e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/scoped-version-not-in-root.json", + "sha256": "2cb3d540044ea68943581d23fb50b596b2bfb27cac30b9f55c71117ec24d1af8" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/tool-example-schema-mismatches.json", + "sha256": "d595cc643c819d40faaa7a6698f2fe6fb1cee4a6adbe80c7a084dde351632b3b" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unknown-security-reference.json", + "sha256": "9bdc0045f6e77fad42a042d6bb46e472be6cb83d721a1ad200020f042a968c6e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unresolved-local-tool-ref.json", + "sha256": "43395515fe5225682551e16df756f3b78eb2e22474082f0ca4b7c863f4d0aff9" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/client-capability-requirements.json", + "sha256": "4df4d69ce019f896c7a7a44240e440f1d90051808bc5b4d240ed41667b38389f" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/distinct-tool-and-resource-annotations.json", + "sha256": "69d0d0437897b97d85a5ea62fc707995133dd9a15f07ad79830ce6f08163c8a3" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/elicitation-declarations.json", + "sha256": "f5f8d188ca2591d2ddd8ff8e51f8c2d56088325c14812ca051c51b332e3c7dd1" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/integrated-draft2-features.yaml", + "sha256": "6da1ece6185c5614c0b0cd09c11a79f2eede7ea7acc60508ff4931064a14e362" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/meta-literal-values.json", + "sha256": "19b2e3d79fc8bd0eb61c68a35c943fd8ed119fc6a8c8f7e3c9ff1543ff610025" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/minimal-zero-primitives.json", + "sha256": "85df0a779423fd542544dd1f7e17ee10aa5a29d930787a439fad68532a3596c9" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-completion-examples.json", + "sha256": "560431c3d53126869d36b22b3b37e33c622964787d91d06b936a818bfe4362ec" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-prompt-examples.json", + "sha256": "2ae586f0706c7751ab590c96684398162440f48f6bccbbb7ab74d2b303b28733" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-resource-examples.json", + "sha256": "6a8e148d80f849b58900b3ec9113d7d4831c2149c8a0b20497a7c7b6ead0b936" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-examples.json", + "sha256": "9184ed7d9e75a8fd2172f12cc95b29d694bfc29a6248580c1eac41eb2ba1259e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-interaction-examples.json", + "sha256": "e6546611d770094a01add56d52ab300d844ce2254ea01b8fe43dbe1784b9e8ca" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/object-level-specification-extensions.json", + "sha256": "fed01212636a910cf2f552cf2b95f4cf7fd41213a08ebecd8cef85e6987bd35e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json", + "sha256": "3d73fa798e733d4459af8d72de20ae7b728a5e278964524f2bcaf758271166c5" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-independent-info-metadata.json", + "sha256": "c73f54b871891b4a99d3937a49e521553c687e8fc93d805ebcef936e6f10d999" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-scoped-primitives.json", + "sha256": "b936a89c30732d7d6b88f439ada34e7b550cd2896bb861287ea5f3bef11448f6" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/reusable-components.json", + "sha256": "02c2854ba9615c51b8509a300b7420dd36edda7b394650bd8fcc4c1733395049" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-composition-and-inheritance.json", + "sha256": "42f09157464728532521ab6250b4b01ac7c5c28ebc7f3e659f876ecabcc1f844" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-root-and-override.json", + "sha256": "a657f734d86ab398e9eadcae278799659b6ddc1d78ba7a89c2ab12580abdb839" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/tagged-surface.json", + "sha256": "48bd507ab209aec9357af19385584904e8b99914ff515749fe10a75f98424e5a" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-valid/unknown-extension-identifier.json", + "sha256": "c78cc139ce0a6c0a92b90882d29fad3ec35b50a7a89a52d25f87ceae8adf54d9" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/deprecated-client-capability-requirements.json", + "sha256": "3a880524bb4bbac5fa8a9ba84f668c2b5ff3c9715faacc906b50180567569ea8" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-completion-examples.json", + "sha256": "1ff42aeac28b4d23691806f079354592179c365b9fbce026be46767a27604115" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-sse-modern-revision.json", + "sha256": "c67ea5995b407cce8c1657fb115c7429e726a9d4d22016b1c5fdc06157495ca4" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/logging-deprecated-2026.json", + "sha256": "1b14cc560a406a6dee08c979f37a6a6ddf979e37e2af5e1d415f6948e6fb241d" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-example.json", + "sha256": "208d3489916f8963ba6a6f8b0de42e821ee7dd94659899dcfad14504edb2aaa5" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-schema-shape.json", + "sha256": "35a980be57a39a1198737402091a0e92525a6d8f74ed946c637721f51b6bca6e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-standard-extension-capabilities.json", + "sha256": "9753a5d6dbbdfc7b507fb9bf6555faf5393babcda8260e32f44401dd876e421e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/resource-example-consistency.json", + "sha256": "de3018e1b1472cdd39d2b4354b074abdecaf4928b3ff5a53669c64a8c9445733" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json", + "sha256": "ea171c73df0fe870811b1a0dd7d178989624f2b7efaf8b72fc24aaa8ee4b5ac0" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-oauth-scope.json", + "sha256": "8b589b489b270acee2732e97cee39e496410b8712d15e1541b9b40fed66ee6cf" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-openid-scope.json", + "sha256": "217d2d22847b39303927677ead9fffebe114ece17dcb371955a2b7aa05e3602a" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-extension-identifier.json", + "sha256": "590fd9647f657538bd8ee8f785e93261cd57833295a3764ecf4c77108b11701e" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-meta-key.json", + "sha256": "e4cb72cec1556e10741ea651eb199c713f9c5b0857b4a4705e43d39387dcbb25" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-example-ref.json", + "sha256": "d367dbfac20656ff71e928b2af48f78170944fad46194f23b6528d17227020f9" + }, + { + "path": "test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-ref.json", + "sha256": "c2db593bb9a5d031df319b932c49ad0adde4c6c47ef18c36a76f40a3b4da6ea6" } ] } diff --git a/packages/validator/src/index.js b/packages/validator/src/index.js index b63f00e..02c7914 100644 --- a/packages/validator/src/index.js +++ b/packages/validator/src/index.js @@ -1,31 +1,29 @@ -import * as rc2 from './snapshots/0.8.0-rc.2/index.js'; import * as rc3 from './snapshots/0.8.0-rc.3/index.js'; -import { resolveComponentReferences as resolveRc2ComponentReferences } from './snapshots/0.8.0-rc.2/semantic.js'; +import * as rc4 from './snapshots/0.8.0-rc.4/index.js'; import { resolveComponentReferences as resolveRc3ComponentReferences } from './snapshots/0.8.0-rc.3/semantic.js'; import { mcpExtensionCatalogue, mcpExtensionMaturity -} from './snapshots/0.8.0-rc.2/semantic.js'; +} from './snapshots/0.8.0-rc.3/semantic.js'; export { mcpExtensionCatalogue, mcpExtensionMaturity }; const snapshots = Object.freeze({ - [rc2.specification]: rc2, - [rc3.specification]: rc3 + [rc3.specification]: rc3, + [rc4.specification]: rc4 }); const componentResolvers = Object.freeze({ - '0.8.0-rc.2': resolveRc2ComponentReferences, '0.8.0-rc.3': resolveRc3ComponentReferences }); const schemaUris = Object.freeze({ - '0.8.0-rc.2': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', - '0.8.0-rc.3': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' + '0.8.0-rc.3': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', + '0.8.0-rc.4': 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json' }); export const supportedSpecifications = Object.freeze(Object.keys(snapshots)); -export const deprecatedSpecifications = Object.freeze(['0.8.0-rc.2']); +export const deprecatedSpecifications = Object.freeze(['0.8.0-rc.3']); export const supportedProtocolVersions = Object.freeze([ ...new Set(Object.values(snapshots).flatMap((snapshot) => snapshot.supportedProtocolVersions)) ]); diff --git a/packages/validator/src/snapshots/0.8.0-rc.4/base.js b/packages/validator/src/snapshots/0.8.0-rc.4/base.js new file mode 100644 index 0000000..9e92b38 --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.4/base.js @@ -0,0 +1,1412 @@ +// Provide structural and semantic validation for MCP Description v0.8.0. +// +// The exported helpers complement the published JSON Schema with cross-object +// rules for protocol scopes, revision applicability, security, tags, embedded +// Tool schemas and examples, Resource examples, Elicitation Declarations, +// transports, and extension namespaces. Diagnostics +// distinguish fatal errors from nonfatal warnings. External schema references +// are never fetched automatically; unresolved targets are preserved and reported. + +import Ajv from 'ajv'; +import Ajv2020 from 'ajv/dist/2020.js'; +import addFormats from 'ajv-formats'; +import { UriTemplateMatcher } from 'uri-template-matcher'; + +export const supportedProtocolVersions = Object.freeze([ + '2024-11-05', + '2025-03-26', + '2025-06-18', + '2025-11-25', + '2026-07-28' +]); + +const protocolOrder = new Map(supportedProtocolVersions.map((version, index) => [version, index])); +const toolSchemaDialectVersion = '2025-11-25'; +const completeSemanticConformanceVersion = '2025-06-18'; +export const mcpExtensionCatalogue = Object.freeze({ + effectiveDate: '2026-09-04', + source: 'https://modelcontextprotocol.io/extensions/overview', + officialIdentifiers: Object.freeze([ + 'io.modelcontextprotocol/enterprise-managed-authorization', + 'io.modelcontextprotocol/oauth-client-credentials', + 'io.modelcontextprotocol/tasks', + 'io.modelcontextprotocol/ui' + ]), + experimentalIdentifiers: Object.freeze([]) +}); +const metaKeyPattern = /^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/; + +export function mcpExtensionMaturity(identifier) { + if (mcpExtensionCatalogue.officialIdentifiers.includes(identifier)) return 'official'; + if (mcpExtensionCatalogue.experimentalIdentifiers.includes(identifier)) return 'experimental'; + return 'uncatalogued'; +} + +function createValidatorForDialect(dialect) { + const Factory = dialect === '2020-12' ? Ajv2020 : Ajv; + const instance = new Factory({ allErrors: true, strict: false }); + addFormats(instance); + return instance; +} + +function normalizeScope(scope) { + return [...scope].sort((left, right) => protocolOrder.get(left) - protocolOrder.get(right)); +} + +function effectiveScope(document, item, parentScope) { + return normalizeScope(item?.protocolVersions ?? parentScope ?? document.protocolVersions ?? []); +} + +function intersection(left, right) { + const rightSet = new Set(right); + return left.filter((value) => rightSet.has(value)); +} + +function collectOAuthScopeCatalog(scheme) { + if (!scheme || typeof scheme !== 'object') return new Set(); + const catalog = new Set(); + if (scheme.type === 'oauth2') { + for (const flow of Object.values(scheme.flows ?? {})) { + for (const scope of Object.keys(flow?.scopes ?? {})) catalog.add(scope); + } + } + return catalog; +} + +function embeddedSchemaDialect(schema) { + const declared = schema?.$schema; + if (declared === undefined) return '2020-12'; + if (typeof declared !== 'string') return null; + if (/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(declared)) return '2020-12'; + if (/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(declared)) return 'draft-07'; + return null; +} + +function schemaForPartialOfflineCompilation(schema) { + const externalReferences = []; + + function visit(value) { + if (Array.isArray(value)) return value.map(visit); + if (!value || typeof value !== 'object') return value; + const result = {}; + for (const [key, child] of Object.entries(value)) { + if (key === '$ref' && typeof child === 'string' && !child.startsWith('#')) { + externalReferences.push(child); + continue; + } + result[key] = visit(child); + } + return result; + } + + return { schema: visit(schema), externalReferences }; +} + +function makeDiagnostic(code, severity, message, path) { + if (!Array.isArray(path)) throw new TypeError(`Diagnostic ${code} is missing an explicit path`); + return { code, severity, message, path }; +} + +function usesMcpReservedPrefix(identifier) { + if (typeof identifier !== 'string') return false; + const [prefix] = identifier.split('/', 1); + const labels = prefix.split('.'); + if (labels.length < 2) return false; + const secondLabel = labels[1].toLowerCase(); + return secondLabel === 'modelcontextprotocol' || secondLabel === 'mcp'; +} + +function usesMcpReservedMetaPrefix(identifier, version) { + if (typeof identifier !== 'string' || !identifier.includes('/')) return false; + const labels = identifier.slice(0, identifier.indexOf('/')).split('.'); + if (version === '2025-06-18') { + return labels.slice(0, -1).some((label) => ['modelcontextprotocol', 'mcp'].includes(label.toLowerCase())); + } + return labels.length >= 2 && ['modelcontextprotocol', 'mcp'].includes(labels[1].toLowerCase()); +} + +function isImplementation(value) { + return value && typeof value === 'object' && !Array.isArray(value) + && typeof value.name === 'string' && typeof value.version === 'string'; +} + +function validateMeta(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + const legacyVersions = rootScope.filter( + (version) => protocolOrder.get(version) < protocolOrder.get(completeSemanticConformanceVersion) + ); + if (legacyVersions.length) { + diagnostics.push( + makeDiagnostic( + 'legacy-protocol-validation-incomplete', + 'warning', + `MCP ${legacyVersions.join(', ')} are legacy compatibility revisions; structural and selected checks were applied, but complete MCP semantic conformance was not evaluated`, + ['protocolVersions'] + ) + ); + } + + function validateKnownReservedKey(key, value, context, version, location, locationPath) { + let validContext; + let validValue; + + if (key === 'progressToken' && ['2025-06-18', '2025-11-25', '2026-07-28'].includes(version)) { + validContext = context === 'request'; + validValue = typeof value === 'string' || typeof value === 'number'; + } else if (key === 'io.modelcontextprotocol/related-task' && version === '2025-11-25') { + validContext = context === 'result'; + validValue = value && typeof value === 'object' && !Array.isArray(value) && typeof value.taskId === 'string'; + } else if (key === 'io.modelcontextprotocol/serverInfo' && version === '2026-07-28') { + validContext = context === 'result'; + validValue = isImplementation(value); + } else if ( + version === '2026-07-28' + && ['io.modelcontextprotocol/protocolVersion', 'io.modelcontextprotocol/clientInfo', 'io.modelcontextprotocol/clientCapabilities', 'io.modelcontextprotocol/logLevel'].includes(key) + ) { + validContext = context === 'request'; + validValue = key === 'io.modelcontextprotocol/protocolVersion' + ? typeof value === 'string' + : key === 'io.modelcontextprotocol/clientInfo' + ? isImplementation(value) + : key === 'io.modelcontextprotocol/clientCapabilities' + ? value && typeof value === 'object' && !Array.isArray(value) + : ['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'].includes(value); + } else if (key === 'io.modelcontextprotocol/subscriptionId' && version === '2026-07-28') { + validContext = context === 'notification' || context === 'subscription-result'; + validValue = typeof value === 'string' || typeof value === 'number'; + } else if (version === '2026-07-28' && ['traceparent', 'tracestate', 'baggage'].includes(key)) { + validContext = true; + validValue = typeof value === 'string' && value.length > 0; + } else { + return false; + } + + if (!validContext) { + diagnostics.push( + makeDiagnostic( + 'meta-reserved-key-context', + 'error', + `${location} uses reserved _meta key ${JSON.stringify(key)} in a ${context} context where MCP ${version} does not define it`, + [...locationPath, key] + ) + ); + } else if (!validValue) { + diagnostics.push( + makeDiagnostic( + 'meta-reserved-key-value', + 'error', + `${location}[${JSON.stringify(key)}] has an invalid value for MCP ${version}`, + [...locationPath, key] + ) + ); + } + return true; + } + + function check(meta, context, scope, location, locationPath) { + if (!meta || typeof meta !== 'object' || Array.isArray(meta)) return; + for (const [key, value] of Object.entries(meta)) { + if (!metaKeyPattern.test(key)) { + diagnostics.push( + makeDiagnostic( + 'meta-key-invalid', + 'error', + `${location} contains invalid MCP _meta key ${JSON.stringify(key)}`, + [...locationPath, key] + ) + ); + continue; + } + for (const version of scope.filter((candidate) => protocolOrder.get(candidate) >= protocolOrder.get(completeSemanticConformanceVersion))) { + if (validateKnownReservedKey(key, value, context, version, location, locationPath)) continue; + if (usesMcpReservedMetaPrefix(key, version)) { + diagnostics.push( + makeDiagnostic( + 'meta-unknown-reserved-key', + 'warning', + `${location} contains unrecognized key ${JSON.stringify(key)} under an MCP-reserved prefix for MCP ${version}; preserve it and review its authority`, + [...locationPath, key] + ) + ); + } + } + } + } + + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, itemIndex) => { + const scope = effectiveScope(document, item, rootScope); + const itemPath = [kind, itemIndex]; + check(item._meta, 'declaration', scope, `${kind}[${itemIndex}]._meta`, [...itemPath, '_meta']); + if (kind === 'tools') { + for (const [exampleName, example] of Object.entries(item.examples ?? {})) { + const result = example?.result; + if (!result || typeof result !== 'object' || Array.isArray(result)) continue; + const resultLocation = `${kind}[${itemIndex}].examples[${JSON.stringify(exampleName)}].result`; + const resultPath = [...itemPath, 'examples', exampleName, 'result']; + check(result._meta, 'result', scope, `${resultLocation}._meta`, [...resultPath, '_meta']); + (result.content ?? []).forEach((content, contentIndex) => { + const contentLocation = `${resultLocation}.content[${contentIndex}]`; + const contentPath = [...resultPath, 'content', contentIndex]; + check(content?._meta, 'content', scope, `${contentLocation}._meta`, [...contentPath, '_meta']); + if (content?.type === 'resource') { + check(content.resource?._meta, 'content', scope, `${contentLocation}.resource._meta`, [...contentPath, 'resource', '_meta']); + } + }); + } + } else if (kind !== 'prompts') { + for (const [exampleName, example] of Object.entries(item.examples ?? {})) { + const result = example?.result; + if (!result || typeof result !== 'object' || Array.isArray(result)) continue; + const resultLocation = `${kind}[${itemIndex}].examples[${JSON.stringify(exampleName)}].result`; + const resultPath = [...itemPath, 'examples', exampleName, 'result']; + check(result._meta, 'result', scope, `${resultLocation}._meta`, [...resultPath, '_meta']); + (result.contents ?? []).forEach((content, contentIndex) => { + check( + content?._meta, + 'content', + scope, + `${resultLocation}.contents[${contentIndex}]._meta`, + [...resultPath, 'contents', contentIndex, '_meta'] + ); + }); + } + } + }); + } +} + +function validateTagReferences(document, rel, diagnostics) { + const declaredTags = new Set(); + (document.tags ?? []).forEach((tag, tagIndex) => { + if (declaredTags.has(tag.name)) { + diagnostics.push(makeDiagnostic( + 'duplicate-root-tag', + 'error', + `root tags must use unique names; found duplicate tag ${JSON.stringify(tag.name)}`, + ['tags', tagIndex, 'name'] + )); + return; + } + declaredTags.add(tag.name); + }); + if (!Object.hasOwn(document, 'tags')) return; + + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, index) => { + (item.tags ?? []).forEach((tag, tagIndex) => { + if (!declaredTags.has(tag)) { + diagnostics.push( + makeDiagnostic( + 'unknown-tag-reference', + 'error', + `${kind}[${index}] references undeclared tag ${JSON.stringify(tag)}`, + [kind, index, 'tags', tagIndex] + ) + ); + } + }); + }); + } +} + +function validateSecurityRequirements(document, rel, diagnostics) { + const schemeMap = document.securitySchemes ?? {}; + const schemeNames = new Set(Object.keys(schemeMap)); + const scopeCatalogByScheme = new Map( + Object.entries(schemeMap).map(([name, scheme]) => [name, collectOAuthScopeCatalog(scheme)]) + ); + + function checkRequirementArray(requirementArray, location, locationPath) { + if (!Array.isArray(requirementArray)) return; + requirementArray.forEach((requirement, requirementIndex) => { + for (const [schemeName, scopes] of Object.entries(requirement)) { + if (!schemeNames.has(schemeName)) { + diagnostics.push( + makeDiagnostic( + 'unknown-security-scheme', + 'error', + `${location}[${requirementIndex}] references unknown security scheme ${JSON.stringify(schemeName)}`, + [...locationPath, requirementIndex, schemeName] + ) + ); + continue; + } + const scheme = schemeMap[schemeName]; + if (!Array.isArray(scopes)) continue; + const duplicateScopes = scopes.filter((scope, index) => scopes.indexOf(scope) !== index); + if (duplicateScopes.length) { + diagnostics.push( + makeDiagnostic( + 'duplicate-security-scope', + 'error', + `${location}[${requirementIndex}].${schemeName} contains duplicate scope values`, + [...locationPath, requirementIndex, schemeName] + ) + ); + } + if ((scheme.type === 'http' || scheme.type === 'apiKey') && scopes.length > 0) { + diagnostics.push( + makeDiagnostic( + 'non-oauth-scope-misuse', + 'error', + `${location}[${requirementIndex}].${schemeName} uses scopes with ${scheme.type}, but only oauth2 and openIdConnect requirements may list scopes`, + [...locationPath, requirementIndex, schemeName] + ) + ); + } + if (scheme.type === 'oauth2' || scheme.type === 'openIdConnect') { + const catalog = scopeCatalogByScheme.get(schemeName) ?? new Set(); + scopes.forEach((scope, scopeIndex) => { + if (!catalog.has(scope)) { + diagnostics.push( + makeDiagnostic( + 'uncatalogued-oauth-scope', + 'warning', + `${location}[${requirementIndex}].${schemeName} references scope ${JSON.stringify(scope)} that is not present in the declared static scope catalogue`, + [...locationPath, requirementIndex, schemeName, scopeIndex] + ) + ); + } + }); + } + } + }); + } + + checkRequirementArray(document.security, 'security', ['security']); + (document.transports ?? []).forEach((transport, index) => { + checkRequirementArray(transport.security, `transports[${index}].security`, ['transports', index, 'security']); + }); + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, index) => { + checkRequirementArray(item.security, `${kind}[${index}].security`, [kind, index, 'security']); + }); + } +} + +function validateProtocolScopes(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + const coverage = new Set(); + + function assertSubset(scope, parentScope, location, locationPath) { + const parentScopeSet = new Set(parentScope); + for (const version of scope) { + if (!parentScopeSet.has(version)) { + diagnostics.push( + makeDiagnostic( + 'protocol-scope-outside-parent', + 'error', + `${location} includes protocol version ${version} outside its parent scope`, + locationPath + ) + ); + } + } + } + + (document.transports ?? []).forEach((transport, index) => { + const scope = effectiveScope(document, transport, rootScope); + assertSubset(scope, rootScope, `transports[${index}].protocolVersions`, ['transports', index, 'protocolVersions']); + for (const version of scope) coverage.add(version); + }); + for (const version of rootScope) { + if (!coverage.has(version)) { + diagnostics.push( + makeDiagnostic( + 'transport-coverage-gap', + 'error', + `protocol version ${version} is present at the root but not covered by any transport`, + ['protocolVersions'] + ) + ); + } + } + + const capabilities = document.capabilities ?? []; + capabilities.forEach((capability, index) => { + const scope = effectiveScope(document, capability, rootScope); + assertSubset(scope, rootScope, `capabilities[${index}].protocolVersions`, ['capabilities', index, 'protocolVersions']); + }); + for (let index = 0; index < capabilities.length; index += 1) { + for (let otherIndex = index + 1; otherIndex < capabilities.length; otherIndex += 1) { + const leftScope = effectiveScope(document, capabilities[index], rootScope); + const rightScope = effectiveScope(document, capabilities[otherIndex], rootScope); + const overlap = intersection(leftScope, rightScope); + if (overlap.length > 0) { + diagnostics.push( + makeDiagnostic( + 'capability-scope-overlap', + 'error', + `capabilities[${index}] and capabilities[${otherIndex}] overlap for protocol versions ${overlap.join(', ')}`, + ['capabilities', index, 'protocolVersions'] + ) + ); + } + } + } + + for (const [kind, items, key] of [ + ['tools', document.tools ?? [], 'name'], + ['prompts', document.prompts ?? [], 'name'], + ['resources', document.resources ?? [], 'uri'], + ['resourceTemplates', document.resourceTemplates ?? [], 'uriTemplate'] + ]) { + const byIdentifier = new Map(); + items.forEach((item, index) => { + const identifier = item[key]; + const scope = effectiveScope(document, item, rootScope); + assertSubset(scope, rootScope, `${kind}[${index}].protocolVersions`, [kind, index, 'protocolVersions']); + (item.elicitations ?? []).forEach((elicitation, elicitationIndex) => { + const elicitationScope = effectiveScope(document, elicitation, scope); + assertSubset( + elicitationScope, + scope, + `${kind}[${index}].elicitations[${elicitationIndex}].protocolVersions`, + [kind, index, 'elicitations', elicitationIndex, 'protocolVersions'] + ); + }); + const existing = byIdentifier.get(identifier) ?? []; + for (const other of existing) { + const overlap = intersection(scope, other.scope); + if (overlap.length > 0) { + diagnostics.push( + makeDiagnostic( + 'primitive-scope-overlap', + 'error', + `${kind}[${index}] with identifier ${JSON.stringify(identifier)} overlaps ${kind}[${other.index}] for protocol versions ${overlap.join(', ')}`, + [kind, index, 'protocolVersions'] + ) + ); + } + } + existing.push({ index, scope }); + byIdentifier.set(identifier, existing); + }); + } +} + +function validateElicitations(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + function validateFormSchema(schema, version, location, locationPath) { + if (!schema || typeof schema !== 'object' || Array.isArray(schema)) return; + if (version === '2025-06-18' && Object.hasOwn(schema, '$schema')) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-schema-version-mismatch', + 'error', + `${location}.$schema is not defined for MCP ${version}`, + [...locationPath, '$schema'] + ) + ); + } + + const propertyNames = new Set(Object.keys(schema.properties ?? {})); + (schema.required ?? []).forEach((requiredName, requiredIndex) => { + if (propertyNames.has(requiredName)) return; + diagnostics.push( + makeDiagnostic( + 'elicitation-form-required-property-unknown', + 'error', + `${location}.required references undeclared property ${JSON.stringify(requiredName)}`, + [...locationPath, 'required', requiredIndex] + ) + ); + }); + + for (const [propertyName, property] of Object.entries(schema.properties ?? {})) { + const propertyLocation = `${location}.properties[${JSON.stringify(propertyName)}]`; + const propertyPath = [...locationPath, 'properties', propertyName]; + if (!property || typeof property !== 'object' || Array.isArray(property)) continue; + + if (version === '2025-06-18') { + if (property.type === 'array' || Object.hasOwn(property, 'oneOf')) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-schema-version-mismatch', + 'error', + `${propertyLocation} uses an enum form introduced after MCP ${version}`, + propertyPath + ) + ); + } + if (Object.hasOwn(property, 'default') && property.type !== 'boolean') { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-schema-version-mismatch', + 'error', + `${propertyLocation}.default is not defined for this property type in MCP ${version}`, + [...propertyPath, 'default'] + ) + ); + } + } + + if (Array.isArray(property.enumNames) && Array.isArray(property.enum) && property.enumNames.length !== property.enum.length) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-enum-names-mismatch', + 'error', + `${propertyLocation}.enumNames must contain one display name for every enum value`, + [...propertyPath, 'enumNames'] + ) + ); + } + if (Object.hasOwn(property, 'default')) { + const allowedValues = Array.isArray(property.enum) + ? property.enum + : Array.isArray(property.oneOf) + ? property.oneOf.map((option) => option.const) + : undefined; + if (allowedValues && !allowedValues.includes(property.default)) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-default-outside-enum', + 'error', + `${propertyLocation}.default must be one of the declared enum values`, + [...propertyPath, 'default'] + ) + ); + } + if (property.type === 'array') { + const itemValues = property.items?.enum ?? property.items?.anyOf?.map((option) => option.const); + if (Array.isArray(itemValues) && property.default.some((value) => !itemValues.includes(value))) { + diagnostics.push( + makeDiagnostic( + 'elicitation-form-default-outside-enum', + 'error', + `${propertyLocation}.default contains a value outside the declared enum values`, + [...propertyPath, 'default'] + ) + ); + } + } + } + if (typeof property.minLength === 'number' && typeof property.maxLength === 'number' && property.minLength > property.maxLength) { + diagnostics.push(makeDiagnostic('elicitation-form-invalid-range', 'error', `${propertyLocation}.minLength must not exceed maxLength`, [...propertyPath, 'minLength'])); + } + if (typeof property.minimum === 'number' && typeof property.maximum === 'number' && property.minimum > property.maximum) { + diagnostics.push(makeDiagnostic('elicitation-form-invalid-range', 'error', `${propertyLocation}.minimum must not exceed maximum`, [...propertyPath, 'minimum'])); + } + if (typeof property.minItems === 'number' && typeof property.maxItems === 'number' && property.minItems > property.maxItems) { + diagnostics.push(makeDiagnostic('elicitation-form-invalid-range', 'error', `${propertyLocation}.minItems must not exceed maxItems`, [...propertyPath, 'minItems'])); + } + } + } + + for (const [kind, items] of [ + ['tools', document.tools ?? []], + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, itemIndex) => { + const parentScope = effectiveScope(document, item, rootScope); + const names = new Set(); + (item.elicitations ?? []).forEach((elicitation, elicitationIndex) => { + const location = `${kind}[${itemIndex}].elicitations[${elicitationIndex}]`; + const locationPath = [kind, itemIndex, 'elicitations', elicitationIndex]; + if (names.has(elicitation.name)) { + diagnostics.push( + makeDiagnostic( + 'duplicate-elicitation-name', + 'error', + `${location}.name duplicates Elicitation Declaration name ${JSON.stringify(elicitation.name)} within the containing primitive`, + [...locationPath, 'name'] + ) + ); + } + names.add(elicitation.name); + + const scope = effectiveScope(document, elicitation, parentScope); + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get(completeSemanticConformanceVersion)) continue; + if (version === '2025-06-18' && elicitation.mode !== 'form') { + diagnostics.push( + makeDiagnostic( + 'elicitation-mode-not-supported-by-version', + 'error', + `${location}.mode ${JSON.stringify(elicitation.mode)} is not defined for MCP ${version}; only form mode is supported`, + [...locationPath, 'mode'] + ) + ); + } + if (elicitation.mode === 'form') { + validateFormSchema(elicitation.requestedSchema, version, `${location}.requestedSchema`, [...locationPath, 'requestedSchema']); + } + } + }); + }); + } +} + +function validateVersionSpecificSemantics(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + function checkMinimumVersion(location, locationPath, object, fieldName, minimumVersion, scope) { + if (!(fieldName in object)) return; + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get(minimumVersion)) { + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location}.${fieldName} is not defined for MCP ${version}; it requires ${minimumVersion} or later`, + [...locationPath, fieldName] + ) + ); + } + } + } + + function checkOnlyVersion(location, locationPath, object, fieldName, supportedVersion, scope) { + if (!(fieldName in object)) return; + for (const version of scope) { + if (version !== supportedVersion) { + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location}.${fieldName} is defined only for MCP ${supportedVersion}, not MCP ${version}`, + [...locationPath, fieldName] + ) + ); + } + } + } + + (document.transports ?? []).forEach((transport, index) => { + const scope = effectiveScope(document, transport, rootScope); + if (transport.type === 'streamable-http') { + for (const version of scope) { + if (protocolOrder.get(version) >= protocolOrder.get('2025-03-26')) continue; + diagnostics.push( + makeDiagnostic( + 'transport-not-supported-by-version', + 'error', + `transports[${index}] uses Streamable HTTP, which is not defined for MCP ${version}; it requires 2025-03-26 or later`, + ['transports', index, 'type'] + ) + ); + } + } + if (transport.type === 'sse') { + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2025-03-26')) continue; + diagnostics.push( + makeDiagnostic( + 'legacy-sse-for-modern-version', + 'warning', + `transports[${index}] associates legacy SSE with MCP ${version}, where Streamable HTTP is the standard remote transport`, + ['transports', index, 'type'] + ) + ); + } + } + }); + + (document.tools ?? []).forEach((tool, index) => { + const scope = effectiveScope(document, tool, rootScope); + const toolPath = ['tools', index]; + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'title', '2025-06-18', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'outputSchema', '2025-06-18', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, '_meta', '2025-06-18', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'annotations', '2025-03-26', scope); + checkOnlyVersion(`tools[${index}]`, toolPath, tool, 'execution', '2025-11-25', scope); + checkMinimumVersion(`tools[${index}]`, toolPath, tool, 'icons', '2025-11-25', scope); + }); + + for (const [kind, items] of [ + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []], + ['prompts', document.prompts ?? []] + ]) { + items.forEach((item, index) => { + const scope = effectiveScope(document, item, rootScope); + const itemPath = [kind, index]; + checkMinimumVersion(`${kind}[${index}]`, itemPath, item, 'title', '2025-06-18', scope); + checkMinimumVersion(`${kind}[${index}]`, itemPath, item, '_meta', '2025-06-18', scope); + checkMinimumVersion(`${kind}[${index}]`, itemPath, item, 'icons', '2025-11-25', scope); + if (kind !== 'prompts' && item.annotations?.lastModified !== undefined) { + for (const version of scope) { + if (protocolOrder.get(version) >= protocolOrder.get('2025-06-18')) continue; + diagnostics.push( + makeDiagnostic( + 'resource-annotation-not-supported-by-version', + 'error', + `${kind}[${index}].annotations.lastModified is not defined for MCP ${version}`, + [...itemPath, 'annotations', 'lastModified'] + ) + ); + } + } + if (kind === 'prompts') { + (item.arguments ?? []).forEach((argument, argumentIndex) => { + checkMinimumVersion( + `${kind}[${index}].arguments[${argumentIndex}]`, + [...itemPath, 'arguments', argumentIndex], + argument, + 'title', + '2025-06-18', + scope + ); + }); + } + }); + } + + (document.capabilities ?? []).forEach((capability, index) => { + const scope = effectiveScope(document, capability, rootScope); + const capabilityPath = ['capabilities', index]; + if ('completions' in capability) checkMinimumVersion(`capabilities[${index}]`, capabilityPath, capability, 'completions', '2025-03-26', scope); + if ('tasks' in capability) { + checkMinimumVersion(`capabilities[${index}]`, capabilityPath, capability, 'tasks', '2025-11-25', scope); + if (scope.includes('2026-07-28')) { + diagnostics.push( + makeDiagnostic( + 'tasks-core-not-valid-in-2026', + 'error', + `capabilities[${index}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`, + [...capabilityPath, 'tasks'] + ) + ); + } + } + if ('extensions' in capability) { + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2026-07-28')) { + diagnostics.push( + makeDiagnostic( + 'extensions-not-supported-by-version', + 'warning', + `capabilities[${index}].extensions is not defined by the MCP ${version} core schema; this description preserves a deployed pre-standard extension negotiation convention. Formal extensions capability negotiation was introduced in MCP 2026-07-28`, + [...capabilityPath, 'extensions'] + ) + ); + } + } + for (const identifier of Object.keys(capability.extensions ?? {})) { + if (!usesMcpReservedPrefix(identifier)) continue; + const maturity = mcpExtensionMaturity(identifier); + if (maturity === 'official') continue; + diagnostics.push( + makeDiagnostic( + maturity === 'experimental' + ? 'experimental-reserved-extension-identifier' + : 'unknown-reserved-extension-identifier', + 'warning', + maturity === 'experimental' + ? `capabilities[${index}].extensions contains experimental MCP extension ${JSON.stringify(identifier)}; preserve it and review its maturity before relying on it` + : `capabilities[${index}].extensions contains unrecognized identifier ${JSON.stringify(identifier)} under an MCP-reserved prefix; preserve it and review its authority`, + [...capabilityPath, 'extensions', identifier] + ) + ); + } + } + if ('logging' in capability && scope.includes('2026-07-28')) { + diagnostics.push( + makeDiagnostic( + 'logging-deprecated-in-2026', + 'warning', + `capabilities[${index}].logging applies to MCP 2026-07-28, where logging is deprecated`, + [...capabilityPath, 'logging'] + ) + ); + } + }); +} + +const singleSchemaKeywords = [ + 'additionalItems', + 'additionalProperties', + 'contains', + 'contentSchema', + 'else', + 'if', + 'items', + 'not', + 'propertyNames', + 'then', + 'unevaluatedItems', + 'unevaluatedProperties' +]; +const arraySchemaKeywords = ['allOf', 'anyOf', 'oneOf', 'prefixItems']; +const mapSchemaKeywords = ['$defs', 'definitions', 'dependentSchemas', 'patternProperties']; +const utf8Encoder = new TextEncoder(); + +function collectMcpHeaderAnnotations(schema) { + const annotations = []; + + function visit(node, location, locationPath, propertiesOnlyPath, isPropertyNode) { + if (!node || typeof node !== 'object' || Array.isArray(node)) return; + if (Object.hasOwn(node, 'x-mcp-header')) { + annotations.push({ + location, + path: locationPath, + value: node['x-mcp-header'], + type: node.type, + staticallyReachable: propertiesOnlyPath && isPropertyNode + }); + } + + if (node.properties && typeof node.properties === 'object' && !Array.isArray(node.properties)) { + for (const [name, child] of Object.entries(node.properties)) { + visit(child, `${location}.properties[${JSON.stringify(name)}]`, [...locationPath, 'properties', name], propertiesOnlyPath, propertiesOnlyPath); + } + } + + for (const keyword of mapSchemaKeywords) { + const map = node[keyword]; + if (!map || typeof map !== 'object' || Array.isArray(map)) continue; + for (const [name, child] of Object.entries(map)) { + visit(child, `${location}.${keyword}[${JSON.stringify(name)}]`, [...locationPath, keyword, name], false, false); + } + } + for (const keyword of arraySchemaKeywords) { + if (!Array.isArray(node[keyword])) continue; + node[keyword].forEach((child, index) => visit(child, `${location}.${keyword}[${index}]`, [...locationPath, keyword, index], false, false)); + } + for (const keyword of singleSchemaKeywords) { + const child = node[keyword]; + if (Array.isArray(child)) { + child.forEach((item, index) => visit(item, `${location}.${keyword}[${index}]`, [...locationPath, keyword, index], false, false)); + } else { + visit(child, `${location}.${keyword}`, [...locationPath, keyword], false, false); + } + } + const dependencies = node.dependencies; + if (dependencies && typeof dependencies === 'object' && !Array.isArray(dependencies)) { + for (const [name, child] of Object.entries(dependencies)) { + if (!Array.isArray(child)) visit(child, `${location}.dependencies[${JSON.stringify(name)}]`, [...locationPath, 'dependencies', name], false, false); + } + } + } + + visit(schema, 'inputSchema', ['inputSchema'], true, false); + return annotations; +} + +function validateMcpHeaderAnnotations(tool, toolIndex, scope, rel, diagnostics) { + const annotations = collectMcpHeaderAnnotations(tool.inputSchema); + if (!annotations.length) return; + + for (const version of scope) { + if (version !== '2026-07-28') { + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `tools[${toolIndex}].inputSchema uses x-mcp-header, which is not defined for MCP ${version}`, + ['tools', toolIndex, 'inputSchema'] + ) + ); + } + } + + const byCaseInsensitiveName = new Map(); + for (const annotation of annotations) { + const location = `tools[${toolIndex}].${annotation.location}.x-mcp-header`; + const locationPath = ['tools', toolIndex, ...annotation.path, 'x-mcp-header']; + if (!annotation.staticallyReachable) { + diagnostics.push( + makeDiagnostic( + 'invalid-x-mcp-header', + 'error', + `${location} is not on a property statically reachable from the schema root through properties only`, + locationPath + ) + ); + } + if (typeof annotation.value !== 'string' || !/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(annotation.value)) { + diagnostics.push( + makeDiagnostic( + 'invalid-x-mcp-header', + 'error', + `${location} must be a non-empty HTTP field-name token`, + locationPath + ) + ); + continue; + } + if (!['boolean', 'integer', 'string'].includes(annotation.type)) { + diagnostics.push( + makeDiagnostic( + 'invalid-x-mcp-header', + 'error', + `${location} may annotate only a boolean, integer, or string property`, + locationPath + ) + ); + } + const normalizedName = annotation.value.toLowerCase(); + const previousLocation = byCaseInsensitiveName.get(normalizedName); + if (previousLocation) { + diagnostics.push( + makeDiagnostic( + 'duplicate-x-mcp-header', + 'error', + `${location} duplicates ${previousLocation} case-insensitively`, + locationPath + ) + ); + } else { + byCaseInsensitiveName.set(normalizedName, location); + } + } +} + +function validateLegacyToolSchemaShape(schema, location, locationPath, rel, diagnostics) { + if (Object.hasOwn(schema, 'properties')) { + const properties = schema.properties; + if (!properties || typeof properties !== 'object' || Array.isArray(properties)) { + diagnostics.push( + makeDiagnostic( + 'invalid-legacy-tool-schema-shape', + 'error', + `${location}.properties must be an object for MCP revisions before ${toolSchemaDialectVersion}`, + [...locationPath, 'properties'] + ) + ); + } else { + for (const [name, propertySchema] of Object.entries(properties)) { + if (propertySchema && typeof propertySchema === 'object' && !Array.isArray(propertySchema)) continue; + diagnostics.push( + makeDiagnostic( + 'invalid-legacy-tool-schema-shape', + 'error', + `${location}.properties[${JSON.stringify(name)}] must be an object for MCP revisions before ${toolSchemaDialectVersion}`, + [...locationPath, 'properties', name] + ) + ); + } + } + } + if (Object.hasOwn(schema, 'required') && (!Array.isArray(schema.required) || schema.required.some((name) => typeof name !== 'string'))) { + diagnostics.push( + makeDiagnostic( + 'invalid-legacy-tool-schema-shape', + 'error', + `${location}.required must be an array of strings for MCP revisions before ${toolSchemaDialectVersion}`, + [...locationPath, 'required'] + ) + ); + } +} + +function validateToolSchemas(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + (document.tools ?? []).forEach((tool, toolIndex) => { + const scope = effectiveScope(document, tool, rootScope); + for (const fieldName of ['inputSchema', 'outputSchema']) { + const schema = tool[fieldName]; + if (!schema || typeof schema !== 'object' || Array.isArray(schema)) continue; + const location = `tools[${toolIndex}].${fieldName}`; + const locationPath = ['tools', toolIndex, fieldName]; + const hasLegacyScope = scope.some((version) => protocolOrder.get(version) < protocolOrder.get(toolSchemaDialectVersion)); + const hasDialectAwareScope = scope.some((version) => protocolOrder.get(version) >= protocolOrder.get(toolSchemaDialectVersion)); + if (Object.hasOwn(schema, '$schema')) { + for (const version of scope) { + if (protocolOrder.get(version) >= protocolOrder.get(toolSchemaDialectVersion)) continue; + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location}.$schema is not defined for MCP ${version}; it requires ${toolSchemaDialectVersion} or later`, + [...locationPath, '$schema'] + ) + ); + } + } + if (hasLegacyScope) validateLegacyToolSchemaShape(schema, location, locationPath, rel, diagnostics); + + if (hasDialectAwareScope) { + const dialect = embeddedSchemaDialect(schema); + if (!dialect) { + diagnostics.push( + makeDiagnostic( + 'unsupported-tool-schema-dialect', + 'error', + `${location} declares an unsupported JSON Schema dialect ${JSON.stringify(schema.$schema)}`, + [...locationPath, '$schema'] + ) + ); + } else { + const validator = createValidatorForDialect(dialect); + try { + if (!validator.validateSchema(schema, true)) { + const details = validator.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown meta-schema error'; + diagnostics.push( + makeDiagnostic( + 'invalid-tool-schema', + 'error', + `${location} is not valid JSON Schema ${dialect}: ${details}`, + locationPath + ) + ); + } else { + validator.compile(schema); + } + } catch (error) { + const partial = schemaForPartialOfflineCompilation(schema); + try { + if (!partial.externalReferences.length) throw error; + createValidatorForDialect(dialect).compile(partial.schema); + const references = [...new Set(partial.externalReferences)].sort(); + diagnostics.push( + makeDiagnostic( + 'unresolved-external-tool-schema-reference', + 'warning', + `${location} contains external $ref values unavailable to offline validation (${references.map((reference) => JSON.stringify(reference)).join(', ')}); the references are preserved, but complete Tool schema validation was not possible`, + locationPath + ) + ); + } catch (partialError) { + diagnostics.push( + makeDiagnostic( + 'invalid-tool-schema', + 'error', + `${location} is not a compilable JSON Schema ${dialect}: ${partialError.message}`, + locationPath + ) + ); + } + } + } + } + + if (fieldName === 'outputSchema' && schema.type !== 'object') { + for (const version of scope) { + if (version === '2026-07-28') continue; + diagnostics.push( + makeDiagnostic( + 'field-not-supported-by-version', + 'error', + `${location} must have type "object" when it applies to MCP ${version}`, + [...locationPath, 'type'] + ) + ); + } + } + } + validateMcpHeaderAnnotations(tool, toolIndex, scope, rel, diagnostics); + }); +} + +function validateLegacyExampleValue(schema, value, location, locationPath, rel, diagnostics) { + if (schema.type === 'object' && (!value || typeof value !== 'object' || Array.isArray(value))) { + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} must be an object`, locationPath)); + return; + } + for (const name of schema.required ?? []) { + if (!Object.hasOwn(value, name)) { + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} is missing required property ${JSON.stringify(name)}`, [...locationPath, name])); + } + } + if (schema.additionalProperties === false && schema.properties && typeof schema.properties === 'object') { + for (const name of Object.keys(value)) { + if (!Object.hasOwn(schema.properties, name)) { + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} contains undeclared property ${JSON.stringify(name)}`, [...locationPath, name])); + } + } + } +} + +function validateExampleValue(schema, value, location, locationPath, rel, diagnostics) { + const dialect = embeddedSchemaDialect(schema); + if (!dialect) return; + const partial = schemaForPartialOfflineCompilation(schema); + if (partial.externalReferences.length) { + const references = [...new Set(partial.externalReferences)].sort(); + diagnostics.push( + makeDiagnostic( + 'incomplete-tool-example-validation', + 'warning', + `${location} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${references.map((reference) => JSON.stringify(reference)).join(', ')})`, + locationPath + ) + ); + return; + } + try { + const validate = createValidatorForDialect(dialect).compile(schema); + if (!validate(value)) { + const details = validate.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown validation error'; + diagnostics.push(makeDiagnostic('tool-example-schema-mismatch', 'error', `${location} does not validate against its associated Tool schema: ${details}`, locationPath)); + } + } catch { + // validateToolSchemas reports the malformed or unsupported schema itself. + } +} + +function validateToolExamples(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + (document.tools ?? []).forEach((tool, toolIndex) => { + if (!tool.examples || typeof tool.examples !== 'object' || Array.isArray(tool.examples)) return; + const scope = effectiveScope(document, tool, rootScope); + const legacyVersions = scope.filter((version) => protocolOrder.get(version) < protocolOrder.get(toolSchemaDialectVersion)); + const modernVersions = scope.filter((version) => protocolOrder.get(version) >= protocolOrder.get(toolSchemaDialectVersion)); + + for (const [exampleName, example] of Object.entries(tool.examples)) { + if (!example || typeof example !== 'object') continue; + const exampleLocation = `tools[${toolIndex}].examples[${JSON.stringify(exampleName)}]`; + const examplePath = ['tools', toolIndex, 'examples', exampleName]; + const result = example.result ?? {}; + const resultPath = [...examplePath, 'result']; + const successful = result.isError !== true; + + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(makeDiagnostic('tool-example-json-rpc-envelope', 'error', `${exampleLocation}.result must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, [...resultPath, envelopeField])); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(makeDiagnostic('incomplete-tool-example-result', 'error', `${exampleLocation}.result must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, [...resultPath, incompleteField])); + } + } + + for (const version of scope) { + const resultLocation = `${exampleLocation}.result`; + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.resultType must be "complete" for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.resultType is not defined for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (Object.hasOwn(result, 'structuredContent') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.structuredContent is not defined for MCP ${version}`, [...resultPath, 'structuredContent'])); + } + if (Object.hasOwn(result, 'structuredContent') && version !== '2026-07-28' && (!result.structuredContent || typeof result.structuredContent !== 'object' || Array.isArray(result.structuredContent))) { + diagnostics.push(makeDiagnostic('tool-example-result-version-mismatch', 'error', `${resultLocation}.structuredContent must be an object for MCP ${version}`, [...resultPath, 'structuredContent'])); + } + (result.content ?? []).forEach((content, contentIndex) => { + const contentLocation = `${resultLocation}.content[${contentIndex}]`; + const contentPath = [...resultPath, 'content', contentIndex]; + if (content.type === 'audio' && protocolOrder.get(version) < protocolOrder.get('2025-03-26')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation} uses audio content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (content.type === 'resource_link' && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation} uses resource-link content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (Object.hasOwn(content, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}._meta is not defined for MCP ${version}`, [...contentPath, '_meta'])); + } + if (content.type === 'resource' && Object.hasOwn(content.resource ?? {}, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}.resource._meta is not defined for MCP ${version}`, [...contentPath, 'resource', '_meta'])); + } + if (content.type === 'resource_link' && Array.isArray(content.icons) && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}.icons is not defined for MCP ${version}`, [...contentPath, 'icons'])); + } + if (content.annotations?.lastModified !== undefined && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('tool-example-content-version-mismatch', 'error', `${contentLocation}.annotations.lastModified is not defined for MCP ${version}`, [...contentPath, 'annotations', 'lastModified'])); + } + }); + } + + if (!successful && Object.hasOwn(result, 'structuredContent')) { + diagnostics.push(makeDiagnostic('structured-tool-error-example', 'error', `${exampleLocation}.result must not contain structuredContent when isError is true`, [...resultPath, 'structuredContent'])); + } + if (successful && tool.outputSchema && !Object.hasOwn(result, 'structuredContent')) { + diagnostics.push(makeDiagnostic('missing-tool-example-structured-content', 'error', `${exampleLocation}.result must contain structuredContent because the Tool declares outputSchema`, [...resultPath, 'structuredContent'])); + } + + if (legacyVersions.length) { + validateLegacyExampleValue(tool.inputSchema, example.input, `${exampleLocation}.input`, [...examplePath, 'input'], rel, diagnostics); + diagnostics.push( + makeDiagnostic( + 'incomplete-tool-example-validation', + 'warning', + `${exampleLocation}.input compatibility could not be validated completely for MCP ${legacyVersions.join(', ')} because those revisions do not define an embedded Tool-schema dialect`, + [...examplePath, 'input'] + ) + ); + } + if (modernVersions.length) { + validateExampleValue(tool.inputSchema, example.input, `${exampleLocation}.input`, [...examplePath, 'input'], rel, diagnostics); + } + if (successful && Object.hasOwn(result, 'structuredContent') && tool.outputSchema) { + if (legacyVersions.length) { + validateLegacyExampleValue(tool.outputSchema, result.structuredContent, `${exampleLocation}.result.structuredContent`, [...resultPath, 'structuredContent'], rel, diagnostics); + diagnostics.push( + makeDiagnostic( + 'incomplete-tool-example-validation', + 'warning', + `${exampleLocation}.result.structuredContent compatibility could not be validated completely for MCP ${legacyVersions.join(', ')} because those revisions do not define an embedded Tool-schema dialect`, + [...resultPath, 'structuredContent'] + ) + ); + } + if (modernVersions.length) { + validateExampleValue(tool.outputSchema, result.structuredContent, `${exampleLocation}.result.structuredContent`, [...resultPath, 'structuredContent'], rel, diagnostics); + } + } + } + }); +} + +function isValidBase64(value) { + if (typeof value !== 'string' || value.length % 4 !== 0 || !/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value)) return false; + if (value.endsWith('==')) return 'AQgw'.includes(value.at(-3)); + if (value.endsWith('=')) return 'AEIMQUYcgkosw048'.includes(value.at(-2)); + return true; +} + +function decodedBase64Length(value) { + return (value.length / 4) * 3 - (value.endsWith('==') ? 2 : value.endsWith('=') ? 1 : 0); +} + +function validateCompletedResourceResult(result, scope, location, locationPath, rel, diagnostics) { + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(makeDiagnostic('resource-example-json-rpc-envelope', 'error', `${location} must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, [...locationPath, envelopeField])); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(makeDiagnostic('incomplete-resource-example-result', 'error', `${location} must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, [...locationPath, incompleteField])); + } + } + + for (const version of scope) { + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(makeDiagnostic('resource-example-result-version-mismatch', 'error', `${location}.resultType must be "complete" for MCP ${version}`, [...locationPath, 'resultType'])); + } + if (version === '2026-07-28' && !Object.hasOwn(result, 'ttlMs')) { + diagnostics.push(makeDiagnostic('resource-example-cache-fields-version-mismatch', 'error', `${location}.ttlMs is required for MCP ${version}`, [...locationPath, 'ttlMs'])); + } + if (version === '2026-07-28' && !Object.hasOwn(result, 'cacheScope')) { + diagnostics.push(makeDiagnostic('resource-example-cache-fields-version-mismatch', 'error', `${location}.cacheScope is required for MCP ${version}`, [...locationPath, 'cacheScope'])); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(makeDiagnostic('resource-example-result-version-mismatch', 'error', `${location}.resultType is not defined for MCP ${version}`, [...locationPath, 'resultType'])); + } + for (const cacheField of ['ttlMs', 'cacheScope']) { + if (version !== '2026-07-28' && Object.hasOwn(result, cacheField)) { + diagnostics.push(makeDiagnostic('resource-example-cache-fields-version-mismatch', 'error', `${location}.${cacheField} is not defined for MCP ${version}`, [...locationPath, cacheField])); + } + } + if (Object.hasOwn(result, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('resource-example-result-version-mismatch', 'error', `${location}._meta is not defined for MCP ${version}`, [...locationPath, '_meta'])); + } + (result.contents ?? []).forEach((content, contentIndex) => { + if (Object.hasOwn(content, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(makeDiagnostic('resource-example-content-version-mismatch', 'error', `${location}.contents[${contentIndex}]._meta is not defined for MCP ${version}`, [...locationPath, 'contents', contentIndex, '_meta'])); + } + }); + } +} + +function validateResourceExampleContents(owner, requestedUri, result, location, locationPath, rel, diagnostics) { + const contents = result.contents ?? []; + let requestedEntryFound = false; + + contents.forEach((content, contentIndex) => { + const contentLocation = `${location}.result.contents[${contentIndex}]`; + const contentPath = [...locationPath, 'result', 'contents', contentIndex]; + if (content.uri === requestedUri) { + requestedEntryFound = true; + if (owner.mimeType && content.mimeType && content.mimeType !== owner.mimeType) { + diagnostics.push(makeDiagnostic('resource-example-mime-type-mismatch', 'warning', `${contentLocation}.mimeType ${JSON.stringify(content.mimeType)} differs from the declaration MIME type ${JSON.stringify(owner.mimeType)}`, [...contentPath, 'mimeType'])); + } + if (owner.size !== undefined) { + const actualSize = typeof content.text === 'string' + ? utf8Encoder.encode(content.text).byteLength + : typeof content.blob === 'string' && isValidBase64(content.blob) + ? decodedBase64Length(content.blob) + : undefined; + if (actualSize !== undefined && actualSize !== owner.size) { + diagnostics.push(makeDiagnostic('resource-example-size-mismatch', 'warning', `${contentLocation} contains ${actualSize} raw bytes, which differs from the declared Resource size ${owner.size}`, contentPath)); + } + } + } + if (typeof content.blob === 'string' && !isValidBase64(content.blob)) { + diagnostics.push(makeDiagnostic('invalid-resource-example-base64', 'error', `${contentLocation}.blob must be valid canonical base64`, [...contentPath, 'blob'])); + } + }); + + if (!requestedEntryFound) { + diagnostics.push(makeDiagnostic('resource-example-requested-uri-not-returned', 'warning', `${location}.result.contents has no entry for requested URI ${JSON.stringify(requestedUri)}; this is valid only for a documented collection or indirection`, [...locationPath, 'result', 'contents'])); + } +} + +function validateResourceExamples(document, rel, diagnostics) { + const rootScope = normalizeScope(document.protocolVersions ?? []); + + for (const [kind, items] of [ + ['resources', document.resources ?? []], + ['resourceTemplates', document.resourceTemplates ?? []] + ]) { + items.forEach((owner, ownerIndex) => { + if (!owner.examples || typeof owner.examples !== 'object' || Array.isArray(owner.examples)) return; + const scope = effectiveScope(document, owner, rootScope); + let template; + if (kind === 'resourceTemplates') { + try { + template = new UriTemplateMatcher(); + template.add(owner.uriTemplate); + } catch (error) { + template = undefined; + diagnostics.push(makeDiagnostic('resource-template-example-invalid-template', 'error', `${kind}[${ownerIndex}].uriTemplate is not a valid RFC 6570 template: ${error.message}`, [kind, ownerIndex, 'uriTemplate'])); + } + } + + for (const [exampleName, example] of Object.entries(owner.examples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const location = `${kind}[${ownerIndex}].examples[${JSON.stringify(exampleName)}]`; + const locationPath = [kind, ownerIndex, 'examples', exampleName]; + const result = example.result; + if (!result || typeof result !== 'object' || Array.isArray(result)) continue; + const requestedUri = kind === 'resources' ? owner.uri : example.uri; + + if (kind === 'resourceTemplates' && typeof requestedUri === 'string' && template && !template.match(requestedUri)) { + diagnostics.push(makeDiagnostic('resource-template-example-invalid-expansion', 'error', `${location}.uri ${JSON.stringify(requestedUri)} is not a valid RFC 6570 expansion of ${JSON.stringify(owner.uriTemplate)}`, [...locationPath, 'uri'])); + } + + validateCompletedResourceResult(result, scope, `${location}.result`, [...locationPath, 'result'], rel, diagnostics); + if (typeof requestedUri === 'string') validateResourceExampleContents(owner, requestedUri, result, location, locationPath, rel, diagnostics); + } + }); + } +} + +export function semanticValidateDocument(document, rel = 'document') { + const diagnostics = []; + validateProtocolScopes(document, rel, diagnostics); + validateSecurityRequirements(document, rel, diagnostics); + validateTagReferences(document, rel, diagnostics); + validateVersionSpecificSemantics(document, rel, diagnostics); + validateElicitations(document, rel, diagnostics); + validateMeta(document, rel, diagnostics); + validateToolSchemas(document, rel, diagnostics); + validateToolExamples(document, rel, diagnostics); + validateResourceExamples(document, rel, diagnostics); + diagnostics.sort( + (left, right) => left.code.localeCompare(right.code) + || left.message.localeCompare(right.message) + || JSON.stringify(left.path).localeCompare(JSON.stringify(right.path)) + ); + return diagnostics; +} + +export function createMcpdesc08Validator(schema) { + const ajv = createValidatorForDialect('2020-12'); + return ajv.compile(schema); +} \ No newline at end of file diff --git a/packages/validator/src/snapshots/0.8.0-rc.4/index.js b/packages/validator/src/snapshots/0.8.0-rc.4/index.js new file mode 100644 index 0000000..2cc0e1b --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.4/index.js @@ -0,0 +1,17 @@ +import { + supportedProtocolVersions, + validateMcpdesc08Document +} from './semantic.js'; + +export const specification = '0.8.0-rc.4'; +export const snapshotTag = 'v0.8.0-rc.4'; +export const schemaSha256 = 'd38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef'; +export { supportedProtocolVersions }; + +export function validate(document) { + const diagnostics = validateMcpdesc08Document(document); + return { + valid: !diagnostics.some((diagnostic) => diagnostic.severity === 'error'), + diagnostics + }; +} diff --git a/packages/validator/src/snapshots/0.8.0-rc.4/schema.json b/packages/validator/src/snapshots/0.8.0-rc.4/schema.json new file mode 100644 index 0000000..4e5690e --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.4/schema.json @@ -0,0 +1,2820 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "title": "MCP Server Description (mcpdesc format)", + "description": "A static, curated description of what an MCP server offers. Uses MCP-native terminology, an OpenAPI-aligned info and security structure, and support for multiple transports, protocol revisions, and specification extensions. Supports MCP protocol revisions 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, and 2026-07-28.", + "type": "object", + "required": [ + "mcpdesc", + "info", + "protocolVersions" + ], + "additionalProperties": false, + "properties": { + "$schema": { + "type": "string" + }, + "capabilities": { + "items": { + "$ref": "#/$defs/capabilities" + }, + "minItems": 1, + "type": "array" + }, + "components": { + "$ref": "#/$defs/components" + }, + "info": { + "$ref": "#/$defs/info" + }, + "instructions": { + "type": "string" + }, + "mcpdesc": { + "const": "0.8.0", + "type": "string" + }, + "prompts": { + "items": { + "$ref": "#/$defs/prompt" + }, + "minItems": 1, + "type": "array" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "resourceTemplates": { + "items": { + "$ref": "#/$defs/resourceTemplate" + }, + "minItems": 1, + "type": "array" + }, + "resources": { + "items": { + "$ref": "#/$defs/resource" + }, + "minItems": 1, + "type": "array" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "securitySchemes": { + "$ref": "#/$defs/securitySchemeMap" + }, + "tags": { + "items": { + "$ref": "#/$defs/tag" + }, + "minItems": 1, + "type": "array" + }, + "tools": { + "items": { + "$ref": "#/$defs/tool" + }, + "minItems": 1, + "type": "array" + }, + "transports": { + "items": { + "$ref": "#/$defs/transport" + }, + "minItems": 1, + "type": "array" + } + }, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/jsonValue" + } + }, + "$defs": { + "capabilities": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "completions": { + "additionalProperties": true, + "type": "object" + }, + "experimental": { + "additionalProperties": true, + "type": "object" + }, + "extensions": { + "$ref": "#/$defs/extensionCapabilities" + }, + "logging": { + "additionalProperties": true, + "type": "object" + }, + "prompts": { + "$ref": "#/$defs/capabilityPrompts" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "resources": { + "$ref": "#/$defs/capabilityResources" + }, + "tasks": { + "additionalProperties": false, + "properties": { + "cancel": { + "additionalProperties": true, + "type": "object" + }, + "list": { + "additionalProperties": true, + "type": "object" + }, + "requests": { + "additionalProperties": false, + "properties": { + "tools": { + "additionalProperties": false, + "properties": { + "call": { + "additionalProperties": true, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "tools": { + "$ref": "#/$defs/capabilityTools" + } + }, + "type": "object" + }, + "capabilityPrompts": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "listChanged": { + "type": "boolean" + } + }, + "type": "object" + }, + "capabilityResources": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "listChanged": { + "type": "boolean" + }, + "subscribe": { + "type": "boolean" + } + }, + "type": "object" + }, + "capabilityTools": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "listChanged": { + "type": "boolean" + } + }, + "type": "object" + }, + "clientCapabilityRequirements": { + "additionalProperties": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "minProperties": 1, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "elicitation": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "experimental": { + "additionalProperties": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "type": "object" + }, + "extensions": { + "$ref": "#/$defs/extensionCapabilities" + }, + "roots": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "sampling": { + "$ref": "#/$defs/clientCapabilityValue" + }, + "tasks": { + "$ref": "#/$defs/clientCapabilityValue" + } + }, + "type": "object" + }, + "clientCapabilityValue": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "completedCompletionResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "completion": { + "$ref": "#/$defs/completionResult" + }, + "resultType": { + "const": "complete" + } + }, + "required": [ + "completion" + ], + "type": "object" + }, + "completedPromptResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "description": { + "type": "string" + }, + "messages": { + "items": { + "$ref": "#/$defs/promptMessageExample" + }, + "type": "array" + }, + "resultType": { + "const": "complete" + } + }, + "required": [ + "messages" + ], + "type": "object" + }, + "completedReadResourceResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "cacheScope": { + "enum": [ + "public", + "private" + ] + }, + "contents": { + "items": { + "$ref": "#/$defs/resourceContents" + }, + "minItems": 1, + "type": "array" + }, + "resultType": { + "const": "complete" + }, + "ttlMs": { + "minimum": 0, + "type": "number" + } + }, + "required": [ + "contents" + ], + "type": "object" + }, + "completedToolResultExample": { + "additionalProperties": true, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "content": { + "items": { + "$ref": "#/$defs/toolResultContent" + }, + "type": "array" + }, + "isError": { + "type": "boolean" + }, + "resultType": { + "const": "complete" + }, + "structuredContent": { + "$ref": "#/$defs/jsonValue" + } + }, + "required": [ + "content" + ], + "type": "object" + }, + "completionArgument": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "name", + "value" + ], + "type": "object" + }, + "completionContext": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "arguments": { + "additionalProperties": { + "type": "string" + }, + "minProperties": 1, + "type": "object" + } + }, + "required": [ + "arguments" + ], + "type": "object" + }, + "completionExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "argument": { + "$ref": "#/$defs/completionArgument" + }, + "context": { + "$ref": "#/$defs/completionContext" + }, + "result": { + "$ref": "#/$defs/completedCompletionResultExample" + } + }, + "required": [ + "argument", + "result" + ], + "type": "object" + }, + "completionExamples": { + "additionalProperties": { + "$ref": "#/$defs/completionExample" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "completionResult": { + "additionalProperties": true, + "properties": { + "hasMore": { + "type": "boolean" + }, + "total": { + "minimum": 0, + "type": "integer" + }, + "values": { + "items": { + "type": "string" + }, + "maxItems": 100, + "type": "array" + } + }, + "required": [ + "values" + ], + "type": "object" + }, + "componentMap": { + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "components": { + "additionalProperties": false, + "minProperties": 1, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "promptExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/promptExample" + } + ] + } + } + ] + }, + "resourceExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceExample" + } + ] + } + } + ] + }, + "resourceTemplateExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceTemplateExample" + } + ] + } + } + ] + }, + "schemas": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "$ref": "#/$defs/schemaComponentValue" + } + } + ] + }, + "toolExamples": { + "allOf": [ + { + "$ref": "#/$defs/componentMap" + }, + { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/toolExample" + } + ] + } + } + ] + } + }, + "type": "object" + }, + "contact": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "email": { + "format": "email", + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "type": "object" + }, + "elicitationDeclaration": { + "additionalProperties": false, + "oneOf": [ + { + "not": { + "required": [ + "url" + ] + }, + "properties": { + "mode": { + "const": "form" + } + }, + "required": [ + "requestedSchema" + ] + }, + { + "not": { + "required": [ + "requestedSchema" + ] + }, + "properties": { + "mode": { + "const": "url" + } + } + } + ], + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "message": { + "minLength": 1, + "type": "string" + }, + "mode": { + "enum": [ + "form", + "url" + ] + }, + "name": { + "pattern": "^[A-Za-z0-9._-]+$", + "type": "string" + }, + "onCancel": { + "minLength": 1, + "type": "string" + }, + "onDecline": { + "minLength": 1, + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "requestedSchema": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/elicitationFormSchema" + } + ] + }, + "url": { + "format": "uri", + "type": "string" + }, + "when": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name", + "mode", + "message" + ], + "type": "object" + }, + "elicitationFormOption": { + "additionalProperties": false, + "properties": { + "const": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "const", + "title" + ], + "type": "object" + }, + "elicitationFormProperty": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "format": { + "enum": [ + "email", + "uri", + "date", + "date-time" + ] + }, + "maxLength": { + "minimum": 0, + "type": "integer" + }, + "minLength": { + "minimum": 0, + "type": "integer" + }, + "title": { + "type": "string" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "number" + }, + "description": { + "type": "string" + }, + "maximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "title": { + "type": "string" + }, + "type": { + "enum": [ + "number", + "integer" + ] + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "title": { + "type": "string" + }, + "type": { + "const": "boolean" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "enum": { + "items": { + "type": "string" + }, + "type": "array" + }, + "enumNames": { + "items": { + "type": "string" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type", + "enum" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "type": "string" + }, + "description": { + "type": "string" + }, + "oneOf": { + "items": { + "$ref": "#/$defs/elicitationFormOption" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type", + "oneOf" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "default": { + "items": { + "type": "string" + }, + "type": "array" + }, + "description": { + "type": "string" + }, + "items": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "enum": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "const": "string" + } + }, + "required": [ + "type", + "enum" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "anyOf": { + "items": { + "$ref": "#/$defs/elicitationFormOption" + }, + "type": "array" + } + }, + "required": [ + "anyOf" + ], + "type": "object" + } + ] + }, + "maxItems": { + "minimum": 0, + "type": "integer" + }, + "minItems": { + "minimum": 0, + "type": "integer" + }, + "title": { + "type": "string" + }, + "type": { + "const": "array" + } + }, + "required": [ + "type", + "items" + ], + "type": "object" + } + ] + }, + "elicitationFormSchema": { + "additionalProperties": false, + "properties": { + "$schema": { + "format": "uri", + "type": "string" + }, + "properties": { + "additionalProperties": { + "$ref": "#/$defs/elicitationFormProperty" + }, + "type": "object" + }, + "required": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "type": { + "const": "object" + } + }, + "required": [ + "type", + "properties" + ], + "type": "object" + }, + "elicitationInteractionAcceptedResponse": { + "additionalProperties": false, + "properties": { + "action": { + "const": "accept" + }, + "content": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + } + }, + "required": [ + "action" + ], + "type": "object" + }, + "elicitationInteractionDeclinedResponse": { + "additionalProperties": false, + "properties": { + "action": { + "enum": [ + "decline", + "cancel" + ] + } + }, + "required": [ + "action" + ], + "type": "object" + }, + "elicitationInteractionFormRequest": { + "additionalProperties": false, + "properties": { + "message": { + "minLength": 1, + "type": "string" + }, + "mode": { + "const": "form" + }, + "requestedSchema": { + "$ref": "#/$defs/elicitationFormSchema" + } + }, + "required": [ + "mode", + "message", + "requestedSchema" + ], + "type": "object" + }, + "elicitationInteractionRequest": { + "oneOf": [ + { + "$ref": "#/$defs/elicitationInteractionFormRequest" + }, + { + "$ref": "#/$defs/elicitationInteractionUrlRequest" + } + ] + }, + "elicitationInteractionResponse": { + "oneOf": [ + { + "$ref": "#/$defs/elicitationInteractionAcceptedResponse" + }, + { + "$ref": "#/$defs/elicitationInteractionDeclinedResponse" + } + ] + }, + "elicitationInteractionUrlRequest": { + "additionalProperties": false, + "properties": { + "message": { + "minLength": 1, + "type": "string" + }, + "mode": { + "const": "url" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "mode", + "message", + "url" + ], + "type": "object" + }, + "execution": { + "additionalProperties": false, + "properties": { + "taskSupport": { + "enum": [ + "forbidden", + "optional", + "required" + ], + "type": "string" + } + }, + "type": "object" + }, + "extensionCapabilities": { + "additionalProperties": { + "type": "object" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$" + }, + "type": "object" + }, + "icon": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "mimeType": { + "type": "string" + }, + "sizes": { + "items": { + "type": "string" + }, + "type": "array" + }, + "src": { + "format": "uri", + "type": "string" + }, + "theme": { + "enum": [ + "light", + "dark" + ], + "type": "string" + } + }, + "required": [ + "src" + ], + "type": "object" + }, + "icons": { + "items": { + "$ref": "#/$defs/icon" + }, + "minItems": 1, + "type": "array" + }, + "info": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "contact": { + "$ref": "#/$defs/contact" + }, + "description": { + "type": "string" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "id": { + "type": "string" + }, + "license": { + "$ref": "#/$defs/license" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "title": { + "type": "string" + }, + "version": { + "minLength": 1, + "type": "string" + }, + "websiteUrl": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "name", + "version" + ], + "type": "object" + }, + "jsonSchemaObject": { + "additionalProperties": true, + "type": "object" + }, + "jsonValue": { + "oneOf": [ + { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + { + "items": { + "$ref": "#/$defs/jsonValue" + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "license": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "name": { + "type": "string" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "metaObject": { + "additionalProperties": true, + "propertyNames": { + "pattern": "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$" + }, + "type": "object" + }, + "oauthFlow": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "authorizationUrl": { + "format": "uri", + "type": "string" + }, + "refreshUrl": { + "format": "uri", + "type": "string" + }, + "scopes": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "tokenUrl": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "scopes" + ], + "type": "object" + }, + "oauthFlows": { + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "implicit" + ] + }, + { + "required": [ + "password" + ] + }, + { + "required": [ + "clientCredentials" + ] + }, + { + "required": [ + "authorizationCode" + ] + } + ], + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "authorizationCode": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "authorizationUrl", + "tokenUrl" + ] + } + ] + }, + "clientCredentials": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "tokenUrl" + ] + } + ] + }, + "implicit": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "authorizationUrl" + ] + } + ] + }, + "password": { + "allOf": [ + { + "$ref": "#/$defs/oauthFlow" + }, + { + "required": [ + "tokenUrl" + ] + } + ] + } + }, + "type": "object" + }, + "prompt": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "arguments": { + "items": { + "$ref": "#/$defs/promptArgument" + }, + "minItems": 1, + "type": "array" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "completionExamples": { + "$ref": "#/$defs/completionExamples" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/promptExamples" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "name": { + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "promptArgument": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "promptExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "arguments": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "result": { + "$ref": "#/$defs/completedPromptResultExample" + } + }, + "required": [ + "result" + ], + "type": "object" + }, + "promptExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/promptExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "promptMessageExample": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/toolResultContent" + }, + "role": { + "enum": [ + "user", + "assistant" + ], + "type": "string" + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + "protocolVersionScope": { + "items": { + "$ref": "#/$defs/supportedProtocolVersion" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "referenceObject": { + "additionalProperties": false, + "properties": { + "$componentRef": { + "pattern": "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$", + "type": "string" + } + }, + "required": [ + "$componentRef" + ], + "type": "object" + }, + "resource": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/resourceExamples" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "size": { + "type": "number" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + }, + "uri": { + "type": "string" + } + }, + "required": [ + "uri", + "name" + ], + "type": "object" + }, + "resourceAnnotations": { + "additionalProperties": true, + "properties": { + "audience": { + "items": { + "enum": [ + "user", + "assistant" + ], + "type": "string" + }, + "type": "array" + }, + "lastModified": { + "type": "string" + }, + "priority": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "resourceContents": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "mimeType": { + "type": "string" + }, + "text": { + "type": "string" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "blob": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri", + "blob" + ], + "type": "object" + } + ] + }, + "resourceExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "result": { + "$ref": "#/$defs/completedReadResourceResultExample" + } + }, + "required": [ + "result" + ], + "type": "object" + }, + "resourceExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "resourceTemplate": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "completionExamples": { + "$ref": "#/$defs/completionExamples" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/resourceTemplateExamples" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + }, + "uriTemplate": { + "type": "string" + } + }, + "required": [ + "uriTemplate", + "name" + ], + "type": "object" + }, + "resourceTemplateExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "result": { + "$ref": "#/$defs/completedReadResourceResultExample" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri", + "result" + ], + "type": "object" + }, + "resourceTemplateExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/resourceTemplateExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "rootDeclaration": { + "additionalProperties": false, + "properties": { + "name": { + "type": "string" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "uri" + ], + "type": "object" + }, + "rootsListRequest": { + "additionalProperties": false, + "maxProperties": 0, + "type": "object" + }, + "rootsListResult": { + "additionalProperties": false, + "properties": { + "roots": { + "items": { + "$ref": "#/$defs/rootDeclaration" + }, + "type": "array" + } + }, + "required": [ + "roots" + ], + "type": "object" + }, + "samplingContentBlock": { + "oneOf": [ + { + "$ref": "#/$defs/toolResultContent" + }, + { + "$ref": "#/$defs/samplingToolUseContent" + }, + { + "$ref": "#/$defs/samplingToolResultContent" + } + ] + }, + "samplingCreateMessageRequest": { + "additionalProperties": false, + "properties": { + "includeContext": { + "enum": [ + "none", + "thisServer", + "allServers" + ] + }, + "maxTokens": { + "minimum": 1, + "type": "integer" + }, + "messages": { + "items": { + "$ref": "#/$defs/samplingMessage" + }, + "minItems": 1, + "type": "array" + }, + "metadata": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "modelPreferences": { + "$ref": "#/$defs/samplingModelPreferences" + }, + "stopSequences": { + "items": { + "type": "string" + }, + "type": "array" + }, + "systemPrompt": { + "type": "string" + }, + "temperature": { + "type": "number" + }, + "toolChoice": { + "$ref": "#/$defs/samplingToolChoice" + }, + "tools": { + "items": { + "$ref": "#/$defs/samplingRequestTool" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "messages", + "maxTokens" + ], + "type": "object" + }, + "samplingCreateMessageResult": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/samplingMessageContent" + }, + "model": { + "type": "string" + }, + "role": { + "const": "assistant" + }, + "stopReason": { + "type": "string" + } + }, + "required": [ + "role", + "content", + "model" + ], + "type": "object" + }, + "samplingMessage": { + "additionalProperties": false, + "properties": { + "content": { + "$ref": "#/$defs/samplingMessageContent" + }, + "role": { + "enum": [ + "user", + "assistant" + ] + } + }, + "required": [ + "role", + "content" + ], + "type": "object" + }, + "samplingMessageContent": { + "oneOf": [ + { + "$ref": "#/$defs/samplingContentBlock" + }, + { + "items": { + "$ref": "#/$defs/samplingContentBlock" + }, + "minItems": 1, + "type": "array" + } + ] + }, + "samplingModelHint": { + "additionalProperties": false, + "properties": { + "name": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "samplingModelPreferences": { + "additionalProperties": false, + "properties": { + "costPriority": { + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "hints": { + "items": { + "$ref": "#/$defs/samplingModelHint" + }, + "minItems": 1, + "type": "array" + }, + "intelligencePriority": { + "maximum": 1, + "minimum": 0, + "type": "number" + }, + "speedPriority": { + "maximum": 1, + "minimum": 0, + "type": "number" + } + }, + "type": "object" + }, + "samplingRequestTool": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "annotations": { + "$ref": "#/$defs/toolAnnotations" + }, + "description": { + "type": "string" + }, + "inputSchema": { + "allOf": [ + { + "$ref": "#/$defs/schemaComponentValue" + }, + { + "properties": { + "type": { + "const": "object" + } + }, + "required": [ + "type" + ] + } + ] + }, + "name": { + "minLength": 1, + "type": "string" + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "inputSchema" + ], + "type": "object" + }, + "samplingToolChoice": { + "additionalProperties": false, + "properties": { + "mode": { + "enum": [ + "auto", + "required", + "none" + ] + } + }, + "required": [ + "mode" + ], + "type": "object" + }, + "samplingToolResultContent": { + "additionalProperties": false, + "properties": { + "content": { + "oneOf": [ + { + "$ref": "#/$defs/toolResultContent" + }, + { + "items": { + "$ref": "#/$defs/toolResultContent" + }, + "minItems": 1, + "type": "array" + } + ] + }, + "isError": { + "type": "boolean" + }, + "toolUseId": { + "type": "string" + }, + "type": { + "const": "tool_result" + } + }, + "required": [ + "type", + "toolUseId", + "content" + ], + "type": "object" + }, + "samplingToolUseContent": { + "additionalProperties": false, + "properties": { + "id": { + "type": "string" + }, + "input": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "name": { + "type": "string" + }, + "type": { + "const": "tool_use" + } + }, + "required": [ + "type", + "id", + "name", + "input" + ], + "type": "object" + }, + "schemaComponentValue": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "allOf": [ + { + "$ref": "#/$defs/jsonSchemaObject" + }, + { + "not": { + "required": [ + "$componentRef" + ] + } + } + ] + } + ] + }, + "securityRequirement": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array", + "uniqueItems": true + }, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "securityRequirementArray": { + "items": { + "$ref": "#/$defs/securityRequirement" + }, + "type": "array" + }, + "securityScheme": { + "oneOf": [ + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "bearerFormat": { + "type": "string" + }, + "description": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "type": { + "const": "http" + } + }, + "required": [ + "type", + "scheme" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "in": { + "enum": [ + "header", + "query", + "cookie" + ], + "type": "string" + }, + "name": { + "type": "string" + }, + "type": { + "const": "apiKey" + } + }, + "required": [ + "type", + "name", + "in" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "flows": { + "$ref": "#/$defs/oauthFlows" + }, + "type": { + "const": "oauth2" + } + }, + "required": [ + "type", + "flows" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "openIdConnectUrl": { + "format": "uri", + "type": "string" + }, + "type": { + "const": "openIdConnect" + } + }, + "required": [ + "type", + "openIdConnectUrl" + ], + "type": "object" + } + ] + }, + "securitySchemeMap": { + "additionalProperties": { + "$ref": "#/$defs/securityScheme" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "specificationExtensionValue": { + "$ref": "#/$defs/jsonValue" + }, + "supportedProtocolVersion": { + "enum": [ + "2024-11-05", + "2025-03-26", + "2025-06-18", + "2025-11-25", + "2026-07-28" + ], + "type": "string" + }, + "tag": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "description": { + "type": "string" + }, + "name": { + "minLength": 1, + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "tool": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/toolAnnotations" + }, + "clientRequirements": { + "$ref": "#/$defs/clientCapabilityRequirements" + }, + "deprecated": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "elicitations": { + "items": { + "$ref": "#/$defs/elicitationDeclaration" + }, + "minItems": 1, + "type": "array" + }, + "examples": { + "$ref": "#/$defs/toolExamples" + }, + "execution": { + "$ref": "#/$defs/execution" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "inputSchema": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "allOf": [ + { + "$ref": "#/$defs/schemaComponentValue" + }, + { + "properties": { + "type": { + "const": "object" + } + }, + "required": [ + "type" + ] + } + ] + } + ] + }, + "interactionExamples": { + "$ref": "#/$defs/toolInteractionExamples" + }, + "name": { + "minLength": 1, + "type": "string" + }, + "outputSchema": { + "$ref": "#/$defs/schemaComponentValue" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "tags": { + "items": { + "type": "string" + }, + "minItems": 1, + "type": "array", + "uniqueItems": true + }, + "title": { + "type": "string" + } + }, + "required": [ + "name", + "inputSchema" + ], + "type": "object" + }, + "toolAnnotations": { + "additionalProperties": true, + "properties": { + "destructiveHint": { + "type": "boolean" + }, + "idempotentHint": { + "type": "boolean" + }, + "openWorldHint": { + "type": "boolean" + }, + "readOnlyHint": { + "type": "boolean" + }, + "title": { + "type": "string" + } + }, + "type": "object" + }, + "toolExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "input": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "result": { + "$ref": "#/$defs/completedToolResultExample" + } + }, + "required": [ + "input", + "result" + ], + "type": "object" + }, + "toolExamples": { + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/$defs/referenceObject" + }, + { + "$ref": "#/$defs/toolExample" + } + ] + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "toolInteractionElicitationStep": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "declaration": { + "pattern": "^[A-Za-z0-9._-]+$", + "type": "string" + }, + "request": { + "$ref": "#/$defs/elicitationInteractionRequest" + }, + "response": { + "$ref": "#/$defs/elicitationInteractionResponse" + }, + "type": { + "const": "elicitation" + } + }, + "required": [ + "type", + "request", + "response" + ], + "type": "object" + }, + "toolInteractionExample": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "input": { + "additionalProperties": { + "$ref": "#/$defs/jsonValue" + }, + "type": "object" + }, + "result": { + "$ref": "#/$defs/completedToolResultExample" + }, + "steps": { + "items": { + "$ref": "#/$defs/toolInteractionStep" + }, + "minItems": 1, + "type": "array" + } + }, + "required": [ + "input", + "steps", + "result" + ], + "type": "object" + }, + "toolInteractionExamples": { + "additionalProperties": { + "$ref": "#/$defs/toolInteractionExample" + }, + "minProperties": 1, + "propertyNames": { + "pattern": "^[A-Za-z0-9._-]+$" + }, + "type": "object" + }, + "toolInteractionRootsStep": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "request": { + "$ref": "#/$defs/rootsListRequest" + }, + "response": { + "$ref": "#/$defs/rootsListResult" + }, + "type": { + "const": "roots" + } + }, + "required": [ + "type", + "request", + "response" + ], + "type": "object" + }, + "toolInteractionSamplingStep": { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "request": { + "$ref": "#/$defs/samplingCreateMessageRequest" + }, + "response": { + "$ref": "#/$defs/samplingCreateMessageResult" + }, + "type": { + "const": "sampling" + } + }, + "required": [ + "type", + "request", + "response" + ], + "type": "object" + }, + "toolInteractionStep": { + "oneOf": [ + { + "$ref": "#/$defs/toolInteractionElicitationStep" + }, + { + "$ref": "#/$defs/toolInteractionSamplingStep" + }, + { + "$ref": "#/$defs/toolInteractionRootsStep" + } + ] + }, + "toolResultContent": { + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "text": { + "type": "string" + }, + "type": { + "const": "text" + } + }, + "required": [ + "type", + "text" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "data": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "type": { + "enum": [ + "image", + "audio" + ] + } + }, + "required": [ + "type", + "data", + "mimeType" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "resource": { + "$ref": "#/$defs/resourceContents" + }, + "type": { + "const": "resource" + } + }, + "required": [ + "type", + "resource" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "_meta": { + "$ref": "#/$defs/metaObject" + }, + "annotations": { + "$ref": "#/$defs/resourceAnnotations" + }, + "description": { + "type": "string" + }, + "icons": { + "$ref": "#/$defs/icons" + }, + "mimeType": { + "type": "string" + }, + "name": { + "type": "string" + }, + "size": { + "type": "number" + }, + "title": { + "type": "string" + }, + "type": { + "const": "resource_link" + }, + "uri": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "uri", + "name" + ], + "type": "object" + } + ] + }, + "transport": { + "oneOf": [ + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "type": { + "const": "streamable-http" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "args": { + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "type": "string" + }, + "env": { + "additionalProperties": { + "type": "string" + }, + "type": "object" + }, + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "type": { + "const": "stdio" + } + }, + "required": [ + "type", + "command" + ], + "type": "object" + }, + { + "additionalProperties": false, + "patternProperties": { + "^x-": { + "$ref": "#/$defs/specificationExtensionValue" + } + }, + "properties": { + "protocolVersions": { + "$ref": "#/$defs/protocolVersionScope" + }, + "security": { + "$ref": "#/$defs/securityRequirementArray" + }, + "type": { + "const": "sse" + }, + "url": { + "format": "uri", + "type": "string" + } + }, + "required": [ + "type", + "url" + ], + "type": "object" + } + ] + } + } +} diff --git a/packages/validator/src/snapshots/0.8.0-rc.4/semantic.js b/packages/validator/src/snapshots/0.8.0-rc.4/semantic.js new file mode 100644 index 0000000..330b0c1 --- /dev/null +++ b/packages/validator/src/snapshots/0.8.0-rc.4/semantic.js @@ -0,0 +1,971 @@ +// Validate the immutable 0.8.0-rc.4 snapshot using only snapshot-local artifacts. + +import Ajv from 'ajv'; +import Ajv2020 from 'ajv/dist/2020.js'; +import addFormats from 'ajv-formats'; +import { UriTemplateMatcher } from 'uri-template-matcher'; +import schema from './schema.json' with { type: 'json' }; +import { + mcpExtensionCatalogue, + mcpExtensionMaturity, + semanticValidateDocument as validateBaseSemantics, + supportedProtocolVersions +} from './base.js'; + +export { mcpExtensionCatalogue, mcpExtensionMaturity, supportedProtocolVersions }; + +const TOOL_INTERACTION_SENTINEL = '__interaction_example__'; +const ajv = new Ajv2020({ allErrors: true, strict: false }); +addFormats(ajv); +const ajvDraft7 = new Ajv({ allErrors: true, strict: false }); +addFormats(ajvDraft7); +const validateStructure = ajv.compile(schema); +const primitiveCollections = ['tools', 'resources', 'resourceTemplates', 'prompts']; +const componentNamespaces = ['schemas', 'toolExamples', 'resourceExamples', 'resourceTemplateExamples', 'promptExamples']; +const knownClientCapabilities = new Set(['roots', 'sampling', 'elicitation', 'tasks', 'extensions', 'experimental']); +const protocolOrder = new Map(supportedProtocolVersions.map((version, index) => [version, index])); + +const clientCapabilitiesByVersion = { + '2024-11-05': new Set(['roots', 'sampling', 'experimental']), + '2025-03-26': new Set(['roots', 'sampling', 'experimental']), + '2025-06-18': new Set(['roots', 'sampling', 'elicitation', 'experimental']), + '2025-11-25': new Set(['roots', 'sampling', 'elicitation', 'tasks', 'experimental']), + '2026-07-28': new Set(['roots', 'sampling', 'elicitation', 'extensions', 'experimental']) +}; + +function semanticDiagnostic(code, severity, message, path) { + return { code, severity, message, path }; +} + +function usesMcpReservedPrefix(identifier) { + if (typeof identifier !== 'string' || !identifier.includes('/')) return false; + const labels = identifier.slice(0, identifier.indexOf('/')).split('.'); + return labels.length >= 2 && ['modelcontextprotocol', 'mcp'].includes(labels[1].toLowerCase()); +} + +function isReferenceObject(value) { + return value !== null + && typeof value === 'object' + && !Array.isArray(value) + && Object.hasOwn(value, '$componentRef'); +} + +function componentDiagnostic(code, rel, message, path) { + return { + code, + severity: 'error', + message: `${rel}.${path.map((segment) => typeof segment === 'number' ? `[${segment}]` : segment).join('.')} ${message}`, + path + }; +} + +export function resolveComponentReferences(document, rel = 'document') { + const resolved = structuredClone(document); + const diagnostics = []; + let substitutions = 0; + + function resolve(reference, expectedNamespace, path, stack = []) { + const match = /^#\/components\/([^/]+)\/([^/]+)$/.exec(reference?.$componentRef ?? ''); + if (!match) return reference; + const [, namespace, name] = match; + if (namespace !== expectedNamespace) { + diagnostics.push(componentDiagnostic( + 'wrong-component-reference-namespace', + rel, + `must target #/components/${expectedNamespace}, not #/components/${namespace}`, + path + )); + return reference; + } + + const key = `${namespace}/${name}`; + if (stack.includes(key)) { + diagnostics.push(componentDiagnostic( + 'component-reference-cycle', + rel, + `forms a cycle through ${[...stack, key].join(' -> ')}`, + path + )); + return reference; + } + + const target = document?.components?.[namespace]?.[name]; + if (target === undefined) { + diagnostics.push(componentDiagnostic( + 'missing-component-reference-target', + rel, + `targets missing component ${JSON.stringify(reference.$componentRef)}`, + path + )); + return reference; + } + substitutions += 1; + return isReferenceObject(target) + ? resolve(target, expectedNamespace, path, [...stack, key]) + : structuredClone(target); + } + + for (const namespace of componentNamespaces) { + for (const [name, value] of Object.entries(document?.components?.[namespace] ?? {})) { + if (isReferenceObject(value)) { + resolved.components[namespace][name] = resolve(value, namespace, ['components', namespace, name], [`${namespace}/${name}`]); + } + } + } + + for (const [collection, declarations] of Object.entries({ + tools: document?.tools, + resources: document?.resources, + resourceTemplates: document?.resourceTemplates, + prompts: document?.prompts + })) { + for (const [declarationIndex, declaration] of (declarations ?? []).entries()) { + const resolvedDeclaration = resolved[collection][declarationIndex]; + if (collection === 'tools') { + for (const field of ['inputSchema', 'outputSchema']) { + if (isReferenceObject(declaration[field])) { + resolvedDeclaration[field] = resolve(declaration[field], 'schemas', [collection, declarationIndex, field]); + } + } + } + + const exampleNamespace = collection === 'tools' + ? 'toolExamples' + : collection === 'resources' + ? 'resourceExamples' + : collection === 'resourceTemplates' + ? 'resourceTemplateExamples' + : 'promptExamples'; + for (const [name, example] of Object.entries(declaration.examples ?? {})) { + if (isReferenceObject(example)) { + resolvedDeclaration.examples[name] = resolve( + example, + exampleNamespace, + [collection, declarationIndex, 'examples', name] + ); + } + } + } + } + + for (const collection of primitiveCollections) { + for (const [declarationIndex, declaration] of (document?.[collection] ?? []).entries()) { + for (const [elicitationIndex, elicitation] of (declaration.elicitations ?? []).entries()) { + if (isReferenceObject(elicitation.requestedSchema)) { + resolved[collection][declarationIndex].elicitations[elicitationIndex].requestedSchema = resolve( + elicitation.requestedSchema, + 'schemas', + [collection, declarationIndex, 'elicitations', elicitationIndex, 'requestedSchema'] + ); + } + } + } + } + + return { document: resolved, diagnostics, substitutions }; +} + +function structuralPath(document, error) { + const path = error.instancePath + ? error.instancePath.slice(1).split('/').map((segment) => segment.replaceAll('~1', '/').replaceAll('~0', '~')) + : []; + if (error.keyword === 'required' && typeof error.params.missingProperty === 'string') { + path.push(error.params.missingProperty); + } else if (error.keyword === 'additionalProperties' && typeof error.params.additionalProperty === 'string') { + path.push(error.params.additionalProperty); + } + return path.map((segment) => Array.isArray(document) && /^(?:0|[1-9][0-9]*)$/.test(segment) ? Number(segment) : segment); +} + +function structuralDiagnostics(document) { + if (validateStructure(document)) return []; + return (validateStructure.errors ?? []).map((error) => ({ + code: 'schema-validation', + severity: 'error', + message: `does not validate against 0.8.0: ${error.instancePath || '/'} ${error.message ?? 'unknown error'}`, + path: structuralPath(document, error) + })); +} + +function canonicalize(value) { + if (Array.isArray(value)) return value.map(canonicalize); + if (value && typeof value === 'object') { + return Object.fromEntries( + Object.entries(value) + .sort(([left], [right]) => left.localeCompare(right)) + .map(([key, child]) => [key, canonicalize(child)]) + ); + } + return value; +} + +function canonicalString(value) { + return JSON.stringify(canonicalize(value)); +} + +function remapSyntheticToolExampleDiagnostic(diagnostic, toolIndex, exampleName) { + if (!Array.isArray(diagnostic.path)) return diagnostic; + const prefix = ['tools', 0, 'examples', TOOL_INTERACTION_SENTINEL]; + const matches = prefix.every((segment, index) => diagnostic.path[index] === segment); + if (!matches) return diagnostic; + return { + ...diagnostic, + message: diagnostic.message.replace( + `tools[0].examples[${JSON.stringify(TOOL_INTERACTION_SENTINEL)}]`, + `tools[${toolIndex}].interactionExamples[${JSON.stringify(exampleName)}]` + ), + path: ['tools', toolIndex, 'interactionExamples', exampleName, ...diagnostic.path.slice(prefix.length)] + }; +} + +function validateToolInteractionInputAndResult(tool, toolIndex, exampleName, example, scope) { + const synthetic = { + mcpdesc: '0.8.0', + info: { name: 'tool-interaction-validation', version: '1.0.0' }, + protocolVersions: [...scope], + tools: [ + { + name: tool.name, + inputSchema: structuredClone(tool.inputSchema), + ...(tool.outputSchema ? { outputSchema: structuredClone(tool.outputSchema) } : {}), + examples: { + [TOOL_INTERACTION_SENTINEL]: { + input: structuredClone(example.input), + result: structuredClone(example.result) + } + } + } + ] + }; + return validateBaseSemantics(synthetic) + .map((diagnostic) => remapSyntheticToolExampleDiagnostic(diagnostic, toolIndex, exampleName)) + .filter((diagnostic) => diagnostic.path?.[0] === 'tools' && diagnostic.path?.[1] === toolIndex && diagnostic.path?.[2] === 'interactionExamples'); +} + +function validateAgainstRequestedSchema(schemaValue, value, location, path, diagnostics) { + try { + const validate = ajv.compile(schemaValue); + if (!validate(value)) { + const details = validate.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown validation error'; + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-content-schema-mismatch', + 'error', + `${location} does not validate against the elicitation request schema: ${details}`, + path + )); + } + } catch { + try { + const validate = ajvDraft7.compile(schemaValue); + if (!validate(value)) { + const details = validate.errors?.map((error) => `${error.instancePath || '/'} ${error.message}`).join('; ') ?? 'unknown validation error'; + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-content-schema-mismatch', + 'error', + `${location} does not validate against the elicitation request schema: ${details}`, + path + )); + } + } catch { + // The containing Elicitation Declaration schema validator reports malformed schemas. + } + } +} + +function warnClientRequirementsContradiction(tool, step, stepLocation, stepPath, diagnostics) { + const requirements = tool.clientRequirements; + if (!requirements || typeof requirements !== 'object' || Array.isArray(requirements)) return; + + function warn(message, path) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-client-requirements-contradiction', + 'warning', + `${stepLocation} ${message}`, + path + )); + } + + if (step.type === 'roots') { + if (!Object.hasOwn(requirements, 'roots')) { + warn('illustrates roots input, but the Tool clientRequirements do not declare roots', [...stepPath, 'type']); + } + return; + } + + if (step.type === 'sampling') { + if (!Object.hasOwn(requirements, 'sampling')) { + warn('illustrates sampling input, but the Tool clientRequirements do not declare sampling', [...stepPath, 'type']); + return; + } + const sampling = requirements.sampling ?? {}; + if ((Object.hasOwn(step.request, 'tools') || Object.hasOwn(step.request, 'toolChoice')) && !Object.hasOwn(sampling, 'tools')) { + warn('illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools', [...stepPath, 'request', Object.hasOwn(step.request, 'tools') ? 'tools' : 'toolChoice']); + } + if (step.request.includeContext && step.request.includeContext !== 'none' && !Object.hasOwn(sampling, 'context')) { + warn('illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context', [...stepPath, 'request', 'includeContext']); + } + return; + } + + if (step.type === 'elicitation') { + if (!Object.hasOwn(requirements, 'elicitation')) { + warn('illustrates elicitation input, but the Tool clientRequirements do not declare elicitation', [...stepPath, 'type']); + return; + } + const elicitation = requirements.elicitation ?? {}; + if (step.request.mode === 'url' && !Object.hasOwn(elicitation, 'url')) { + warn('illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url', [...stepPath, 'request', 'mode']); + } + if (step.request.mode === 'form' && Object.keys(elicitation).length > 0 && !Object.hasOwn(elicitation, 'form')) { + warn('illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form', [...stepPath, 'request', 'mode']); + } + } +} + +function validateToolInteractionExamples(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + for (const [toolIndex, tool] of (document.tools ?? []).entries()) { + if (!tool.interactionExamples || typeof tool.interactionExamples !== 'object' || Array.isArray(tool.interactionExamples)) continue; + const scope = tool.protocolVersions ?? rootScope; + + for (const [exampleName, example] of Object.entries(tool.interactionExamples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const exampleLocation = `tools[${toolIndex}].interactionExamples[${JSON.stringify(exampleName)}]`; + const examplePath = ['tools', toolIndex, 'interactionExamples', exampleName]; + + diagnostics.push(...validateToolInteractionInputAndResult(tool, toolIndex, exampleName, example, scope)); + + for (const [stepIndex, step] of (example.steps ?? []).entries()) { + const stepLocation = `${exampleLocation}.steps[${stepIndex}]`; + const stepPath = [...examplePath, 'steps', stepIndex]; + warnClientRequirementsContradiction(tool, step, stepLocation, stepPath, diagnostics); + + if (step.type === 'elicitation') { + const request = step.request ?? {}; + const response = step.response ?? {}; + const declaration = typeof step.declaration === 'string' + ? (tool.elicitations ?? []).find((candidate) => candidate.name === step.declaration) + : undefined; + + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-version-mismatch', + 'error', + `${stepLocation}.type is not defined for MCP ${version}`, + [...stepPath, 'type'] + )); + } + if (request.mode === 'url' && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-version-mismatch', + 'error', + `${stepLocation}.request.mode "url" is not defined for MCP ${version}`, + [...stepPath, 'request', 'mode'] + )); + } + } + + if (typeof step.declaration === 'string' && !declaration) { + diagnostics.push(semanticDiagnostic( + 'unknown-elicitation-declaration', + 'error', + `${stepLocation}.declaration identifies no Tool elicitation named ${JSON.stringify(step.declaration)}`, + [...stepPath, 'declaration'] + )); + } + + if (declaration) { + if (declaration.mode !== request.mode) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-declaration-mismatch', + 'error', + `${stepLocation}.request.mode ${JSON.stringify(request.mode)} is incompatible with elicitation declaration ${JSON.stringify(step.declaration)} mode ${JSON.stringify(declaration.mode)}`, + [...stepPath, 'request', 'mode'] + )); + } + if (request.mode === 'form' && canonicalString(declaration.requestedSchema) !== canonicalString(request.requestedSchema)) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-declaration-mismatch', + 'error', + `${stepLocation}.request.requestedSchema is incompatible with elicitation declaration ${JSON.stringify(step.declaration)}`, + [...stepPath, 'request', 'requestedSchema'] + )); + } + if (request.mode === 'url' && declaration.url !== undefined && declaration.url !== request.url) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-declaration-mismatch', + 'error', + `${stepLocation}.request.url is incompatible with elicitation declaration ${JSON.stringify(step.declaration)}`, + [...stepPath, 'request', 'url'] + )); + } + } + + if (request.mode === 'form') { + if (response.action === 'accept') { + if (!Object.hasOwn(response, 'content')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-response-mismatch', + 'error', + `${stepLocation}.response.content is required when a form elicitation is accepted`, + [...stepPath, 'response', 'content'] + )); + } else { + validateAgainstRequestedSchema( + request.requestedSchema, + response.content, + `${stepLocation}.response.content`, + [...stepPath, 'response', 'content'], + diagnostics + ); + } + } else if (Object.hasOwn(response, 'content')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-response-mismatch', + 'error', + `${stepLocation}.response.content is not allowed when action is ${JSON.stringify(response.action)}`, + [...stepPath, 'response', 'content'] + )); + } + } else if (Object.hasOwn(response, 'content')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-elicitation-response-mismatch', + 'error', + `${stepLocation}.response.content is not allowed for URL elicitation responses`, + [...stepPath, 'response', 'content'] + )); + } + } + + if (step.type === 'sampling') { + for (const version of scope) { + if ((Object.hasOwn(step.request, 'tools') || Object.hasOwn(step.request, 'toolChoice')) + && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-version-mismatch', + 'error', + `${stepLocation}.request uses sampling Tool fields that are not defined for MCP ${version}`, + [...stepPath, 'request', Object.hasOwn(step.request, 'tools') ? 'tools' : 'toolChoice'] + )); + } + } + } + + if (step.type === 'roots') { + for (const [rootIndex, root] of (step.response.roots ?? []).entries()) { + if (typeof root.uri === 'string' && !root.uri.startsWith('file://')) { + diagnostics.push(semanticDiagnostic( + 'interaction-example-roots-uri', + 'error', + `${stepLocation}.response.roots[${rootIndex}].uri must be a file:// URI`, + [...stepPath, 'response', 'roots', rootIndex, 'uri'] + )); + } + } + } + } + } + } + + return diagnostics; +} + +function validateClientRequirements(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + function invalidMember(location, path, version, member) { + diagnostics.push(semanticDiagnostic( + 'client-requirement-version-mismatch', + 'error', + `${location} member ${JSON.stringify(member)} is not defined by MCP ${version}`, + [...path, member] + )); + } + + function requireObject(value, location, path, version) { + if (value && typeof value === 'object' && !Array.isArray(value)) return true; + diagnostics.push(semanticDiagnostic( + 'invalid-client-requirement-value', + 'error', + `${location} must be an object for MCP ${version}`, + path + )); + return false; + } + + function validateClosedMembers(value, allowed, location, path, version) { + if (!requireObject(value, location, path, version)) return false; + for (const member of Object.keys(value)) { + if (!allowed.has(member)) invalidMember(location, path, version, member); + } + return true; + } + + function validateTasks(value, location, path, version) { + validateClosedMembers(value, new Set(['list', 'cancel', 'requests']), location, path, version); + for (const member of ['list', 'cancel']) { + if (Object.hasOwn(value, member)) requireObject(value[member], `${location}.${member}`, [...path, member], version); + } + if (!Object.hasOwn(value, 'requests') || !requireObject(value.requests, `${location}.requests`, [...path, 'requests'], version)) return; + validateClosedMembers(value.requests, new Set(['sampling', 'elicitation']), `${location}.requests`, [...path, 'requests'], version); + for (const [family, operation] of [['sampling', 'createMessage'], ['elicitation', 'create']]) { + if (!Object.hasOwn(value.requests, family)) continue; + const familyValue = value.requests[family]; + const familyPath = [...path, 'requests', family]; + if (!validateClosedMembers(familyValue, new Set([operation]), `${location}.requests.${family}`, familyPath, version)) continue; + if (Object.hasOwn(familyValue, operation)) { + requireObject(familyValue[operation], `${location}.requests.${family}.${operation}`, [...familyPath, operation], version); + } + } + } + + for (const collection of primitiveCollections) { + for (const [primitiveIndex, primitive] of (document[collection] ?? []).entries()) { + const requirements = primitive.clientRequirements; + if (!requirements || typeof requirements !== 'object' || Array.isArray(requirements)) continue; + const scope = primitive.protocolVersions ?? rootScope; + const baseLocation = `${collection}[${primitiveIndex}].clientRequirements`; + const basePath = [collection, primitiveIndex, 'clientRequirements']; + + for (const version of scope) { + const available = clientCapabilitiesByVersion[version] ?? new Set(); + for (const [capability, value] of Object.entries(requirements)) { + if (capability.startsWith('x-')) continue; + if (knownClientCapabilities.has(capability) && !available.has(capability)) { + diagnostics.push(semanticDiagnostic( + 'client-requirement-version-mismatch', + 'error', + `${baseLocation}.${capability} is not defined by MCP ${version}; split the primitive into disjoint protocol-scoped variants when requirements differ`, + [...basePath, capability] + )); + continue; + } + if (!available.has(capability)) continue; + + const location = `${baseLocation}.${capability}`; + const path = [...basePath, capability]; + if (capability === 'roots') { + validateClosedMembers(value, version === '2026-07-28' ? new Set() : new Set(['listChanged']), location, path, version); + if (version !== '2026-07-28' && Object.hasOwn(value, 'listChanged') && typeof value.listChanged !== 'boolean') { + diagnostics.push(semanticDiagnostic('invalid-client-requirement-value', 'error', `${location}.listChanged must be a boolean for MCP ${version}`, [...path, 'listChanged'])); + } + } else if (capability === 'sampling' && ['2025-11-25', '2026-07-28'].includes(version)) { + validateClosedMembers(value, new Set(['context', 'tools']), location, path, version); + for (const member of ['context', 'tools']) { + if (Object.hasOwn(value, member)) requireObject(value[member], `${location}.${member}`, [...path, member], version); + } + if (Object.hasOwn(value, 'context')) { + diagnostics.push(semanticDiagnostic('deprecated-client-requirement', 'warning', `${location}.context uses deprecated MCP context-inclusion capability semantics in MCP ${version}`, [...path, 'context'])); + } + } else if (capability === 'elicitation' && ['2025-11-25', '2026-07-28'].includes(version)) { + validateClosedMembers(value, new Set(['form', 'url']), location, path, version); + for (const member of ['form', 'url']) { + if (Object.hasOwn(value, member)) requireObject(value[member], `${location}.${member}`, [...path, member], version); + } + } else if (capability === 'tasks') { + validateTasks(value, location, path, version); + } else if (capability === 'extensions') { + for (const extension of Object.keys(value)) { + if (!usesMcpReservedPrefix(extension)) continue; + const maturity = mcpExtensionMaturity(extension); + if (maturity === 'official') continue; + if (maturity === 'experimental') { + diagnostics.push(semanticDiagnostic( + 'experimental-reserved-extension-identifier', + 'warning', + `${location} contains experimental MCP extension ${JSON.stringify(extension)}; preserve it and review its maturity before relying on it`, + [...path, extension] + )); + } else { + diagnostics.push(semanticDiagnostic( + 'unknown-reserved-extension-identifier', + 'warning', + `${location} contains unrecognized extension ${JSON.stringify(extension)} under an MCP-reserved prefix; preserve it and review its authority`, + [...path, extension] + )); + } + } + } + + if (version === '2026-07-28' && ['roots', 'sampling'].includes(capability)) { + diagnostics.push(semanticDiagnostic( + 'deprecated-client-requirement', + 'warning', + `${location} requires an MCP capability deprecated in MCP ${version}`, + path + )); + } + } + } + } + } + + return diagnostics; +} + +function validatePromptContentVersion(content, contentLocation, contentPath, version, diagnostics) { + if (content.type === 'audio' && protocolOrder.get(version) < protocolOrder.get('2025-03-26')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation} uses audio content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (content.type === 'resource_link' && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation} uses resource-link content, which is not defined for MCP ${version}`, [...contentPath, 'type'])); + } + if (Object.hasOwn(content, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}._meta is not defined for MCP ${version}`, [...contentPath, '_meta'])); + } + if (content.type === 'resource' && Object.hasOwn(content.resource ?? {}, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}.resource._meta is not defined for MCP ${version}`, [...contentPath, 'resource', '_meta'])); + } + if (content.type === 'resource_link' && Array.isArray(content.icons) && protocolOrder.get(version) < protocolOrder.get('2025-11-25')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}.icons is not defined for MCP ${version}`, [...contentPath, 'icons'])); + } + if (content.annotations?.lastModified !== undefined && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-content-version-mismatch', 'error', `${contentLocation}.annotations.lastModified is not defined for MCP ${version}`, [...contentPath, 'annotations', 'lastModified'])); + } +} + +function validatePromptExamples(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + for (const [promptIndex, prompt] of (document.prompts ?? []).entries()) { + if (!prompt.examples || typeof prompt.examples !== 'object' || Array.isArray(prompt.examples)) continue; + const scope = prompt.protocolVersions ?? rootScope; + const declaredArguments = new Map((prompt.arguments ?? []).map((argument) => [argument.name, argument])); + + for (const [exampleName, example] of Object.entries(prompt.examples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const exampleLocation = `prompts[${promptIndex}].examples[${JSON.stringify(exampleName)}]`; + const examplePath = ['prompts', promptIndex, 'examples', exampleName]; + const result = example.result ?? {}; + const resultPath = [...examplePath, 'result']; + const argumentsValue = example.arguments; + + if (argumentsValue && typeof argumentsValue === 'object' && !Array.isArray(argumentsValue)) { + for (const [argumentName] of Object.entries(argumentsValue)) { + if (!declaredArguments.has(argumentName)) { + diagnostics.push(semanticDiagnostic( + 'prompt-example-unknown-argument', + 'error', + `${exampleLocation}.arguments contains undeclared Prompt argument ${JSON.stringify(argumentName)}`, + [...examplePath, 'arguments', argumentName] + )); + } + } + } + + for (const [argumentName, argument] of declaredArguments) { + if (argument.required === true && !Object.hasOwn(argumentsValue ?? {}, argumentName)) { + diagnostics.push(semanticDiagnostic( + 'prompt-example-missing-required-argument', + 'error', + `${exampleLocation}.arguments is missing required Prompt argument ${JSON.stringify(argumentName)}`, + [...examplePath, 'arguments', argumentName] + )); + } + } + + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(semanticDiagnostic('prompt-example-json-rpc-envelope', 'error', `${exampleLocation}.result must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, [...resultPath, envelopeField])); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(semanticDiagnostic('incomplete-prompt-example-result', 'error', `${exampleLocation}.result must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, [...resultPath, incompleteField])); + } + } + + for (const version of scope) { + const resultLocation = `${exampleLocation}.result`; + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(semanticDiagnostic('prompt-example-result-version-mismatch', 'error', `${resultLocation}.resultType must be "complete" for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(semanticDiagnostic('prompt-example-result-version-mismatch', 'error', `${resultLocation}.resultType is not defined for MCP ${version}`, [...resultPath, 'resultType'])); + } + if (Object.hasOwn(result, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic('prompt-example-result-version-mismatch', 'error', `${resultLocation}._meta is not defined for MCP ${version}`, [...resultPath, '_meta'])); + } + (result.messages ?? []).forEach((message, messageIndex) => { + const contentLocation = `${resultLocation}.messages[${messageIndex}].content`; + const contentPath = [...resultPath, 'messages', messageIndex, 'content']; + validatePromptContentVersion(message.content ?? {}, contentLocation, contentPath, version, diagnostics); + }); + } + } + } + + return diagnostics; +} + +function extractUriTemplateVariables(uriTemplate) { + const matcher = new UriTemplateMatcher(); + matcher.add(uriTemplate); + return new Set( + matcher.templates.flatMap((template) => template.parts) + .filter((part) => part.type === 'expression') + .flatMap((part) => part.expressions.map((expression) => expression.name)) + ); +} + +function validateCompletionExampleResult(result, exampleLocation, examplePath, version, diagnostics) { + const resultLocation = `${exampleLocation}.result`; + const resultPath = [...examplePath, 'result']; + + for (const envelopeField of ['jsonrpc', 'id', 'error']) { + if (Object.hasOwn(result, envelopeField)) { + diagnostics.push(semanticDiagnostic( + 'completion-example-json-rpc-envelope', + 'error', + `${resultLocation} must not contain JSON-RPC envelope field ${JSON.stringify(envelopeField)}`, + [...resultPath, envelopeField] + )); + } + } + for (const incompleteField of ['task', 'inputRequests', 'requestState']) { + if (Object.hasOwn(result, incompleteField)) { + diagnostics.push(semanticDiagnostic( + 'incomplete-completion-example-result', + 'error', + `${resultLocation} must not contain non-completed workflow field ${JSON.stringify(incompleteField)}`, + [...resultPath, incompleteField] + )); + } + } + if (version === '2026-07-28' && result.resultType !== 'complete') { + diagnostics.push(semanticDiagnostic( + 'completion-example-result-version-mismatch', + 'error', + `${resultLocation}.resultType must be "complete" for MCP ${version}`, + [...resultPath, 'resultType'] + )); + } + if (version !== '2026-07-28' && Object.hasOwn(result, 'resultType')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-result-version-mismatch', + 'error', + `${resultLocation}.resultType is not defined for MCP ${version}`, + [...resultPath, 'resultType'] + )); + } + if (Object.hasOwn(result, '_meta') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-result-version-mismatch', + 'error', + `${resultLocation}._meta is not defined for MCP ${version}`, + [...resultPath, '_meta'] + )); + } +} + +function validateCompletionExamples(document) { + const diagnostics = []; + const rootScope = document.protocolVersions ?? []; + + for (const [kind, items] of [ + ['prompts', document.prompts ?? []], + ['resourceTemplates', document.resourceTemplates ?? []] + ]) { + for (const [ownerIndex, owner] of items.entries()) { + if (!owner.completionExamples || typeof owner.completionExamples !== 'object' || Array.isArray(owner.completionExamples)) continue; + const scope = owner.protocolVersions ?? rootScope; + const ownerLocation = `${kind}[${ownerIndex}]`; + let allowedNames; + + if (kind === 'prompts') { + allowedNames = new Set((owner.arguments ?? []).map((argument) => argument.name)); + } else { + try { + allowedNames = extractUriTemplateVariables(owner.uriTemplate); + } catch (error) { + diagnostics.push(semanticDiagnostic( + 'resource-template-completion-example-invalid-template', + 'error', + `${ownerLocation}.uriTemplate is not a valid RFC 6570 template: ${error.message}`, + [kind, ownerIndex, 'uriTemplate'] + )); + allowedNames = undefined; + } + } + + for (const [exampleName, example] of Object.entries(owner.completionExamples)) { + if (!example || typeof example !== 'object' || Array.isArray(example)) continue; + const exampleLocation = `${ownerLocation}.completionExamples[${JSON.stringify(exampleName)}]`; + const examplePath = [kind, ownerIndex, 'completionExamples', exampleName]; + const targetName = example.argument?.name; + const contextArguments = example.context?.arguments; + + if (typeof targetName === 'string' && allowedNames && !allowedNames.has(targetName)) { + diagnostics.push(semanticDiagnostic( + kind === 'prompts' + ? 'prompt-completion-example-unknown-argument' + : 'resource-template-completion-example-unknown-variable', + 'error', + kind === 'prompts' + ? `${exampleLocation}.argument.name identifies undeclared Prompt argument ${JSON.stringify(targetName)}` + : `${exampleLocation}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(owner.uriTemplate)}`, + [...examplePath, 'argument', 'name'] + )); + } + + if (contextArguments && typeof contextArguments === 'object' && !Array.isArray(contextArguments)) { + for (const argumentName of Object.keys(contextArguments)) { + if (allowedNames && !allowedNames.has(argumentName)) { + diagnostics.push(semanticDiagnostic( + kind === 'prompts' + ? 'prompt-completion-example-context-unknown-argument' + : 'resource-template-completion-example-context-unknown-variable', + 'error', + kind === 'prompts' + ? `${exampleLocation}.context.arguments contains undeclared Prompt argument ${JSON.stringify(argumentName)}` + : `${exampleLocation}.context.arguments contains no RFC 6570 variable ${JSON.stringify(argumentName)} from ${JSON.stringify(owner.uriTemplate)}`, + [...examplePath, 'context', 'arguments', argumentName] + )); + } + if (argumentName === targetName) { + diagnostics.push(semanticDiagnostic( + 'completion-example-duplicate-target-context', + 'error', + `${exampleLocation}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(argumentName)}`, + [...examplePath, 'context', 'arguments', argumentName] + )); + } + } + } + + const result = example.result ?? {}; + for (const version of scope) { + if (protocolOrder.get(version) < protocolOrder.get('2025-03-26')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-version-mismatch', + 'error', + `${exampleLocation} is not defined for MCP ${version}`, + examplePath + )); + continue; + } + if (Object.hasOwn(example, 'context') && protocolOrder.get(version) < protocolOrder.get('2025-06-18')) { + diagnostics.push(semanticDiagnostic( + 'completion-example-context-version-mismatch', + 'error', + `${exampleLocation}.context is not defined for MCP ${version}`, + [...examplePath, 'context'] + )); + } + validateCompletionExampleResult(result, exampleLocation, examplePath, version, diagnostics); + } + } + } + } + + return diagnostics; +} + +export function evaluateClientRequirements(requirements, clientCapabilities, version) { + if (!supportedProtocolVersions.includes(version)) { + throw new Error(`Unsupported MCP protocol revision ${JSON.stringify(version)}`); + } + if (requirements === undefined) { + return { status: 'satisfied', declared: false, unsatisfied: [], indeterminate: [] }; + } + + const profile = clientCapabilities && typeof clientCapabilities === 'object' && !Array.isArray(clientCapabilities) + ? clientCapabilities + : {}; + const unsatisfied = []; + const indeterminate = []; + + function requirePresence(owner, key, path) { + if (Object.hasOwn(owner, key)) return true; + unsatisfied.push(path); + return false; + } + + function evaluateMarkerMap(required, advertised, path) { + for (const [member, settings] of Object.entries(required)) { + const memberPath = [...path, member]; + if (!requirePresence(advertised, member, memberPath)) continue; + if (Object.keys(settings).length > 0) indeterminate.push(memberPath); + } + } + + for (const [capability, required] of Object.entries(requirements)) { + if (capability.startsWith('x-')) continue; + const path = [capability]; + if (!requirePresence(profile, capability, path)) continue; + const advertised = profile[capability]; + + if (capability === 'roots') { + if (Object.hasOwn(required, 'listChanged') + && (!advertised || advertised.listChanged !== required.listChanged)) { + unsatisfied.push([...path, 'listChanged']); + } + } else if (capability === 'sampling' || capability === 'elicitation') { + evaluateMarkerMap(required, advertised ?? {}, path); + } else if (capability === 'tasks') { + for (const member of ['list', 'cancel']) { + if (Object.hasOwn(required, member)) requirePresence(advertised ?? {}, member, [...path, member]); + } + for (const [family, operation] of [['sampling', 'createMessage'], ['elicitation', 'create']]) { + if (!Object.hasOwn(required.requests ?? {}, family)) continue; + const familyPath = [...path, 'requests', family]; + if (!requirePresence(advertised?.requests ?? {}, family, familyPath)) continue; + if (Object.hasOwn(required.requests[family], operation)) { + requirePresence(advertised.requests[family] ?? {}, operation, [...familyPath, operation]); + } + } + } else if (capability === 'extensions') { + evaluateMarkerMap(required, advertised ?? {}, path); + } else if (capability === 'experimental') { + for (const member of Object.keys(required)) { + const memberPath = [...path, member]; + if (requirePresence(advertised ?? {}, member, memberPath)) indeterminate.push(memberPath); + } + } else { + indeterminate.push(path); + } + } + + return { + status: unsatisfied.length ? 'unsatisfied' : indeterminate.length ? 'indeterminate' : 'satisfied', + declared: true, + unsatisfied, + indeterminate + }; +} + +export function semanticValidateDocument(document, rel = 'document') { + const resolution = resolveComponentReferences(document, rel); + const resolvedStructureDiagnostics = resolution.diagnostics.length || resolution.substitutions === 0 + ? [] + : structuralDiagnostics(resolution.document); + const diagnostics = [ + ...resolution.diagnostics, + ...resolvedStructureDiagnostics, + ...(resolution.diagnostics.length || resolvedStructureDiagnostics.length + ? [] + : validateBaseSemantics(resolution.document, rel)), + ...validateToolInteractionExamples(resolution.document), + ...validatePromptExamples(resolution.document), + ...validateCompletionExamples(resolution.document), + ...validateClientRequirements(document) + ]; + const filtered = Object.hasOwn(document, 'transports') + ? diagnostics + : diagnostics.filter((diagnostic) => diagnostic.code !== 'transport-coverage-gap'); + return filtered.sort( + (left, right) => left.code.localeCompare(right.code) + || left.message.localeCompare(right.message) + || JSON.stringify(left.path).localeCompare(JSON.stringify(right.path)) + ); +} + +export function validateMcpdesc08Document(document) { + const diagnostics = structuralDiagnostics(document); + return diagnostics.length ? diagnostics : semanticValidateDocument(document); +} diff --git a/packages/validator/standalone.js b/packages/validator/standalone.js index f2b8dd8..f2debe7 100644 --- a/packages/validator/standalone.js +++ b/packages/validator/standalone.js @@ -1 +1 @@ -var Ao=Object.defineProperty;var Os=(t,s)=>()=>(s||t((s={exports:{}}).exports,s),s.exports),Pi=(t,s)=>{for(var y in s)Ao(t,y,{get:s[y],enumerable:!0})};var wi=Os((Ip,vi)=>{"use strict";vi.exports=function t(s,y){if(s===y)return!0;if(s&&y&&typeof s=="object"&&typeof y=="object"){if(s.constructor!==y.constructor)return!1;var g,u,a;if(Array.isArray(s)){if(g=s.length,g!=y.length)return!1;for(u=g;u--!==0;)if(!t(s[u],y[u]))return!1;return!0}if(s.constructor===RegExp)return s.source===y.source&&s.flags===y.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===y.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===y.toString();if(a=Object.keys(s),g=a.length,g!==Object.keys(y).length)return!1;for(u=g;u--!==0;)if(!Object.prototype.hasOwnProperty.call(y,a[u]))return!1;for(u=g;u--!==0;){var e=a[u];if(!t(s[e],y[e]))return!1}return!0}return s!==s&&y!==y}});var qs=Os(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var ji=wi();ji.code='require("ajv/dist/runtime/equal").default';Zs.default=ji});var Ni=Os(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.formatNames=Re.fastFormats=Re.fullFormats=void 0;function Se(t,s){return{validate:t,compare:s}}Re.fullFormats={date:Se(xi,Us),time:Se(Vs(!0),Ls),"date-time":Se(ki(!0),Ei),"iso-time":Se(Vs(),Ai),"iso-date-time":Se(ki(),zi),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:To,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Mo,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:So,int32:{type:"number",validate:Zo},int64:{type:"number",validate:Co},float:{type:"number",validate:qi},double:{type:"number",validate:qi},password:!0,binary:!0};Re.fastFormats={...Re.fullFormats,date:Se(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Us),time:Se(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ls),"date-time":Se(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ei),"iso-time":Se(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ai),"iso-date-time":Se(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,zi),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Re.formatNames=Object.keys(Re.fullFormats);function Eo(t){return t%4===0&&(t%100!==0||t%400===0)}var zo=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,No=[0,31,28,31,30,31,30,31,31,30,31,30,31];function xi(t){let s=zo.exec(t);if(!s)return!1;let y=+s[1],g=+s[2],u=+s[3];return g>=1&&g<=12&&u>=1&&u<=(g===2&&Eo(y)?29:No[g])}function Us(t,s){if(t&&s)return t>s?1:t23||i>59||t&&!r)return!1;if(u<=23&&a<=59&&e<60)return!0;let n=a-i*p,l=u-o*p-(n<0?1:0);return(l===23||l===-1)&&(n===59||n===-1)&&e<61}}function Ls(t,s){if(!(t&&s))return;let y=new Date("2020-01-01T"+t).valueOf(),g=new Date("2020-01-01T"+s).valueOf();if(y&&g)return y-g}function Ai(t,s){if(!(t&&s))return;let y=Cs.exec(t),g=Cs.exec(s);if(y&&g)return t=y[1]+y[2]+y[3],s=g[1]+g[2]+g[3],t>s?1:t=Ro}function Co(t){return Number.isInteger(t)}function qi(){return!0}var Vo=/[^\\]\\Z/;function Mo(t){if(Vo.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Ii=Os(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});function _i(t){let s=t.length,y=0,g=0,u;for(;g=55296&&u<=56319&&gCa,snapshotTag:()=>Za,specification:()=>ii,supportedProtocolVersions:()=>cs,validate:()=>Va});import{Validator as Tn}from"@cfworker/json-schema";var Uo=xs,Lo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"urn:mcpdesc:standalone:0.8.0-rc.2",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 2 (v0.8.0-rc.2; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}},fe=Object.prototype.hasOwnProperty,E=new RegExp("^x-","u"),Fo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"};var Es=new RegExp("^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$","u");var ht={validate:z};function z(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=z.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t))for(let b in t)ht.validate(t[b],{instancePath:s+"/"+b.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:b,rootData:u,dynamicAnchors:a})||(e=e===null?ht.validate.errors:e.concat(ht.validate.errors),r=e.length);else{let b={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[b]:e.push(b),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(Array.isArray(t)){let b=t.length;for(let h=0;h1){e:for(;i--;)for(n=i;n--;)if(Ui(t[i],t[n])){let l={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[l]:e.push(l),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return Y.errors=e,r===0}Y.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function vt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.subscribe!==void 0&&typeof t.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return vt.errors=e,r===0}vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return wt.errors=e,r===0}wt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function jt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=jt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(fe.call(Fo.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.completions!==void 0){let i=t.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.experimental!==void 0){let i=t.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.extensions!==void 0){let i=t.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),r++}for(let n in i){let l=r;if(typeof n=="string"&&!Es.test(n)){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}for(let n in i){let l=i[n];if(!(l&&typeof l=="object"&&!Array.isArray(l))){let m={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.logging!==void 0){let i=t.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.prompts!==void 0&&(Pt(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:a})||(e=e===null?Pt.errors:e.concat(Pt.errors),r=e.length)),t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.resources!==void 0&&(vt(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:a})||(e=e===null?vt.errors:e.concat(vt.errors),r=e.length)),t.tasks!==void 0){let i=t.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let l={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n)if(l!=="tools"){let m={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),r++}if(n.tools!==void 0){let l=n.tools;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let m in l)if(m!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(l.call!==void 0){let m=l.call;if(!(m&&typeof m=="object"&&!Array.isArray(m))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}}else{let m={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}t.tools!==void 0&&(wt(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:a})||(e=e===null?wt.errors:e.concat(wt.errors),r=e.length));for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return jt.errors=e,r===0}jt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var X=new RegExp("^[A-Za-z0-9._-]+$","u"),ae=new RegExp("^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$","u");var ee=new RegExp("^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$","u"),Ho={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Ti={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},bt={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};var B=Ni().fullFormats.uri;function Me(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Me.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.text===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="mimeType"||h==="text"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var m=$===r;if(!m){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.text!==void 0&&typeof t.text!="string"){let h={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.blob===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="blob"||h==="mimeType"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var f=$===r;if(!f){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let h={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=d===r;if(b&&i?(i=!1,n=[n,1]):b&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Me.errors=e,p.props=c,r===0}Me.evaluated={dynamicProps:!0,dynamicItems:!1};var Wo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function kt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=kt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.sizes!==void 0){let o=t.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.text!==void 0&&typeof t.text!="string"){let $={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="text"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.data===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[$]:e.push($),r++}if(t.mimeType===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="_meta"||$==="annotations"||$==="data"||$==="mimeType"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t._meta!==void 0){let $=t._meta;if($&&typeof $=="object"&&!Array.isArray($))for(let q in $){let w=r;if(typeof q=="string"&&!ee.test(q)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:q};e===null?e=[j]:e.push(j),r++}var f=w===r;if(!f){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:q},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.annotations!==void 0){let $=t.annotations;if($&&typeof $=="object"&&!Array.isArray($)){if($.audience!==void 0){let q=$.audience;if(Array.isArray(q)){let w=q.length;for(let j=0;j1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.data!==void 0&&typeof t.data!="string"){let $={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let $={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let $=t.type;if(!($==="image"||$==="audio")){let q={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Ti.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[q]:e.push(q),r++}}}else{let $={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=d===r;if(b&&i)i=!1,n=[n,1];else{b&&(i=!0,n=1,c!==!0&&(c=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.resource===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="_meta"||w==="annotations"||w==="resource"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let w=t._meta;if(w&&typeof w=="object"&&!Array.isArray(w))for(let j in w){let v=r;if(typeof j=="string"&&!ee.test(j)){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[k]:e.push(k),r++}var h=v===r;if(!h){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[k]:e.push(k),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.annotations!==void 0){let w=t.annotations;if(w&&typeof w=="object"&&!Array.isArray(w)){if(w.audience!==void 0){let j=w.audience;if(Array.isArray(j)){let v=j.length;for(let k=0;k1||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[v]:e.push(v),r++}if(j<0||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.resource!==void 0&&(Me(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:a})||(e=e===null?Me.errors:e.concat(Me.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let w={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[w]:e.push(w),r++}var b=$===r;if(b&&i)i=!1,n=[n,2];else{b&&(i=!0,n=2,c!==!0&&(c=!0));let w=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[v]:e.push(v),r++}if(t.uri===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[v]:e.push(v),r++}if(t.name===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!fe.call(Ti.oneOf[3].properties,v)){let k={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t._meta!==void 0){let v=t._meta;if(v&&typeof v=="object"&&!Array.isArray(v))for(let k in v){let O=r;if(typeof k=="string"&&!ee.test(k)){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:k};e===null?e=[x]:e.push(x),r++}var P=O===r;if(!P){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:k},message:"property name must be valid"};e===null?e=[x]:e.push(x),r++}}else{let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.annotations!==void 0){let v=t.annotations;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.audience!==void 0){let k=v.audience;if(Array.isArray(k)){let O=k.length;for(let x=0;x1||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[O]:e.push(O),r++}if(k<0||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[O]:e.push(O),r++}}}else{let k={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.description!==void 0&&typeof t.description!="string"){let v={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.icons!==void 0&&(me(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:a})||(e=e===null?me.errors:e.concat(me.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let v={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0&&typeof t.name!="string"){let v={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.size!==void 0&&typeof t.size!="number"){let v={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}if(t.title!==void 0&&typeof t.title!="string"){let v={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource_link"){let v={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}if(t.uri!==void 0){let v=t.uri;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}}else{let v={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}var b=w===r;b&&i?(i=!1,n=[n,3]):b&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return ye.errors=e,p.props=c,r===0}ye.evaluated={dynamicProps:!0,dynamicItems:!1};function Ot(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),r++}if(t.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0&&(ye(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?ye.errors:e.concat(ye.errors),r=e.length)),t.role!==void 0){let o=t.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:Ho.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ot.errors=e,r===0}Ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=qt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Le.errors=e,r===0}Le.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Fe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Fe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.result!==void 0&&(Le(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Le.errors:e.concat(Le.errors),r=e.length));for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Fe.errors=e,r===0}Fe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Je(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Je.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||o==="uri"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.result!==void 0&&(Le(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Le.errors:e.concat(Le.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Je.errors=e,r===0}Je.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function he(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=he.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let P={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(P!=="$componentRef"){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.$componentRef!==void 0){let P=t.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var h=l===r;if(h){i=!0,n=0;var m=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let P={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}let d=r,f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.$componentRef===void 0&&(P="$componentRef")){let $={};e===null?e=[$]:e.push($),r++}}var b=f===r;if(b){let P={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=d,e!==null&&(d?e.length=d:e=null);var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}return he.errors=e,p.props=m,r===0}he.evaluated={dynamicProps:!0,dynamicItems:!1};function He(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=He.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let m={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[m]:e.push(m),r++}let l=n.length;for(let m=0;m=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.minLength!==void 0){let h=t.minLength;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),r++}if(typeof h=="number"&&(h<0||isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0&&t.type!=="string"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="default"||h==="description"||h==="maximum"||h==="minimum"||h==="title"||h==="type")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.default!==void 0&&typeof t.default!="number"){let h={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let h={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let h={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0){let h=t.type;if(!(h==="number"||h==="integer")){let P={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Ri.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="default"||$==="description"||$==="title"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let $={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.title!==void 0&&typeof t.title!="string"){let $={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="boolean"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.enum===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="default"||w==="description"||w==="enum"||w==="enumNames"||w==="title"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.default!==void 0&&typeof t.default!="string"){let w={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let w={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.enum!==void 0){let w=t.enum;if(Array.isArray(w)){let j=w.length;for(let v=0;v=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.minItems!==void 0){let O=t.minItems;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[x]:e.push(x),r++}if(typeof O=="number"&&(O<0||isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.title!==void 0&&typeof t.title!="string"){let O={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="array"){let O={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}var d=v===r;d&&i?(i=!1,n=[n,5]):d&&(i=!0,n=5,m!==!0&&(m=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Rt.errors=e,p.props=m,r===0}Rt.evaluated={dynamicProps:!0,dynamicItems:!1};function Ke(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ke.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.$schema!==void 0){let o=t.$schema;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.properties!==void 0){let o=t.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Rt(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Rt.errors:e.concat(Rt.errors),r=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.required!==void 0){let o=t.required;if(Array.isArray(o)){let i=o.length;for(let m=0;m1){let m={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof m[c]=="number"){l=m[c];let d={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+n+" are identical)"};e===null?e=[d]:e.push(d),r++;break}m[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}if(t.type!==void 0&&t.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ke.errors=e,r===0}Ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ke(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ke.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r,m=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.url===void 0&&(v="url")){let k={};e===null?e=[k]:e.push(k),r++}}var d=c===r;if(d){let v={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=m,e!==null&&(m?e.length=m:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let v={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[v]:e.push(v),r++}if(t.mode!==void 0&&t.mode!=="form"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}}var q=l===r;if(q){i=!0,n=0;var f={};f.mode=!0}let b=r,h=r,P=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.requestedSchema===void 0&&(v="requestedSchema")){let k={};e===null?e=[k]:e.push(k),r++}}var $=P===r;if($){let v={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=h,e!==null&&(h?e.length=h:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}var q=b===r;if(q&&i?(i=!1,n=[n,1]):q&&(i=!0,n=1,f!==!0&&(f=f||{},f.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let v={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[v]:e.push(v),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}if(t.mode===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[v]:e.push(v),r++}if(t.message===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!(fe.call(Si.properties,v)||E.test(v))){let k={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t.message!==void 0){let v=t.message;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.mode!==void 0){let v=t.mode;if(!(v==="form"||v==="url")){let k={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:Si.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[k]:e.push(k),r++}}if(t.name!==void 0){let v=t.name;if(typeof v=="string"){if(!X.test(v)){let k={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onCancel!==void 0){let v=t.onCancel;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onDecline!==void 0){let v=t.onDecline;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.requestedSchema!==void 0){let v=t.requestedSchema,k=r,O=!1,x=null,I=r;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.$componentRef===void 0){let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[A]:e.push(A),r++}for(let A in v)if(A!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(v.$componentRef!==void 0){let A=v.$componentRef;if(typeof A=="string"){if(!ae.test(A)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),r++}var j=I===r;if(j){O=!0,x=0;var w=!0}let Z=r;Ke(v,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length);var j=Z===r;if(j&&O?(O=!1,x=[x,1]):j&&(O=!0,x=1,w!==!0&&(w=!0)),O)r=k,e!==null&&(k?e.length=k:e=null);else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:x},message:"must match exactly one schema in oneOf"};e===null?e=[A]:e.push(A),r++}}if(t.url!==void 0){let v=t.url;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.when!==void 0){let v=t.when;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}for(let v in t)E.test(v)&&(z(t[v],{instancePath:s+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:v,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let v={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}return ke.errors=e,r===0}ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Ue(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Ue.errors:e.concat(Ue.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Dt.errors=e,r===0}Dt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function te(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=te.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let h={};for(;f--;){let P=c[f];if(typeof P=="string"){if(typeof h[P]=="number"){b=h[P];let $={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[$]:e.push($),r++;break}h[P]=f}}}}else{let d={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}}}else{let m={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return te.errors=e,r===0}te.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Zt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Zt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(Yo.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Zt.errors=e,r===0}Zt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Qo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function Ct(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ct.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Je(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Je.errors:e.concat(Je.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Ct.errors=e,r===0}Ct.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(Qo.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(je(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.completionExamples!==void 0&&(Be(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:a})||(e=e===null?Be.errors:e.concat(Be.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Vt.errors=e,r===0}Vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Go={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function Mt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Mt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Fe(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Fe.errors:e.concat(Fe.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Mt.errors=e,r===0}Mt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ut(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ut.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(Go.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(je(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Ut.errors=e,r===0}Ut.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Xo={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function ve(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ve.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.authorizationUrl!==void 0){let o=t.authorizationUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.refreshUrl!==void 0){let o=t.refreshUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.scopes!==void 0){let o=t.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.tokenUrl!==void 0){let o=t.tokenUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return ve.errors=e,r===0}ve.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Lt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let f={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[f]:e.push(f),r++}var d=n===r;i=i||d;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let f={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[f]:e.push(f),r++}var d=l===r;i=i||d;let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let f={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[f]:e.push(f),r++}var d=m===r;i=i||d;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let f={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(i=i||d,i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[f]:e.push(f),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let f in t)if(!(f==="authorizationCode"||f==="clientCredentials"||f==="implicit"||f==="password"||E.test(f))){let b={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.authorizationCode!==void 0){let f=t.authorizationCode;if(ve(f,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)){if(f.authorizationUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}if(f.tokenUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}}if(t.clientCredentials!==void 0){let f=t.clientCredentials;if(ve(f,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.implicit!==void 0){let f=t.implicit;if(ve(f,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.authorizationUrl===void 0){let b={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.password!==void 0){let f=t.password;if(ve(f,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}return Lt.errors=e,r===0}Lt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ft(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ft.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.scheme===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="bearerFormat"||f==="description"||f==="scheme"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let f={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let f={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.name===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[f]:e.push(f),r++}if(t.in===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="description"||f==="in"||f==="name"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.in!==void 0){let f=t.in;if(typeof f!="string"){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}if(!(f==="header"||f==="query"||f==="cookie")){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:Xo.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}if(t.name!==void 0&&typeof t.name!="string"){let f={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="apiKey"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}if(t.flows===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="description"||h==="flows"||h==="type"||E.test(h))){let P={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.flows!==void 0&&(Lt(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:a})||(e=e===null?Lt.errors:e.concat(Lt.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}for(let h in t)E.test(h)&&(z(t[h],{instancePath:s+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:h,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let h={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=f===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="description"||$==="openIdConnectUrl"||$==="type"||E.test($))){let q={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl!==void 0){let $=t.openIdConnectUrl;if(typeof $=="string"){if(!B($)){let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),r++}}if(t.type!==void 0&&t.type!=="openIdConnect"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}for(let $ in t)E.test($)&&(z(t[$],{instancePath:s+"/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:$,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let $={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;d&&i?(i=!1,n=[n,3]):d&&(i=!0,n=3,m!==!0&&(m=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Ft.errors=e,p.props=m,r===0}Ft.evaluated={dynamicProps:!0,dynamicItems:!1};function Jt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Jt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!X.test(i)){let l={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[l]:e.push(l),r++}var o=n===r;if(!o){let l={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let i in t)Ft(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Ft.errors:e.concat(Ft.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Jt.errors=e,r===0}Jt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ht(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ht.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="description"||o==="name"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0){let o=t.name;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ht.errors=e,r===0}Ht.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var en={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var tn={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Wt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;We(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?We.errors:e.concat(We.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Wt.errors=e,r===0}Wt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Bt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Bt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}t.requestedSchema!==void 0&&(Ke(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Bt.errors=e,r===0}Bt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Kt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Kt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Bt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Bt.errors:e.concat(Bt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[f]:e.push(f),r++}if(t.message===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="message"||f==="mode"||f==="url")){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.message!==void 0){let f=t.message;if(typeof f=="string"){if(oe(f)<1){let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}if(t.mode!==void 0&&t.mode!=="url"){let f={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Kt.errors=e,p.props=m,r===0}Kt.evaluated={dynamicProps:!0,dynamicItems:!1};var rn={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Yt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Yt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)z(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Yt.errors=e,r===0}Yt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Yt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Yt.errors:e.concat(Yt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(f!=="action"){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.action!==void 0){let f=t.action;if(!(f==="decline"||f==="cancel")){let b={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:rn.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Qt.errors=e,p.props=m,r===0}Qt.evaluated={dynamicProps:!0,dynamicItems:!1};function Gt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Gt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!X.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.request!==void 0&&(Kt(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:a})||(e=e===null?Kt.errors:e.concat(Kt.errors),r=e.length)),t.response!==void 0&&(Qt(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?Qt.errors:e.concat(Qt.errors),r=e.length)),t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Gt.errors=e,r===0}Gt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Di={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},sn={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},on={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Xt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Xt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Xt.errors=e,r===0}Xt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function er(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=er.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.content!==void 0){let i=t.content,n=r,l=!1,m=null,c=r;ye(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?ye.errors:e.concat(ye.errors),r=e.length);var o=c===r;o&&(l=!0,m=0);let d=r;if(Array.isArray(i)){if(i.length<1){let b={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[b]:e.push(b),r++}let f=i.length;for(let b=0;b1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.hints!==void 0){let o=t.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return rr.errors=e,r===0}rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function sr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=sr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!he(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:a}))e=e===null?he.errors:e.concat(he.errors),r=e.length;else var o=he.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(oe(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return sr.errors=e,r===0}sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ir(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ir.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!fe.call(Di.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.includeContext!==void 0){let o=t.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:Di.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}if(t.maxTokens!==void 0){let o=t.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),r++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.response!==void 0&&(ar(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?ar.errors:e.concat(ar.errors),r=e.length)),t.type!==void 0&&t.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return pr.errors=e,r===0}pr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function lr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=lr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Gt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Gt.errors:e.concat(Gt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;nr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?nr.errors:e.concat(nr.errors),r=e.length);var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;pr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?pr.errors:e.concat(pr.errors),r=e.length);var d=f===r;d&&i?(i=!1,n=[n,2]):d&&(i=!0,n=2,m!==!0&&(m=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return lr.errors=e,p.props=m,r===0}lr.evaluated={dynamicProps:!0,dynamicItems:!1};function mr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=mr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="result"||o==="steps"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.result!==void 0&&(He(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?He.errors:e.concat(He.errors),r=e.length)),t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let b={};for(;d--;){let h=m[d];if(typeof h=="string"){if(typeof b[h]=="number"){f=b[h];let P={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:d,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+d+" are identical)"};e===null?e=[P]:e.push(P),r++;break}b[h]=d}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.title!==void 0&&typeof t.title!="string"){let m={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}for(let m in t)E.test(m)&&(z(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}return fr.errors=e,r===0}fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function cr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=cr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="protocolVersions"||f==="security"||f==="type"||f==="url"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.security!==void 0&&(te(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:a})||(e=e===null?te.errors:e.concat(te.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.command===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="args"||f==="command"||f==="env"||f==="protocolVersions"||f==="security"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.args!==void 0){let f=t.args;if(Array.isArray(f)){let b=f.length;for(let h=0;h1){e:for(;i--;)for(n=i;n--;)if(Ui(t[i],t[n])){let l={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[l]:e.push(l),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return Q.errors=e,r===0}Q.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function dr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=dr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.subscribe!==void 0&&typeof t.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return dr.errors=e,r===0}dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function hr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=hr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return hr.errors=e,r===0}hr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function gr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=gr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(fe.call(pn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.completions!==void 0){let i=t.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.experimental!==void 0){let i=t.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.extensions!==void 0){let i=t.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),r++}for(let n in i){let l=r;if(typeof n=="string"&&!Es.test(n)){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}for(let n in i){let l=i[n];if(!(l&&typeof l=="object"&&!Array.isArray(l))){let m={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.logging!==void 0){let i=t.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.prompts!==void 0&&(yr(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:a})||(e=e===null?yr.errors:e.concat(yr.errors),r=e.length)),t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.resources!==void 0&&(dr(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:a})||(e=e===null?dr.errors:e.concat(dr.errors),r=e.length)),t.tasks!==void 0){let i=t.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let l={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n)if(l!=="tools"){let m={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),r++}if(n.tools!==void 0){let l=n.tools;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let m in l)if(m!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(l.call!==void 0){let m=l.call;if(!(m&&typeof m=="object"&&!Array.isArray(m))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}}else{let m={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}t.tools!==void 0&&(hr(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:a})||(e=e===null?hr.errors:e.concat(hr.errors),r=e.length));for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return gr.errors=e,r===0}gr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var mn={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Zi={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},$t={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};function Qe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.text===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="mimeType"||h==="text"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var m=$===r;if(!m){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.text!==void 0&&typeof t.text!="string"){let h={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.blob===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="blob"||h==="mimeType"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var f=$===r;if(!f){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let h={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=d===r;if(b&&i?(i=!1,n=[n,1]):b&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Qe.errors=e,p.props=c,r===0}Qe.evaluated={dynamicProps:!0,dynamicItems:!1};var un={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function br(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=br.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.sizes!==void 0){let o=t.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.text!==void 0&&typeof t.text!="string"){let $={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="text"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.data===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[$]:e.push($),r++}if(t.mimeType===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="_meta"||$==="annotations"||$==="data"||$==="mimeType"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t._meta!==void 0){let $=t._meta;if($&&typeof $=="object"&&!Array.isArray($))for(let q in $){let w=r;if(typeof q=="string"&&!ee.test(q)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:q};e===null?e=[j]:e.push(j),r++}var f=w===r;if(!f){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:q},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.annotations!==void 0){let $=t.annotations;if($&&typeof $=="object"&&!Array.isArray($)){if($.audience!==void 0){let q=$.audience;if(Array.isArray(q)){let w=q.length;for(let j=0;j1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.data!==void 0&&typeof t.data!="string"){let $={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let $={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let $=t.type;if(!($==="image"||$==="audio")){let q={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Zi.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[q]:e.push(q),r++}}}else{let $={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=d===r;if(b&&i)i=!1,n=[n,1];else{b&&(i=!0,n=1,c!==!0&&(c=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.resource===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="_meta"||w==="annotations"||w==="resource"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let w=t._meta;if(w&&typeof w=="object"&&!Array.isArray(w))for(let j in w){let v=r;if(typeof j=="string"&&!ee.test(j)){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[k]:e.push(k),r++}var h=v===r;if(!h){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[k]:e.push(k),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.annotations!==void 0){let w=t.annotations;if(w&&typeof w=="object"&&!Array.isArray(w)){if(w.audience!==void 0){let j=w.audience;if(Array.isArray(j)){let v=j.length;for(let k=0;k1||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[v]:e.push(v),r++}if(j<0||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.resource!==void 0&&(Qe(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:a})||(e=e===null?Qe.errors:e.concat(Qe.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let w={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[w]:e.push(w),r++}var b=$===r;if(b&&i)i=!1,n=[n,2];else{b&&(i=!0,n=2,c!==!0&&(c=!0));let w=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[v]:e.push(v),r++}if(t.uri===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[v]:e.push(v),r++}if(t.name===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!fe.call(Zi.oneOf[3].properties,v)){let k={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t._meta!==void 0){let v=t._meta;if(v&&typeof v=="object"&&!Array.isArray(v))for(let k in v){let O=r;if(typeof k=="string"&&!ee.test(k)){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:k};e===null?e=[x]:e.push(x),r++}var P=O===r;if(!P){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:k},message:"property name must be valid"};e===null?e=[x]:e.push(x),r++}}else{let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.annotations!==void 0){let v=t.annotations;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.audience!==void 0){let k=v.audience;if(Array.isArray(k)){let O=k.length;for(let x=0;x1||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[O]:e.push(O),r++}if(k<0||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[O]:e.push(O),r++}}}else{let k={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.description!==void 0&&typeof t.description!="string"){let v={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.icons!==void 0&&(ue(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:a})||(e=e===null?ue.errors:e.concat(ue.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let v={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0&&typeof t.name!="string"){let v={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.size!==void 0&&typeof t.size!="number"){let v={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}if(t.title!==void 0&&typeof t.title!="string"){let v={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource_link"){let v={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}if(t.uri!==void 0){let v=t.uri;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}}else{let v={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}var b=w===r;b&&i?(i=!1,n=[n,3]):b&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return de.errors=e,p.props=c,r===0}de.evaluated={dynamicProps:!0,dynamicItems:!1};function $r(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=$r.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),r++}if(t.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0&&(de(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?de.errors:e.concat(de.errors),r=e.length)),t.role!==void 0){let o=t.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:mn.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return $r.errors=e,r===0}$r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Pr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Pr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Xe.errors=e,r===0}Xe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function et(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=et.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.result!==void 0&&(Xe(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length));for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return et.errors=e,r===0}et.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function tt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=tt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||o==="uri"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.result!==void 0&&(Xe(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return tt.errors=e,r===0}tt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ge(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ge.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let P={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(P!=="$componentRef"){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.$componentRef!==void 0){let P=t.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var h=l===r;if(h){i=!0,n=0;var m=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let P={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}let d=r,f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.$componentRef===void 0&&(P="$componentRef")){let $={};e===null?e=[$]:e.push($),r++}}var b=f===r;if(b){let P={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=d,e!==null&&(d?e.length=d:e=null);var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}return ge.errors=e,p.props=m,r===0}ge.evaluated={dynamicProps:!0,dynamicItems:!1};function rt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=rt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let m={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[m]:e.push(m),r++}let l=n.length;for(let m=0;m=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.minLength!==void 0){let h=t.minLength;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),r++}if(typeof h=="number"&&(h<0||isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0&&t.type!=="string"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="default"||h==="description"||h==="maximum"||h==="minimum"||h==="title"||h==="type")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.default!==void 0&&typeof t.default!="number"){let h={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let h={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let h={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0){let h=t.type;if(!(h==="number"||h==="integer")){let P={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Vi.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="default"||$==="description"||$==="title"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let $={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.title!==void 0&&typeof t.title!="string"){let $={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="boolean"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.enum===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="default"||w==="description"||w==="enum"||w==="enumNames"||w==="title"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.default!==void 0&&typeof t.default!="string"){let w={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let w={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.enum!==void 0){let w=t.enum;if(Array.isArray(w)){let j=w.length;for(let v=0;v=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.minItems!==void 0){let O=t.minItems;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[x]:e.push(x),r++}if(typeof O=="number"&&(O<0||isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.title!==void 0&&typeof t.title!="string"){let O={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="array"){let O={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}var d=v===r;d&&i?(i=!1,n=[n,5]):d&&(i=!0,n=5,m!==!0&&(m=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return zr.errors=e,p.props=m,r===0}zr.evaluated={dynamicProps:!0,dynamicItems:!1};function ot(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.$schema!==void 0){let o=t.$schema;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.properties!==void 0){let o=t.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)zr(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?zr.errors:e.concat(zr.errors),r=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.required!==void 0){let o=t.required;if(Array.isArray(o)){let i=o.length;for(let m=0;m1){let m={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof m[c]=="number"){l=m[c];let d={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+n+" are identical)"};e===null?e=[d]:e.push(d),r++;break}m[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}if(t.type!==void 0&&t.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return ot.errors=e,r===0}ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=qe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r,m=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.url===void 0&&(v="url")){let k={};e===null?e=[k]:e.push(k),r++}}var d=c===r;if(d){let v={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=m,e!==null&&(m?e.length=m:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let v={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[v]:e.push(v),r++}if(t.mode!==void 0&&t.mode!=="form"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}}var q=l===r;if(q){i=!0,n=0;var f={};f.mode=!0}let b=r,h=r,P=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.requestedSchema===void 0&&(v="requestedSchema")){let k={};e===null?e=[k]:e.push(k),r++}}var $=P===r;if($){let v={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=h,e!==null&&(h?e.length=h:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}var q=b===r;if(q&&i?(i=!1,n=[n,1]):q&&(i=!0,n=1,f!==!0&&(f=f||{},f.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let v={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[v]:e.push(v),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}if(t.mode===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[v]:e.push(v),r++}if(t.message===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!(fe.call(Ci.properties,v)||E.test(v))){let k={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t.message!==void 0){let v=t.message;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.mode!==void 0){let v=t.mode;if(!(v==="form"||v==="url")){let k={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:Ci.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[k]:e.push(k),r++}}if(t.name!==void 0){let v=t.name;if(typeof v=="string"){if(!X.test(v)){let k={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onCancel!==void 0){let v=t.onCancel;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onDecline!==void 0){let v=t.onDecline;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.requestedSchema!==void 0){let v=t.requestedSchema,k=r,O=!1,x=null,I=r;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.$componentRef===void 0){let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[A]:e.push(A),r++}for(let A in v)if(A!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(v.$componentRef!==void 0){let A=v.$componentRef;if(typeof A=="string"){if(!ae.test(A)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),r++}var j=I===r;if(j){O=!0,x=0;var w=!0}let Z=r;ot(v,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length);var j=Z===r;if(j&&O?(O=!1,x=[x,1]):j&&(O=!0,x=1,w!==!0&&(w=!0)),O)r=k,e!==null&&(k?e.length=k:e=null);else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:x},message:"must match exactly one schema in oneOf"};e===null?e=[A]:e.push(A),r++}}if(t.url!==void 0){let v=t.url;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.when!==void 0){let v=t.when;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}for(let v in t)E.test(v)&&(N(t[v],{instancePath:s+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:v,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let v={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}return qe.errors=e,r===0}qe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Nr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Nr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Ge(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Ge.errors:e.concat(Ge.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Nr.errors=e,r===0}Nr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function re(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=re.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let h={};for(;f--;){let P=c[f];if(typeof P=="string"){if(typeof h[P]=="number"){b=h[P];let $={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[$]:e.push($),r++;break}h[P]=f}}}}else{let d={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}}}else{let m={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return re.errors=e,r===0}re.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function _r(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=_r.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(yn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return _r.errors=e,r===0}_r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var dn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function Ir(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ir.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;tt(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Ir.errors=e,r===0}Ir.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Tr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Tr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(dn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(Oe(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?Oe.errors:e.concat(Oe.errors),r=e.length)),t.completionExamples!==void 0&&(it(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:a})||(e=e===null?it.errors:e.concat(it.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Tr.errors=e,r===0}Tr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var hn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function Sr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Sr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;et(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?et.errors:e.concat(et.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Sr.errors=e,r===0}Sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Rr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Rr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(hn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(Oe(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?Oe.errors:e.concat(Oe.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Rr.errors=e,r===0}Rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var gn={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function we(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=we.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.authorizationUrl!==void 0){let o=t.authorizationUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.refreshUrl!==void 0){let o=t.refreshUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.scopes!==void 0){let o=t.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.tokenUrl!==void 0){let o=t.tokenUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return we.errors=e,r===0}we.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Dr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let f={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[f]:e.push(f),r++}var d=n===r;i=i||d;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let f={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[f]:e.push(f),r++}var d=l===r;i=i||d;let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let f={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[f]:e.push(f),r++}var d=m===r;i=i||d;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let f={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(i=i||d,i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[f]:e.push(f),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let f in t)if(!(f==="authorizationCode"||f==="clientCredentials"||f==="implicit"||f==="password"||E.test(f))){let b={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.authorizationCode!==void 0){let f=t.authorizationCode;if(we(f,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)){if(f.authorizationUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}if(f.tokenUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}}if(t.clientCredentials!==void 0){let f=t.clientCredentials;if(we(f,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.implicit!==void 0){let f=t.implicit;if(we(f,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.authorizationUrl===void 0){let b={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.password!==void 0){let f=t.password;if(we(f,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}return Dr.errors=e,r===0}Dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Zr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Zr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.scheme===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="bearerFormat"||f==="description"||f==="scheme"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let f={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let f={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.name===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[f]:e.push(f),r++}if(t.in===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="description"||f==="in"||f==="name"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.in!==void 0){let f=t.in;if(typeof f!="string"){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}if(!(f==="header"||f==="query"||f==="cookie")){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:gn.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}if(t.name!==void 0&&typeof t.name!="string"){let f={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="apiKey"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}if(t.flows===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="description"||h==="flows"||h==="type"||E.test(h))){let P={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.flows!==void 0&&(Dr(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:a})||(e=e===null?Dr.errors:e.concat(Dr.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}for(let h in t)E.test(h)&&(N(t[h],{instancePath:s+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:h,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let h={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=f===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="description"||$==="openIdConnectUrl"||$==="type"||E.test($))){let q={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl!==void 0){let $=t.openIdConnectUrl;if(typeof $=="string"){if(!B($)){let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),r++}}if(t.type!==void 0&&t.type!=="openIdConnect"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}for(let $ in t)E.test($)&&(N(t[$],{instancePath:s+"/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:$,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let $={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;d&&i?(i=!1,n=[n,3]):d&&(i=!0,n=3,m!==!0&&(m=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Zr.errors=e,p.props=m,r===0}Zr.evaluated={dynamicProps:!0,dynamicItems:!1};function Cr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Cr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!X.test(i)){let l={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[l]:e.push(l),r++}var o=n===r;if(!o){let l={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let i in t)Zr(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Zr.errors:e.concat(Zr.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Cr.errors=e,r===0}Cr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Vr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="description"||o==="name"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0){let o=t.name;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Vr.errors=e,r===0}Vr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var bn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var $n={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Mr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Mr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;st(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?st.errors:e.concat(st.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Mr.errors=e,r===0}Mr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ur(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ur.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}t.requestedSchema!==void 0&&(ot(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ur.errors=e,r===0}Ur.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Lr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Ur(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Ur.errors:e.concat(Ur.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[f]:e.push(f),r++}if(t.message===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="message"||f==="mode"||f==="url")){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.message!==void 0){let f=t.message;if(typeof f=="string"){if(oe(f)<1){let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}if(t.mode!==void 0&&t.mode!=="url"){let f={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Lr.errors=e,p.props=m,r===0}Lr.evaluated={dynamicProps:!0,dynamicItems:!1};var Pn={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Fr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Fr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)N(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Fr.errors=e,r===0}Fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Jr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Jr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Fr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Fr.errors:e.concat(Fr.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(f!=="action"){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.action!==void 0){let f=t.action;if(!(f==="decline"||f==="cancel")){let b={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:Pn.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Jr.errors=e,p.props=m,r===0}Jr.evaluated={dynamicProps:!0,dynamicItems:!1};function Hr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Hr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!X.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.request!==void 0&&(Lr(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:a})||(e=e===null?Lr.errors:e.concat(Lr.errors),r=e.length)),t.response!==void 0&&(Jr(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?Jr.errors:e.concat(Jr.errors),r=e.length)),t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Hr.errors=e,r===0}Hr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Mi={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},vn={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},wn={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Wr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Wr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)N(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Wr.errors=e,r===0}Wr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Br(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Br.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.content!==void 0){let i=t.content,n=r,l=!1,m=null,c=r;de(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?de.errors:e.concat(de.errors),r=e.length);var o=c===r;o&&(l=!0,m=0);let d=r;if(Array.isArray(i)){if(i.length<1){let b={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[b]:e.push(b),r++}let f=i.length;for(let b=0;b1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.hints!==void 0){let o=t.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Yr.errors=e,r===0}Yr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!ge(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:a}))e=e===null?ge.errors:e.concat(ge.errors),r=e.length;else var o=ge.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(oe(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Qr.errors=e,r===0}Qr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Gr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Gr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!fe.call(Mi.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.includeContext!==void 0){let o=t.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:Mi.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}if(t.maxTokens!==void 0){let o=t.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),r++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.response!==void 0&&(ts(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?ts.errors:e.concat(ts.errors),r=e.length)),t.type!==void 0&&t.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return rs.errors=e,r===0}rs.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ss(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ss.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Hr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Hr.errors:e.concat(Hr.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;es(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?es.errors:e.concat(es.errors),r=e.length);var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;rs(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?rs.errors:e.concat(rs.errors),r=e.length);var d=f===r;d&&i?(i=!1,n=[n,2]):d&&(i=!0,n=2,m!==!0&&(m=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return ss.errors=e,p.props=m,r===0}ss.evaluated={dynamicProps:!0,dynamicItems:!1};function is(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=is.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="result"||o==="steps"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)N(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.result!==void 0&&(rt(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?rt.errors:e.concat(rt.errors),r=e.length)),t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let b={};for(;d--;){let h=m[d];if(typeof h=="string"){if(typeof b[h]=="number"){f=b[h];let P={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:d,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+d+" are identical)"};e===null?e=[P]:e.push(P),r++;break}b[h]=d}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.title!==void 0&&typeof t.title!="string"){let m={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}for(let m in t)E.test(m)&&(N(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}return ns.errors=e,r===0}ns.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function as(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=as.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="protocolVersions"||f==="security"||f==="type"||f==="url"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.security!==void 0&&(re(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:a})||(e=e===null?re.errors:e.concat(re.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.command===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="args"||f==="command"||f==="env"||f==="protocolVersions"||f==="security"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.args!==void 0){let f=t.args;if(Array.isArray(f)){let b=f.length;for(let h=0;h=",limit:0},message:"must be >= 0"};a===null?a=[r]:a.push(r),e++}return Ce.errors=a,e===0}var Js={validate:J};function Ae(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t}={}){let a=null,e=0;if(Array.isArray(t)){if(t.length<1){let p={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[p]:a.push(p),e++}let r=t.length;for(let p=0;p",limit:0},message:"must be > 0"};a===null?a=[l]:a.push(l),e++}}else{let l={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[l]:a.push(l),e++}}if(t.maximum!==void 0&&typeof t.maximum!="number"){let n={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.exclusiveMaximum!==void 0&&typeof t.exclusiveMaximum!="number"){let n={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let n={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.exclusiveMinimum!==void 0&&typeof t.exclusiveMinimum!="number"){let n={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.maxLength!==void 0){let n=t.maxLength;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minLength!==void 0&&(Ce(t.minLength,{instancePath:s+"/minLength",parentData:t,parentDataProperty:"minLength",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.pattern!==void 0&&typeof t.pattern!="string"){let n={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}if(t.additionalItems!==void 0&&(J(t.additionalItems,{instancePath:s+"/additionalItems",parentData:t,parentDataProperty:"additionalItems",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.items!==void 0){let n=t.items,l=e,m=!1,c=e;J(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);var r=c===e;if(m=m||r,!m){let d=e;Ae(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length);var r=d===e;m=m||r}if(m)e=l,a!==null&&(l?a.length=l:a=null);else{let d={instancePath:s+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[d]:a.push(d),e++}}if(t.maxItems!==void 0){let n=t.maxItems;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minItems!==void 0&&(Ce(t.minItems,{instancePath:s+"/minItems",parentData:t,parentDataProperty:"minItems",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.uniqueItems!==void 0&&typeof t.uniqueItems!="boolean"){let n={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};a===null?a=[n]:a.push(n),e++}if(t.contains!==void 0&&(J(t.contains,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.maxProperties!==void 0){let n=t.maxProperties;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minProperties!==void 0&&(Ce(t.minProperties,{instancePath:s+"/minProperties",parentData:t,parentDataProperty:"minProperties",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.required!==void 0){let n=t.required;if(Array.isArray(n)){let l=n.length;for(let d=0;d1){let d={};for(;m--;){let f=n[m];if(typeof f=="string"){if(typeof d[f]=="number"){c=d[f];let b={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:m,j:c},message:"must NOT have duplicate items (items ## "+c+" and "+m+" are identical)"};a===null?a=[b]:a.push(b),e++;break}d[f]=m}}}}else{let l={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[l]:a.push(l),e++}}if(t.additionalProperties!==void 0&&(J(t.additionalProperties,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.definitions!==void 0){let n=t.definitions;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n)J(n[l],{instancePath:s+"/definitions/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);else{let l={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.properties!==void 0){let n=t.properties;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n)J(n[l],{instancePath:s+"/properties/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);else{let l={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.patternProperties!==void 0){let n=t.patternProperties;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n){var p=e===e;if(!p){let c={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};a===null?a=[c]:a.push(c),e++}}for(let l in n)J(n[l],{instancePath:s+"/patternProperties/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)}else{let l={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.dependencies!==void 0){let n=t.dependencies;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n){let m=n[l],c=e,d=!1,f=e;J(m,{instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);var o=f===e;if(d=d||o,!d){let b=e;if(Array.isArray(m)){let P=m.length;for(let w=0;w1){let w={};for(;$--;){let j=m[$];if(typeof j=="string"){if(typeof w[j]=="number"){q=w[j];let v={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:$,j:q},message:"must NOT have duplicate items (items ## "+q+" and "+$+" are identical)"};a===null?a=[v]:a.push(v),e++;break}w[j]=$}}}}else{let P={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[P]:a.push(P),e++}var o=b===e;d=d||o}if(d)e=c,a!==null&&(c?a.length=c:a=null);else{let b={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[b]:a.push(b),e++}}else{let l={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.propertyNames!==void 0&&(J(t.propertyNames,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.enum!==void 0){let n=t.enum;if(Array.isArray(n)){if(n.length<1){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[c]:a.push(c),e++}let l=n.length,m;if(l>1){e:for(;l--;)for(m=l;m--;)if(Hi(n[l],n[m])){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};a===null?a=[c]:a.push(c),e++;break e}}}else{let l={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[l]:a.push(l),e++}}if(t.type!==void 0){let n=t.type,l=e,m=!1,c=e;if(!(n==="array"||n==="boolean"||n==="integer"||n==="null"||n==="number"||n==="object"||n==="string")){let d={instancePath:s+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:Ji.enum},message:"must be equal to one of the allowed values"};a===null?a=[d]:a.push(d),e++}var i=c===e;if(m=m||i,!m){let d=e;if(Array.isArray(n)){if(n.length<1){let $={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[$]:a.push($),e++}let b=n.length;for(let $=0;$1){e:for(;h--;)for(P=h;P--;)if(Hi(n[h],n[P])){let $={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:h,j:P},message:"must NOT have duplicate items (items ## "+P+" and "+h+" are identical)"};a===null?a=[$]:a.push($),e++;break e}}}else{let b={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[b]:a.push(b),e++}var i=d===e;m=m||i}if(m)e=l,a!==null&&(l?a.length=l:a=null);else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[d]:a.push(d),e++}}if(t.format!==void 0&&typeof t.format!="string"){let n={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let n={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let n={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}t.if!==void 0&&(J(t.if,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.then!==void 0&&(J(t.then,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.else!==void 0&&(J(t.else,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.allOf!==void 0&&(Ae(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.anyOf!==void 0&&(Ae(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.oneOf!==void 0&&(Ae(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.not!==void 0&&(J(t.not,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length))}return J.errors=a,e===0}var Ki=xe,kn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}};var On={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}};var qn=new RegExp("^[^#]*#?$","u"),Hs=new RegExp("^[A-Za-z_][-A-Za-z0-9._]*$","u");function Ee(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ee.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let c={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:On.type},message:"must be object,boolean"};e===null?e=[c]:e.push(c),r++}if(a.meta||(a.meta=Ee),t&&typeof t=="object"&&!Array.isArray(t)){if(t.$id!==void 0){let c=t.$id;if(typeof c!="string"){let d={instancePath:s+"/$id",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}if(typeof c=="string"&&!qn.test(c)){let d={instancePath:s+"/$id",schemaPath:"#/properties/%24id/pattern",keyword:"pattern",params:{pattern:"^[^#]*#?$"},message:'must match pattern "^[^#]*#?$"'};e===null?e=[d]:e.push(d),r++}}if(t.$schema!==void 0&&typeof t.$schema!="string"){let c={instancePath:s+"/$schema",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$ref!==void 0&&typeof t.$ref!="string"){let c={instancePath:s+"/$ref",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$anchor!==void 0){let c=t.$anchor;if(typeof c=="string"){if(!Hs.test(c)){let d={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[d]:e.push(d),r++}}else{let d={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}}if(t.$dynamicRef!==void 0&&typeof t.$dynamicRef!="string"){let c={instancePath:s+"/$dynamicRef",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$dynamicAnchor!==void 0){let c=t.$dynamicAnchor;if(typeof c=="string"){if(!Hs.test(c)){let d={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[d]:e.push(d),r++}}else{let d={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}}if(t.$vocabulary!==void 0){let c=t.$vocabulary;if(c&&typeof c=="object"&&!Array.isArray(c)){for(let d in c){let f=r;if(typeof d!="string"){let b={instancePath:s+"/$vocabulary",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string",propertyName:d};e===null?e=[b]:e.push(b),r++}var o=f===r;if(!o){let b={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/propertyNames",keyword:"propertyNames",params:{propertyName:d},message:"property name must be valid"};e===null?e=[b]:e.push(b),r++}}for(let d in c)if(typeof c[d]!="boolean"){let f={instancePath:s+"/$vocabulary/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24vocabulary/additionalProperties/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[f]:e.push(f),r++}}else{let d={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[d]:e.push(d),r++}}if(t.$comment!==void 0&&typeof t.$comment!="string"){let c={instancePath:s+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$defs!==void 0){let c=t.$defs;if(c&&typeof c=="object"&&!Array.isArray(c))for(let d in c){let f=c[d],b=a.meta;if(b)if(!b(f,{instancePath:s+"/$defs/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:d,rootData:u,dynamicAnchors:a}))e=e===null?b.errors:e.concat(b.errors),r=e.length;else var i=b.evaluated.props,n=b.evaluated.items;else if(!Ee(f,{instancePath:s+"/$defs/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:d,rootData:u,dynamicAnchors:a}))e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length;else{var l=Ee.evaluated.props;i!==!0&&l!==void 0&&(l===!0?i=!0:(i=i||{},Object.assign(i,l)));var m=Ee.evaluated.items;n!==!0&&m!==void 0&&(n=m===!0?!0:n>m?n:m)}}else{let d={instancePath:s+"/$defs",schemaPath:"#/properties/%24defs/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[d]:e.push(d),r++}}}return Ee.errors=e,r===0}Ee.evaluated={props:{$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};var xn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}};function ce(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ce.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){if(t.length<1){let c={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let m=t.length;for(let c=0;cl?i:l)}}}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[m]:e.push(m),r++}return ce.errors=e,r===0}ce.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function C(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=C.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let V={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:xn.type},message:"must be object,boolean"};e===null?e=[V]:e.push(V),r++}if(a.meta||(a.meta=C),t&&typeof t=="object"&&!Array.isArray(t)){if(t.prefixItems!==void 0&&(ce(t.prefixItems,{instancePath:s+"/prefixItems",parentData:t,parentDataProperty:"prefixItems",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.items!==void 0){let V=t.items,R=a.meta;if(R)if(!R(V,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var o=R.evaluated.props,i=R.evaluated.items;else if(!C(V,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var n=C.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=C.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}if(t.contains!==void 0){let V=t.contains,R=a.meta;if(R)if(!R(V,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var m=R.evaluated.props,c=R.evaluated.items;else if(!C(V,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var d=C.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=C.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}}if(t.additionalProperties!==void 0){let V=t.additionalProperties,R=a.meta;if(R)if(!R(V,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var b=R.evaluated.props,h=R.evaluated.items;else if(!C(V,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var P=C.evaluated.props;b!==!0&&P!==void 0&&(P===!0?b=!0:(b=b||{},Object.assign(b,P)));var $=C.evaluated.items;h!==!0&&$!==void 0&&(h=$===!0?!0:h>$?h:$)}}if(t.properties!==void 0){let V=t.properties;if(V&&typeof V=="object"&&!Array.isArray(V))for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/properties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var q=ne.evaluated.props,w=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/properties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var j=C.evaluated.props;q!==!0&&j!==void 0&&(j===!0?q=!0:(q=q||{},Object.assign(q,j)));var v=C.evaluated.items;w!==!0&&v!==void 0&&(w=v===!0?!0:w>v?w:v)}}else{let R={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.patternProperties!==void 0){let V=t.patternProperties;if(V&&typeof V=="object"&&!Array.isArray(V)){for(let R in V){var k=r===r;if(!k){let ne={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:R},message:"property name must be valid"};e===null?e=[ne]:e.push(ne),r++}}for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/patternProperties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var O=ne.evaluated.props,x=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/patternProperties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var I=C.evaluated.props;O!==!0&&I!==void 0&&(I===!0?O=!0:(O=O||{},Object.assign(O,I)));var Z=C.evaluated.items;x!==!0&&Z!==void 0&&(x=Z===!0?!0:x>Z?x:Z)}}}else{let R={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.dependentSchemas!==void 0){let V=t.dependentSchemas;if(V&&typeof V=="object"&&!Array.isArray(V))for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/dependentSchemas/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var A=ne.evaluated.props,_=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/dependentSchemas/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var D=C.evaluated.props;A!==!0&&D!==void 0&&(D===!0?A=!0:(A=A||{},Object.assign(A,D)));var W=C.evaluated.items;_!==!0&&W!==void 0&&(_=W===!0?!0:_>W?_:W)}}else{let R={instancePath:s+"/dependentSchemas",schemaPath:"#/properties/dependentSchemas/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.propertyNames!==void 0){let V=t.propertyNames,R=a.meta;if(R)if(!R(V,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var K=R.evaluated.props,G=R.evaluated.items;else if(!C(V,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var H=C.evaluated.props;K!==!0&&H!==void 0&&(H===!0?K=!0:(K=K||{},Object.assign(K,H)));var Te=C.evaluated.items;G!==!0&&Te!==void 0&&(G=Te===!0?!0:G>Te?G:Te)}}if(t.if!==void 0){let V=t.if,R=a.meta;if(R)if(!R(V,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var ls=R.evaluated.props,gs=R.evaluated.items;else if(!C(V,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ts=C.evaluated.props;ls!==!0&&Ts!==void 0&&(Ts===!0?ls=!0:(ls=ls||{},Object.assign(ls,Ts)));var bs=C.evaluated.items;gs!==!0&&bs!==void 0&&(gs=bs===!0?!0:gs>bs?gs:bs)}}if(t.then!==void 0){let V=t.then,R=a.meta;if(R)if(!R(V,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var ms=R.evaluated.props,$s=R.evaluated.items;else if(!C(V,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ss=C.evaluated.props;ms!==!0&&Ss!==void 0&&(Ss===!0?ms=!0:(ms=ms||{},Object.assign(ms,Ss)));var Ps=C.evaluated.items;$s!==!0&&Ps!==void 0&&($s=Ps===!0?!0:$s>Ps?$s:Ps)}}if(t.else!==void 0){let V=t.else,R=a.meta;if(R)if(!R(V,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var us=R.evaluated.props,vs=R.evaluated.items;else if(!C(V,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Rs=C.evaluated.props;us!==!0&&Rs!==void 0&&(Rs===!0?us=!0:(us=us||{},Object.assign(us,Rs)));var ws=C.evaluated.items;vs!==!0&&ws!==void 0&&(vs=ws===!0?!0:vs>ws?vs:ws)}}if(t.allOf!==void 0&&(ce(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.anyOf!==void 0&&(ce(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.oneOf!==void 0&&(ce(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.not!==void 0){let V=t.not,R=a.meta;if(R)if(!R(V,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var fs=R.evaluated.props,js=R.evaluated.items;else if(!C(V,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ds=C.evaluated.props;fs!==!0&&Ds!==void 0&&(Ds===!0?fs=!0:(fs=fs||{},Object.assign(fs,Ds)));var ks=C.evaluated.items;js!==!0&&ks!==void 0&&(js=ks===!0?!0:js>ks?js:ks)}}}return C.errors=e,r===0}C.evaluated={props:{prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0},dynamicProps:!1,dynamicItems:!1};var An={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}};function be(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=be.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let b={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:An.type},message:"must be object,boolean"};e===null?e=[b]:e.push(b),r++}if(a.meta||(a.meta=be),t&&typeof t=="object"&&!Array.isArray(t)){if(t.unevaluatedItems!==void 0){let b=t.unevaluatedItems,h=a.meta;if(h)if(!h(b,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:a}))e=e===null?h.errors:e.concat(h.errors),r=e.length;else var o=h.evaluated.props,i=h.evaluated.items;else if(!be(b,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:a}))e=e===null?be.errors:e.concat(be.errors),r=e.length;else{var n=be.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=be.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}if(t.unevaluatedProperties!==void 0){let b=t.unevaluatedProperties,h=a.meta;if(h)if(!h(b,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:a}))e=e===null?h.errors:e.concat(h.errors),r=e.length;else var m=h.evaluated.props,c=h.evaluated.items;else if(!be(b,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:a}))e=e===null?be.errors:e.concat(be.errors),r=e.length;else{var d=be.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=be.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}}}return be.errors=e,r===0}be.evaluated={props:{unevaluatedItems:!0,unevaluatedProperties:!0},dynamicProps:!1,dynamicItems:!1};var En={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}},Bi={enum:["array","boolean","integer","null","number","object","string"]};var zn=qs().default;function ct(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ct.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:En.type},message:"must be object,boolean"};e===null?e=[i]:e.push(i),r++}if(a.meta||(a.meta=ct),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type!==void 0){let i=t.type,n=r,l=!1,m=r;if(!(i==="array"||i==="boolean"||i==="integer"||i==="null"||i==="number"||i==="object"||i==="string")){let d={instancePath:s+"/type",schemaPath:"#/$defs/simpleTypes/enum",keyword:"enum",params:{allowedValues:Bi.enum},message:"must be equal to one of the allowed values"};e===null?e=[d]:e.push(d),r++}var o=m===r;l=l||o;let c=r;if(Array.isArray(i)){if(i.length<1){let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),r++}let d=i.length;for(let h=0;h1){e:for(;f--;)for(b=f;b--;)if(zn(i[f],i[b])){let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[h]:e.push(h),r++;break e}}}else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}var o=c===r;if(l=l||o,l)r=n,e!==null&&(n?e.length=n:e=null);else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[d]:e.push(d),r++}}if(t.enum!==void 0&&!Array.isArray(t.enum)){let i={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}if(t.multipleOf!==void 0){let i=t.multipleOf;if(typeof i=="number"){if(i<=0||isNaN(i)){let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.maximum!==void 0&&typeof t.maximum!="number"){let i={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.exclusiveMaximum!==void 0&&typeof t.exclusiveMaximum!="number"){let i={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let i={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.exclusiveMinimum!==void 0&&typeof t.exclusiveMinimum!="number"){let i={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.maxLength!==void 0){let i=t.maxLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minLength!==void 0){let i=t.minLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.pattern!==void 0&&typeof t.pattern!="string"){let i={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.maxItems!==void 0){let i=t.maxItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minItems!==void 0){let i=t.minItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.uniqueItems!==void 0&&typeof t.uniqueItems!="boolean"){let i={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.maxContains!==void 0){let i=t.maxContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minContains!==void 0){let i=t.minContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.maxProperties!==void 0){let i=t.maxProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minProperties!==void 0){let i=t.minProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.required!==void 0){let i=t.required;if(Array.isArray(i)){let n=i.length;for(let c=0;c1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.dependentRequired!==void 0){let i=t.dependentRequired;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=i[n];if(Array.isArray(l)){let m=l.length;for(let f=0;f1){let f={};for(;c--;){let b=l[c];if(typeof b=="string"){if(typeof f[b]=="number"){d=f[b];let h={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:c,j:d},message:"must NOT have duplicate items (items ## "+d+" and "+c+" are identical)"};e===null?e=[h]:e.push(h),r++;break}f[b]=c}}}}else{let m={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/dependentRequired",schemaPath:"#/properties/dependentRequired/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}}return ct.errors=e,r===0}ct.evaluated={props:{type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0},dynamicProps:!1,dynamicItems:!1};var Nn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}};function yt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=yt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Nn.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(a.meta||(a.meta=yt),t&&typeof t=="object"&&!Array.isArray(t)){if(t.title!==void 0&&typeof t.title!="string"){let o={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let o={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.readOnly!==void 0&&typeof t.readOnly!="boolean"){let o={instancePath:s+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.writeOnly!==void 0&&typeof t.writeOnly!="boolean"){let o={instancePath:s+"/writeOnly",schemaPath:"#/properties/writeOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.examples!==void 0&&!Array.isArray(t.examples)){let o={instancePath:s+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}}return yt.errors=e,r===0}yt.evaluated={props:{title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0},dynamicProps:!1,dynamicItems:!1};var _n={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}};function dt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:_n.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(a.meta||(a.meta=dt),t&&typeof t=="object"&&!Array.isArray(t)&&t.format!==void 0&&typeof t.format!="string"){let o={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}return dt.errors=e,r===0}dt.evaluated={props:{format:!0},dynamicProps:!1,dynamicItems:!1};var In={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}};function ze(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ze.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:In.type},message:"must be object,boolean"};e===null?e=[m]:e.push(m),r++}if(a.meta||(a.meta=ze),t&&typeof t=="object"&&!Array.isArray(t)){if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let m={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let m={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.contentSchema!==void 0){let m=t.contentSchema,c=a.meta;if(c)if(!c(m,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:a}))e=e===null?c.errors:e.concat(c.errors),r=e.length;else var o=c.evaluated.props,i=c.evaluated.items;else if(!ze(m,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:a}))e=e===null?ze.errors:e.concat(ze.errors),r=e.length;else{var n=ze.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=ze.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}}return ze.errors=e,r===0}ze.evaluated={props:{contentEncoding:!0,contentMediaType:!0,contentSchema:!0},dynamicProps:!1,dynamicItems:!1};function xe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=xe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let h={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:kn.type},message:"must be object,boolean"};e===null?e=[h]:e.push(h),r++}if(a.meta||(a.meta=xe),Ee(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length),C(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?C.errors:e.concat(C.errors),r=e.length),be(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?be.errors:e.concat(be.errors),r=e.length),ct(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?ct.errors:e.concat(ct.errors),r=e.length),yt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?yt.errors:e.concat(yt.errors),r=e.length),dt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?dt.errors:e.concat(dt.errors),r=e.length),ze(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length),t&&typeof t=="object"&&!Array.isArray(t)){if(t.definitions!==void 0){let h=t.definitions;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=h[P],q=a.meta;if(q)if(!q($,{instancePath:s+"/definitions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?q.errors:e.concat(q.errors),r=e.length;else var o=q.evaluated.props,i=q.evaluated.items;else if(!xe($,{instancePath:s+"/definitions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?xe.errors:e.concat(xe.errors),r=e.length;else{var n=xe.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=xe.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}else{let P={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.dependencies!==void 0){let h=t.dependencies;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=h[P],q=r,w=!1,j=r,v=a.meta;if(v)if(!v($,{instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?v.errors:e.concat(v.errors),r=e.length;else var m=v.evaluated.props,c=v.evaluated.items;else if(!xe($,{instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?xe.errors:e.concat(xe.errors),r=e.length;else{var d=xe.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=xe.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}var b=j===r;w=w||b;let k=r;if(Array.isArray($)){let O=$.length;for(let Z=0;Z1){let Z={};for(;x--;){let A=$[x];if(typeof A=="string"){if(typeof Z[A]=="number"){I=Z[A];let _={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:x,j:I},message:"must NOT have duplicate items (items ## "+I+" and "+x+" are identical)"};e===null?e=[_]:e.push(_),r++;break}Z[A]=x}}}}else{let O={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[O]:e.push(O),r++}var b=k===r;if(w=w||b,b&&c!==!0&&(c=!0),w)r=q,e!==null&&(q?e.length=q:e=null);else{let O={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[O]:e.push(O),r++}}else{let P={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.$recursiveAnchor!==void 0){let h=t.$recursiveAnchor;if(typeof h=="string"){if(!Hs.test(h)){let P={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}if(t.$recursiveRef!==void 0&&typeof t.$recursiveRef!="string"){let h={instancePath:s+"/$recursiveRef",schemaPath:"meta/core#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}}return xe.errors=e,r===0}xe.evaluated={props:{definitions:!0,dependencies:!0,$recursiveAnchor:!0,$recursiveRef:!0,contentEncoding:!0,contentMediaType:!0,contentSchema:!0,format:!0,title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0,type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0,unevaluatedItems:!0,unevaluatedProperties:!0,prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0,$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};function Sn(t){return t==="#"?"":t.slice(1)}function Yi(t){return/"([^"]+)"/.exec(t)?.[1]}function Rn(t){let s={};return t.keyword==="required"&&(s.missingProperty=Yi(t.error)),t.keyword==="additionalProperties"&&(s.additionalProperty=Yi(t.error)),{instancePath:Sn(t.instanceLocation),keyword:t.keyword,params:s,message:t.error}}function Dn(t){let s=new Set,y=[];function g(u){if(!(!u||typeof u!="object")){typeof u.$anchor=="string"&&s.add(u.$anchor),typeof u.$dynamicAnchor=="string"&&s.add(u.$dynamicAnchor);for(let a of["$ref","$dynamicRef","$recursiveRef"])typeof u[a]=="string"&&y.push(u[a]);for(let a of Object.values(u))g(a)}}g(t);for(let u of y){if(!u.startsWith("#"))throw new Error(`can't resolve reference ${u}`);if(u==="#"||u==="#recursive")continue;if(!u.startsWith("#/")){if(!s.has(u.slice(1)))throw new Error(`can't resolve reference ${u}`);continue}let a=t;for(let e of u.slice(2).split("/").map(r=>r.replaceAll("~1","/").replaceAll("~0","~"))){if(!a||typeof a!="object"||!Object.hasOwn(a,e))throw new Error(`can't resolve reference ${u}`);a=a[e]}}}function Zn(t,s){Dn(t);let y=new Tn(t,s,!1),g=u=>{let a=y.validate(u);return g.errors=a.valid?null:a.errors.map(Rn),a.valid};return g.errors=null,g}var zs=class{constructor(s={}){this.errors=null}compile(s){let y=Fi.get(s?.description);return y||Zn(s,this.constructor.draft)}validateSchema(s){let y=this.constructor.draft==="7"?Wi:Ki,g=y(s);return this.errors=y.errors,g}},Ws=class extends zs{static draft="7"},Ne=class extends zs{static draft="2020-12"},lt=Ws;function _e(t){return t}function Ks(t){let s=[],y="",g=0;for(;g0;)t[e]==="{"?r++:t[e]==="}"&&r--,e++;if(r>0)throw new Error(`Unclosed expression in template: ${t}`);let p=t.slice(a,e-1),o=Cn(p);s.push(o),g=e}else y+=u,g++}return y&&s.push({type:"literal",value:y}),{template:t,parts:s}}function Cn(t){if(!t.trim())throw new Error("Empty expression");let s=t[0],y=["+","#",".","/",";","?","&"],g,u=t;return y.includes(s)&&(g=s,u=t.slice(1)),{type:"expression",expressions:Vn(u).map(Mn),operator:g}}function Vn(t){let s=[],y="",g=0;for(;g=y.length)return{uri_index:s};let a=y[g];if(a.type==="literal")return t.slice(s).startsWith(a.value)?Bs(t,s+a.value.length,y,g+1,u):null;{let e=y[g+1],p=Un(t,s,e).sort((o,i)=>e&&e.type==="expression"&&!e.operator?i-o:o-i);for(let o of p){let i=t.slice(s,o),n={...u};if(Ln(i,a,n,t,s)){let m=Bs(t,o,y,g+1,n);if(m)return Object.assign(u,n),m}}return null}}function Un(t,s,y){let g=[];if(y&&y.type==="literal"){let u=s;for(;uu-a)}function Ln(t,s,y,g,u){if(s.type!=="expression")return!1;switch(s.operator){case"+":return Jn(t,s,y);case"#":return Fn(t,s,y);case".":return Wn(t,s,y);case"/":return Bn(t,s,y);case";":return Kn(t,s,y);case"?":case"&":return Yn(t,s,y);default:return Hn(t,s,y,g,u)}}function Fn(t,s,y){if(s.type!=="expression")return!1;if(!t.startsWith("#")){for(let u of s.expressions)y[u.name]="";return t===""}let g=t.slice(1);if(s.expressions.length===1){let u=s.expressions[0],a=g;return u.prefix&&a.length>u.prefix&&(a=a.slice(0,u.prefix)),y[u.name]=decodeURIComponent(a),!0}else{let u=g.split(",");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Jn(t,s,y){if(s.type!=="expression")return!1;if(s.expressions.length===1){let g=s.expressions[0],u=t;return g.prefix&&u.length>g.prefix&&(u=u.slice(0,g.prefix)),y[g.name]=decodeURIComponent(u),!0}else{let g=t.split(",");for(let u=0;ua.prefix&&(e=e.slice(0,a.prefix)),y[a.name]=decodeURIComponent(e)}return!0}}function Hn(t,s,y,g,u){if(s.type!=="expression")return!1;if(s.expressions.length===1){let a=s.expressions[0],e=t;return e.includes("/")||e===""&&u+t.length===g.length&&g.endsWith("/")?!1:(a.prefix&&e.length>a.prefix&&(e=e.slice(0,a.prefix)),y[a.name]=decodeURIComponent(e),!0)}else{let a=t.split(",");for(let e=0;er.prefix&&(p=p.slice(0,r.prefix)),y[r.name]=decodeURIComponent(p)}return!0}}function Wn(t,s,y){if(s.type!=="expression")return!1;if(t===""){for(let u of s.expressions)y[u.name]="";return!0}let g=t.startsWith(".")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let a=g.split(".");y[u.name]=a.map(e=>decodeURIComponent(e))}else y[u.name]=decodeURIComponent(g);return!0}else{let u=g.split(".");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Bn(t,s,y){if(s.type!=="expression")return!1;let g=t.startsWith("/")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];return y[u.name]=decodeURIComponent(g),!0}else{let u=g.split(",");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Kn(t,s,y){if(s.type!=="expression")return!1;let g=t.split(";").filter(u=>u);for(let u of g){let a=u.indexOf("=");if(a!==-1){let e=u.slice(0,a),r=u.slice(a+1),p=s.expressions.find(o=>o.name===e);p&&(y[p.name]=decodeURIComponent(r))}}return!0}function Yn(t,s,y){if(s.type!=="expression")return!1;let g=t.replace(/^[?&]/,"");if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let a=g.split("&");y[u.name]=a.map(e=>decodeURIComponent(e))}else{let a=g.split("&");for(let e of a){let r=e.indexOf("=");if(r!==-1){let p=e.slice(0,r),o=e.slice(r+1);p===u.name&&(y[u.name]=decodeURIComponent(o))}}}}else{let u=g.split("&");for(let a of u){let e=a.indexOf("=");if(e!==-1){let r=a.slice(0,e),p=a.slice(e+1),o=s.expressions.find(i=>i.name===r);o&&(y[o.name]=decodeURIComponent(p))}}}return!0}var Ie=class{constructor(){this.templates=[]}add(s){if(typeof s!="string")throw new Error("Template must be a string");if(s!==""&&s.trim()==="")throw new Error("Template cannot be empty");try{let y=Ks(s);this.templates.push(y)}catch(y){throw new Error(`Invalid template: ${s} - ${y instanceof Error?y.message:String(y)}`)}}match(s){if(typeof s!="string")throw new Error("URI must be a string");for(let y of this.templates){let g=Qi(s,y);if(g!==null)return{template:y.template,params:g}}return null}clear(){this.templates=[]}all(){return this.templates.map(s=>s.template)}};var Gi={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 2 (v0.8.0-rc.2; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var cs=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),M=new Map(cs.map((t,s)=>[t,s])),at="2025-11-25",Ys="2025-06-18",Ns=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),Gn=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function _s(t){return Ns.officialIdentifiers.includes(t)?"official":Ns.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function Qs(t){let s=t==="2020-12"?Ne:lt,y=new s({allErrors:!0,strict:!1});return _e(y),y}function mt(t){return[...t].sort((s,y)=>M.get(s)-M.get(y))}function $e(t,s,y){return mt(s?.protocolVersions??y??t.protocolVersions??[])}function Xi(t,s){let y=new Set(s);return t.filter(g=>y.has(g))}function Xn(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let y of Object.values(t.flows??{}))for(let g of Object.keys(y?.scopes??{}))s.add(g);return s}function io(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function oo(t){let s=[];function y(g){if(Array.isArray(g))return g.map(y);if(!g||typeof g!="object")return g;let u={};for(let[a,e]of Object.entries(g)){if(a==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[a]=y(e)}return u}return{schema:y(t),externalReferences:s}}function T(t,s,y,g){if(!Array.isArray(g))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:y,path:g}}function ea(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),y=s.split(".");if(y.length<2)return!1;let g=y[1].toLowerCase();return g==="modelcontextprotocol"||g==="mcp"}function ta(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let y=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?y.slice(0,-1).some(g=>["modelcontextprotocol","mcp"].includes(g.toLowerCase())):y.length>=2&&["modelcontextprotocol","mcp"].includes(y[1].toLowerCase())}function eo(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function ra(t,s,y){let g=mt(t.protocolVersions??[]),u=g.filter(r=>M.get(r)0;else return!1;return m?c||y.push(T("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...l,r])):y.push(T("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...l,r])),!0}function e(r,p,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[l,m]of Object.entries(r)){if(!Gn.test(l)){y.push(T("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(l)}`,[...n,l]));continue}for(let c of o.filter(d=>M.get(d)>=M.get(Ys)))a(l,m,p,c,i,n)||ta(l,c)&&y.push(T("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(l)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,l]))}}for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{let n=$e(t,o,g),l=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...l,"_meta"]),r==="tools")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.content??[]).forEach((h,P)=>{let $=`${f}.content[${P}]`,q=[...b,"content",P];e(h?._meta,"content",n,`${$}._meta`,[...q,"_meta"]),h?.type==="resource"&&e(h.resource?._meta,"content",n,`${$}.resource._meta`,[...q,"resource","_meta"])})}else if(r!=="prompts")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.contents??[]).forEach((h,P)=>{e(h?._meta,"content",n,`${f}.contents[${P}]._meta`,[...b,"contents",P,"_meta"])})}})}function sa(t,s,y){let g=new Set;if((t.tags??[]).forEach((u,a)=>{if(g.has(u.name)){y.push(T("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",a,"name"]));return}g.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((e,r)=>{(e.tags??[]).forEach((p,o)=>{g.has(p)||y.push(T("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(p)}`,[u,r,"tags",o]))})})}function ia(t,s,y){let g=t.securitySchemes??{},u=new Set(Object.keys(g)),a=new Map(Object.entries(g).map(([r,p])=>[r,Xn(p)]));function e(r,p,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[l,m]of Object.entries(i)){if(!u.has(l)){y.push(T("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(l)}`,[...o,n,l]));continue}let c=g[l];if(!Array.isArray(m))continue;if(m.filter((f,b)=>m.indexOf(f)!==b).length&&y.push(T("duplicate-security-scope","error",`${p}[${n}].${l} contains duplicate scope values`,[...o,n,l])),(c.type==="http"||c.type==="apiKey")&&m.length>0&&y.push(T("non-oauth-scope-misuse","error",`${p}[${n}].${l} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,l])),c.type==="oauth2"||c.type==="openIdConnect"){let f=a.get(l)??new Set;m.forEach((b,h)=>{f.has(b)||y.push(T("uncatalogued-oauth-scope","warning",`${p}[${n}].${l} references scope ${JSON.stringify(b)} that is not present in the declared static scope catalogue`,[...o,n,l,h]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,p)=>{e(r.security,`transports[${p}].security`,["transports",p,"security"])});for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function oa(t,s,y){let g=mt(t.protocolVersions??[]),u=new Set;function a(r,p,o,i){let n=new Set(p);for(let l of r)n.has(l)||y.push(T("protocol-scope-outside-parent","error",`${o} includes protocol version ${l} outside its parent scope`,i))}(t.transports??[]).forEach((r,p)=>{let o=$e(t,r,g);a(o,g,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of g)u.has(r)||y.push(T("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,p)=>{let o=$e(t,r,g);a(o,g,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let r=0;r0&&y.push(T("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,p,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,l)=>{let m=n[o],c=$e(t,n,g);a(c,g,`${r}[${l}].protocolVersions`,[r,l,"protocolVersions"]),(n.elicitations??[]).forEach((f,b)=>{let h=$e(t,f,c);a(h,c,`${r}[${l}].elicitations[${b}].protocolVersions`,[r,l,"elicitations",b,"protocolVersions"])});let d=i.get(m)??[];for(let f of d){let b=Xi(c,f.scope);b.length>0&&y.push(T("primitive-scope-overlap","error",`${r}[${l}] with identifier ${JSON.stringify(m)} overlaps ${r}[${f.index}] for protocol versions ${b.join(", ")}`,[r,l,"protocolVersions"]))}d.push({index:l,scope:c}),i.set(m,d)})}}function na(t,s,y){let g=mt(t.protocolVersions??[]);function u(a,e,r,p){if(!a||typeof a!="object"||Array.isArray(a))return;e==="2025-06-18"&&Object.hasOwn(a,"$schema")&&y.push(T("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(a.properties??{}));(a.required??[]).forEach((i,n)=>{o.has(i)||y.push(T("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(a.properties??{})){let l=`${r}.properties[${JSON.stringify(i)}]`,m=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&y.push(T("elicitation-form-schema-version-mismatch","error",`${l} uses an enum form introduced after MCP ${e}`,m)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&y.push(T("elicitation-form-schema-version-mismatch","error",`${l}.default is not defined for this property type in MCP ${e}`,[...m,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&y.push(T("elicitation-form-enum-names-mismatch","error",`${l}.enumNames must contain one display name for every enum value`,[...m,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(d=>d.const):void 0;if(c&&!c.includes(n.default)&&y.push(T("elicitation-form-default-outside-enum","error",`${l}.default must be one of the declared enum values`,[...m,"default"])),n.type==="array"){let d=n.items?.enum??n.items?.anyOf?.map(f=>f.const);Array.isArray(d)&&n.default.some(f=>!d.includes(f))&&y.push(T("elicitation-form-default-outside-enum","error",`${l}.default contains a value outside the declared enum values`,[...m,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&y.push(T("elicitation-form-invalid-range","error",`${l}.minLength must not exceed maxLength`,[...m,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&y.push(T("elicitation-form-invalid-range","error",`${l}.minimum must not exceed maximum`,[...m,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&y.push(T("elicitation-form-invalid-range","error",`${l}.minItems must not exceed maxItems`,[...m,"minItems"]))}}}for(let[a,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,p)=>{let o=$e(t,r,g),i=new Set;(r.elicitations??[]).forEach((n,l)=>{let m=`${a}[${p}].elicitations[${l}]`,c=[a,p,"elicitations",l];i.has(n.name)&&y.push(T("duplicate-elicitation-name","error",`${m}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let d=$e(t,n,o);for(let f of d)M.get(f){let p=$e(t,e,g);if(e.type==="streamable-http")for(let o of p)M.get(o)>=M.get("2025-03-26")||y.push(T("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of p)M.get(o){let p=$e(t,e,g),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",p),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${r}]`,o,e,"_meta","2025-06-18",p),u(`tools[${r}]`,o,e,"annotations","2025-03-26",p),a(`tools[${r}]`,o,e,"execution","2025-11-25",p),u(`tools[${r}]`,o,e,"icons","2025-11-25",p)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((p,o)=>{let i=$e(t,p,g),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let l of i)M.get(l)>=M.get("2025-06-18")||y.push(T("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${l}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((l,m)=>{u(`${e}[${o}].arguments[${m}]`,[...n,"arguments",m],l,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let p=$e(t,e,g),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&y.push(T("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)M.get(i)y(i,`${u}.${o}[${n}]`,[...a,o,n],!1,!1));for(let o of pa){let i=g[o];Array.isArray(i)?i.forEach((n,l)=>y(n,`${u}.${o}[${l}]`,[...a,o,l],!1,!1)):y(i,`${u}.${o}`,[...a,o],!1,!1)}let p=g.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||y(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...a,"dependencies",o],!1,!1)}return y(t,"inputSchema",["inputSchema"],!0,!1),s}function ca(t,s,y,g,u){let a=fa(t.inputSchema);if(!a.length)return;for(let r of y)r!=="2026-07-28"&&u.push(T("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of a){let p=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(T("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(T("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(T("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(T("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function ya(t,s,y,g,u){if(Object.hasOwn(t,"properties")){let a=t.properties;if(!a||typeof a!="object"||Array.isArray(a))u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${at}`,[...y,"properties"]));else for(let[e,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)||u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${at}`,[...y,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(a=>typeof a!="string"))&&u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${at}`,[...y,"required"]))}function da(t,s,y){let g=mt(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{let e=$e(t,u,g);for(let r of["inputSchema","outputSchema"]){let p=u[r];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${a}].${r}`,i=["tools",a,r],n=e.some(m=>M.get(m)M.get(m)>=M.get(at));if(Object.hasOwn(p,"$schema"))for(let m of e)M.get(m)>=M.get(at)||y.push(T("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${m}; it requires ${at} or later`,[...i,"$schema"]));if(n&&ya(p,o,i,s,y),l){let m=io(p);if(!m)y.push(T("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Qs(m);try{if(c.validateSchema(p,!0))c.compile(p);else{let d=c.errors?.map(f=>`${f.instancePath||"/"} ${f.message}`).join("; ")??"unknown meta-schema error";y.push(T("invalid-tool-schema","error",`${o} is not valid JSON Schema ${m}: ${d}`,i))}}catch(d){let f=oo(p);try{if(!f.externalReferences.length)throw d;Qs(m).compile(f.schema);let b=[...new Set(f.externalReferences)].sort();y.push(T("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${b.map(h=>JSON.stringify(h)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(b){y.push(T("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${m}: ${b.message}`,i))}}}}if(r==="outputSchema"&&p.type!=="object")for(let m of e)m!=="2026-07-28"&&y.push(T("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${m}`,[...i,"type"]))}ca(u,a,e,s,y)})}function to(t,s,y,g,u,a){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){a.push(T("tool-example-schema-mismatch","error",`${y} must be an object`,g));return}for(let e of t.required??[])Object.hasOwn(s,e)||a.push(T("tool-example-schema-mismatch","error",`${y} is missing required property ${JSON.stringify(e)}`,[...g,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||a.push(T("tool-example-schema-mismatch","error",`${y} contains undeclared property ${JSON.stringify(e)}`,[...g,e]))}function ro(t,s,y,g,u,a){let e=io(t);if(!e)return;let r=oo(t);if(r.externalReferences.length){let p=[...new Set(r.externalReferences)].sort();a.push(T("incomplete-tool-example-validation","warning",`${y} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,g));return}try{let p=Qs(e).compile(t);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";a.push(T("tool-example-schema-mismatch","error",`${y} does not validate against its associated Tool schema: ${o}`,g))}}catch{}}function ha(t,s,y){let g=mt(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=$e(t,u,g),r=e.filter(o=>M.get(o)M.get(o)>=M.get(at));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${a}].examples[${JSON.stringify(o)}]`,l=["tools",a,"examples",o],m=i.result??{},c=[...l,"result"],d=m.isError!==!0;for(let f of["jsonrpc","id","error"])Object.hasOwn(m,f)&&y.push(T("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(f)}`,[...c,f]));for(let f of["task","inputRequests","requestState"])Object.hasOwn(m,f)&&y.push(T("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(f)}`,[...c,f]));for(let f of e){let b=`${n}.result`;f==="2026-07-28"&&m.resultType!=="complete"&&y.push(T("tool-example-result-version-mismatch","error",`${b}.resultType must be "complete" for MCP ${f}`,[...c,"resultType"])),f!=="2026-07-28"&&Object.hasOwn(m,"resultType")&&y.push(T("tool-example-result-version-mismatch","error",`${b}.resultType is not defined for MCP ${f}`,[...c,"resultType"])),Object.hasOwn(m,"structuredContent")&&M.get(f){let $=`${b}.content[${P}]`,q=[...c,"content",P];h.type==="audio"&&M.get(f){Object.hasOwn(r,"_meta")&&M.get(e){let n=`${g}.result.contents[${i}]`,l=[...u,"result","contents",i];if(o.uri===s&&(p=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(T("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...l,"mimeType"])),t.size!==void 0)){let m=typeof o.text=="string"?ua.encode(o.text).byteLength:typeof o.blob=="string"&&so(o.blob)?ga(o.blob):void 0;m!==void 0&&m!==t.size&&e.push(T("resource-example-size-mismatch","warning",`${n} contains ${m} raw bytes, which differs from the declared Resource size ${t.size}`,l))}typeof o.blob=="string"&&!so(o.blob)&&e.push(T("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...l,"blob"]))}),p||e.push(T("resource-example-requested-uri-not-returned","warning",`${g}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function Pa(t,s,y){let g=mt(t.protocolVersions??[]);for(let[u,a]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])a.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=$e(t,e,g),o;if(u==="resourceTemplates")try{o=new Ie,o.add(e.uriTemplate)}catch(i){o=void 0,y.push(T("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${u}[${r}].examples[${JSON.stringify(i)}]`,m=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let d=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof d=="string"&&o&&!o.match(d)&&y.push(T("resource-template-example-invalid-expansion","error",`${l}.uri ${JSON.stringify(d)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...m,"uri"])),ba(c,p,`${l}.result`,[...m,"result"],s,y),typeof d=="string"&&$a(e,d,c,l,m,s,y)}})}function Gs(t,s="document"){let y=[];return oa(t,s,y),ia(t,s,y),sa(t,s,y),aa(t,s,y),na(t,s,y),ra(t,s,y),da(t,s,y),ha(t,s,y),Pa(t,s,y),y.sort((g,u)=>g.code.localeCompare(u.code)||g.message.localeCompare(u.message)||JSON.stringify(g.path).localeCompare(JSON.stringify(u.path))),y}var ei="__interaction_example__",ri=new Ne({allErrors:!0,strict:!1});_e(ri);var po=new lt({allErrors:!0,strict:!1});_e(po);var no=ri.compile(Gi),lo=["tools","resources","resourceTemplates","prompts"],va=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],wa=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),se=new Map(cs.map((t,s)=>[t,s])),ja={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function U(t,s,y,g){return{code:t,severity:s,message:y,path:g}}function ka(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function ys(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function Xs(t,s,y,g){return{code:t,severity:"error",message:`${s}.${g.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${y}`,path:g}}function si(t,s="document"){let y=structuredClone(t),g=[],u=[],a=0;function e(p,o,i,n=[]){let l=/^#\/components\/([^/]+)\/([^/]+)$/.exec(p?.$componentRef??"");if(!l)return p;let[,m,c]=l;if(m!==o)return g.push(Xs("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${m}`,i)),{value:p};let d=`${m}/${c}`;if(n.includes(d))return g.push(Xs("component-reference-cycle",s,`forms a cycle through ${[...n,d].join(" -> ")}`,i)),{value:p};let f=t?.components?.[m]?.[c];return f===void 0?(g.push(Xs("missing-component-reference-target",s,`targets missing component ${JSON.stringify(p.$componentRef)}`,i)),{value:p}):(a+=1,ys(f)?e(f,o,i,[...n,d]):{value:structuredClone(f),targetPath:["components",m,c]})}function r(p,o,i,n=[]){let l=e(p,o,i,n);return l.targetPath&&u.push({referencePath:i,targetPath:l.targetPath}),l.value}for(let p of va)for(let[o,i]of Object.entries(t?.components?.[p]??{}))ys(i)&&(y.components[p][o]=r(i,p,["components",p,o],[`${p}/${o}`]));for(let[p,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let l=y[p][i];if(p==="tools")for(let c of["inputSchema","outputSchema"])ys(n[c])&&(l[c]=r(n[c],"schemas",[p,i,c]));let m=p==="tools"?"toolExamples":p==="resources"?"resourceExamples":p==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,d]of Object.entries(n.examples??{}))ys(d)&&(l.examples[c]=r(d,m,[p,i,"examples",c]))}for(let p of lo)for(let[o,i]of(t?.[p]??[]).entries())for(let[n,l]of(i.elicitations??[]).entries())ys(l.requestedSchema)&&(y[p][o].elicitations[n].requestedSchema=r(l.requestedSchema,"schemas",[p,o,"elicitations",n,"requestedSchema"]));return{document:y,diagnostics:g,substitutions:a,provenance:u}}function Oa(t,s){let y=s.instancePath?s.instancePath.slice(1).split("/").map(g=>g.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?y.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&y.push(s.params.additionalProperty),y.map(g=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(g)?Number(g):g)}function mo(t){return no(t)?[]:(no.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:Oa(t,s)}))}function ti(t){return Array.isArray(t)?t.map(ti):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[y])=>s.localeCompare(y)).map(([s,y])=>[s,ti(y)])):t}function ao(t){return JSON.stringify(ti(t))}function qa(t,s,y){if(!Array.isArray(t.path))return t;let g=["tools",0,"examples",ei];return g.every((a,e)=>t.path[e]===a)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(ei)}]`,`tools[${s}].interactionExamples[${JSON.stringify(y)}]`),path:["tools",s,"interactionExamples",y,...t.path.slice(g.length)]}:t}function xa(t,s,y,g,u){let a={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[ei]:{input:structuredClone(g.input),result:structuredClone(g.result)}}}]};return Gs(a).map(e=>qa(e,s,y)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function Aa(t,s,y,g,u){try{let a=ri.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(U("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{try{let a=po.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(U("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{}}}function Ea(t,s,y,g,u){let a=t.clientRequirements;if(!a||typeof a!="object"||Array.isArray(a))return;function e(r,p){u.push(U("interaction-example-client-requirements-contradiction","warning",`${y} ${r}`,p))}if(s.type==="roots"){Object.hasOwn(a,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...g,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(a,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...g,"type"]);return}let r=a.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...g,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...g,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(a,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...g,"type"]);return}let r=a.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...g,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...g,"request","mode"])}}function za(t){let s=[],y=t.protocolVersions??[];for(let[g,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let a=u.protocolVersions??y;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let p=`tools[${g}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",g,"interactionExamples",e];s.push(...xa(u,g,e,r,a));for(let[i,n]of(r.steps??[]).entries()){let l=`${p}.steps[${i}]`,m=[...o,"steps",i];if(Ea(u,n,l,m,s),n.type==="elicitation"){let c=n.request??{},d=n.response??{},f=typeof n.declaration=="string"?(u.elicitations??[]).find(b=>b.name===n.declaration):void 0;for(let b of a)se.get(b)[r.name,r]));for(let[r,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${g}].examples[${JSON.stringify(r)}]`,i=["prompts",g,"examples",r],n=p.result??{},l=[...i,"result"],m=p.arguments;if(m&&typeof m=="object"&&!Array.isArray(m))for(let[c]of Object.entries(m))e.has(c)||s.push(U("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,d]of e)d.required===!0&&!Object.hasOwn(m??{},c)&&s.push(U("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(U("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...l,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(U("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...l,c]));for(let c of a){let d=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(U("prompt-example-result-version-mismatch","error",`${d}.resultType must be "complete" for MCP ${c}`,[...l,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(U("prompt-example-result-version-mismatch","error",`${d}.resultType is not defined for MCP ${c}`,[...l,"resultType"])),Object.hasOwn(n,"_meta")&&se.get(c){let h=`${d}.messages[${b}].content`,P=[...l,"messages",b,"content"];_a(f.content??{},h,P,c,s)})}}}return s}function Ta(t){let s=new Ie;return s.add(t),new Set(s.templates.flatMap(y=>y.parts).filter(y=>y.type==="expression").flatMap(y=>y.expressions.map(g=>g.name)))}function Sa(t,s,y,g,u){let a=`${s}.result`,e=[...y,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(U("completion-example-json-rpc-envelope","error",`${a} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(U("incomplete-completion-example-result","error",`${a} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));g==="2026-07-28"&&t.resultType!=="complete"&&u.push(U("completion-example-result-version-mismatch","error",`${a}.resultType must be "complete" for MCP ${g}`,[...e,"resultType"])),g!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(U("completion-example-result-version-mismatch","error",`${a}.resultType is not defined for MCP ${g}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&se.get(g)i.name));else try{o=Ta(e.uriTemplate)}catch(i){s.push(U("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[g,a,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${p}.completionExamples[${JSON.stringify(i)}]`,m=[g,a,"completionExamples",i],c=n.argument?.name,d=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(U(g==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",g==="prompts"?`${l}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${l}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...m,"argument","name"])),d&&typeof d=="object"&&!Array.isArray(d))for(let b of Object.keys(d))o&&!o.has(b)&&s.push(U(g==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",g==="prompts"?`${l}.context.arguments contains undeclared Prompt argument ${JSON.stringify(b)}`:`${l}.context.arguments contains no RFC 6570 variable ${JSON.stringify(b)} from ${JSON.stringify(e.uriTemplate)}`,[...m,"context","arguments",b])),b===c&&s.push(U("completion-example-duplicate-target-context","error",`${l}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(b)}`,[...m,"context","arguments",b]));let f=n.result??{};for(let b of r){if(se.get(b)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function uo(t){let s=mo(t);return s.length?s:Da(t)}var ii="0.8.0-rc.2",Za="v0.8.0-rc.2",Ca="40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8";function Va(t){let s=uo(t);return{valid:!s.some(y=>y.severity==="error"),diagnostics:s}}var gi={};Pi(gi,{schemaSha256:()=>Ep,snapshotTag:()=>Ap,specification:()=>hi,supportedProtocolVersions:()=>ds,validate:()=>zp});var fo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 3 (v0.8.0-rc.3; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var ds=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),L=new Map(ds.map((t,s)=>[t,s])),pt="2025-11-25",ni="2025-06-18",ai=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),Ua=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function li(t){return ai.officialIdentifiers.includes(t)?"official":ai.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function pi(t){let s=t==="2020-12"?Ne:lt,y=new s({allErrors:!0,strict:!1});return _e(y),y}function ut(t){return[...t].sort((s,y)=>L.get(s)-L.get(y))}function Pe(t,s,y){return ut(s?.protocolVersions??y??t.protocolVersions??[])}function co(t,s){let y=new Set(s);return t.filter(g=>y.has(g))}function La(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let y of Object.values(t.flows??{}))for(let g of Object.keys(y?.scopes??{}))s.add(g);return s}function $o(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function Po(t){let s=[];function y(g){if(Array.isArray(g))return g.map(y);if(!g||typeof g!="object")return g;let u={};for(let[a,e]of Object.entries(g)){if(a==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[a]=y(e)}return u}return{schema:y(t),externalReferences:s}}function S(t,s,y,g){if(!Array.isArray(g))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:y,path:g}}function Fa(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),y=s.split(".");if(y.length<2)return!1;let g=y[1].toLowerCase();return g==="modelcontextprotocol"||g==="mcp"}function Ja(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let y=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?y.slice(0,-1).some(g=>["modelcontextprotocol","mcp"].includes(g.toLowerCase())):y.length>=2&&["modelcontextprotocol","mcp"].includes(y[1].toLowerCase())}function yo(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function Ha(t,s,y){let g=ut(t.protocolVersions??[]),u=g.filter(r=>L.get(r)0;else return!1;return m?c||y.push(S("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...l,r])):y.push(S("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...l,r])),!0}function e(r,p,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[l,m]of Object.entries(r)){if(!Ua.test(l)){y.push(S("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(l)}`,[...n,l]));continue}for(let c of o.filter(d=>L.get(d)>=L.get(ni)))a(l,m,p,c,i,n)||Ja(l,c)&&y.push(S("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(l)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,l]))}}for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{let n=Pe(t,o,g),l=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...l,"_meta"]),r==="tools")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.content??[]).forEach((h,P)=>{let $=`${f}.content[${P}]`,q=[...b,"content",P];e(h?._meta,"content",n,`${$}._meta`,[...q,"_meta"]),h?.type==="resource"&&e(h.resource?._meta,"content",n,`${$}.resource._meta`,[...q,"resource","_meta"])})}else if(r!=="prompts")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.contents??[]).forEach((h,P)=>{e(h?._meta,"content",n,`${f}.contents[${P}]._meta`,[...b,"contents",P,"_meta"])})}})}function Wa(t,s,y){let g=new Set;if((t.tags??[]).forEach((u,a)=>{if(g.has(u.name)){y.push(S("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",a,"name"]));return}g.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((e,r)=>{(e.tags??[]).forEach((p,o)=>{g.has(p)||y.push(S("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(p)}`,[u,r,"tags",o]))})})}function Ba(t,s,y){let g=t.securitySchemes??{},u=new Set(Object.keys(g)),a=new Map(Object.entries(g).map(([r,p])=>[r,La(p)]));function e(r,p,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[l,m]of Object.entries(i)){if(!u.has(l)){y.push(S("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(l)}`,[...o,n,l]));continue}let c=g[l];if(!Array.isArray(m))continue;if(m.filter((f,b)=>m.indexOf(f)!==b).length&&y.push(S("duplicate-security-scope","error",`${p}[${n}].${l} contains duplicate scope values`,[...o,n,l])),(c.type==="http"||c.type==="apiKey")&&m.length>0&&y.push(S("non-oauth-scope-misuse","error",`${p}[${n}].${l} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,l])),c.type==="oauth2"||c.type==="openIdConnect"){let f=a.get(l)??new Set;m.forEach((b,h)=>{f.has(b)||y.push(S("uncatalogued-oauth-scope","warning",`${p}[${n}].${l} references scope ${JSON.stringify(b)} that is not present in the declared static scope catalogue`,[...o,n,l,h]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,p)=>{e(r.security,`transports[${p}].security`,["transports",p,"security"])});for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function Ka(t,s,y){let g=ut(t.protocolVersions??[]),u=new Set;function a(r,p,o,i){let n=new Set(p);for(let l of r)n.has(l)||y.push(S("protocol-scope-outside-parent","error",`${o} includes protocol version ${l} outside its parent scope`,i))}(t.transports??[]).forEach((r,p)=>{let o=Pe(t,r,g);a(o,g,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of g)u.has(r)||y.push(S("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,p)=>{let o=Pe(t,r,g);a(o,g,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let r=0;r0&&y.push(S("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,p,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,l)=>{let m=n[o],c=Pe(t,n,g);a(c,g,`${r}[${l}].protocolVersions`,[r,l,"protocolVersions"]),(n.elicitations??[]).forEach((f,b)=>{let h=Pe(t,f,c);a(h,c,`${r}[${l}].elicitations[${b}].protocolVersions`,[r,l,"elicitations",b,"protocolVersions"])});let d=i.get(m)??[];for(let f of d){let b=co(c,f.scope);b.length>0&&y.push(S("primitive-scope-overlap","error",`${r}[${l}] with identifier ${JSON.stringify(m)} overlaps ${r}[${f.index}] for protocol versions ${b.join(", ")}`,[r,l,"protocolVersions"]))}d.push({index:l,scope:c}),i.set(m,d)})}}function Ya(t,s,y){let g=ut(t.protocolVersions??[]);function u(a,e,r,p){if(!a||typeof a!="object"||Array.isArray(a))return;e==="2025-06-18"&&Object.hasOwn(a,"$schema")&&y.push(S("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(a.properties??{}));(a.required??[]).forEach((i,n)=>{o.has(i)||y.push(S("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(a.properties??{})){let l=`${r}.properties[${JSON.stringify(i)}]`,m=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&y.push(S("elicitation-form-schema-version-mismatch","error",`${l} uses an enum form introduced after MCP ${e}`,m)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&y.push(S("elicitation-form-schema-version-mismatch","error",`${l}.default is not defined for this property type in MCP ${e}`,[...m,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&y.push(S("elicitation-form-enum-names-mismatch","error",`${l}.enumNames must contain one display name for every enum value`,[...m,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(d=>d.const):void 0;if(c&&!c.includes(n.default)&&y.push(S("elicitation-form-default-outside-enum","error",`${l}.default must be one of the declared enum values`,[...m,"default"])),n.type==="array"){let d=n.items?.enum??n.items?.anyOf?.map(f=>f.const);Array.isArray(d)&&n.default.some(f=>!d.includes(f))&&y.push(S("elicitation-form-default-outside-enum","error",`${l}.default contains a value outside the declared enum values`,[...m,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&y.push(S("elicitation-form-invalid-range","error",`${l}.minLength must not exceed maxLength`,[...m,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&y.push(S("elicitation-form-invalid-range","error",`${l}.minimum must not exceed maximum`,[...m,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&y.push(S("elicitation-form-invalid-range","error",`${l}.minItems must not exceed maxItems`,[...m,"minItems"]))}}}for(let[a,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,p)=>{let o=Pe(t,r,g),i=new Set;(r.elicitations??[]).forEach((n,l)=>{let m=`${a}[${p}].elicitations[${l}]`,c=[a,p,"elicitations",l];i.has(n.name)&&y.push(S("duplicate-elicitation-name","error",`${m}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let d=Pe(t,n,o);for(let f of d)L.get(f){let p=Pe(t,e,g);if(e.type==="streamable-http")for(let o of p)L.get(o)>=L.get("2025-03-26")||y.push(S("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of p)L.get(o){let p=Pe(t,e,g),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",p),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${r}]`,o,e,"_meta","2025-06-18",p),u(`tools[${r}]`,o,e,"annotations","2025-03-26",p),a(`tools[${r}]`,o,e,"execution","2025-11-25",p),u(`tools[${r}]`,o,e,"icons","2025-11-25",p)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((p,o)=>{let i=Pe(t,p,g),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let l of i)L.get(l)>=L.get("2025-06-18")||y.push(S("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${l}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((l,m)=>{u(`${e}[${o}].arguments[${m}]`,[...n,"arguments",m],l,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let p=Pe(t,e,g),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&y.push(S("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)L.get(i)y(i,`${u}.${o}[${n}]`,[...a,o,n],!1,!1));for(let o of Ga){let i=g[o];Array.isArray(i)?i.forEach((n,l)=>y(n,`${u}.${o}[${l}]`,[...a,o,l],!1,!1)):y(i,`${u}.${o}`,[...a,o],!1,!1)}let p=g.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||y(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...a,"dependencies",o],!1,!1)}return y(t,"inputSchema",["inputSchema"],!0,!1),s}function sp(t,s,y,g,u){let a=rp(t.inputSchema);if(!a.length)return;for(let r of y)r!=="2026-07-28"&&u.push(S("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of a){let p=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(S("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(S("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(S("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(S("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function ip(t,s,y,g,u){if(Object.hasOwn(t,"properties")){let a=t.properties;if(!a||typeof a!="object"||Array.isArray(a))u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${pt}`,[...y,"properties"]));else for(let[e,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)||u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${pt}`,[...y,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(a=>typeof a!="string"))&&u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${pt}`,[...y,"required"]))}function op(t,s,y){let g=ut(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{let e=Pe(t,u,g);for(let r of["inputSchema","outputSchema"]){let p=u[r];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${a}].${r}`,i=["tools",a,r],n=e.some(m=>L.get(m)L.get(m)>=L.get(pt));if(Object.hasOwn(p,"$schema"))for(let m of e)L.get(m)>=L.get(pt)||y.push(S("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${m}; it requires ${pt} or later`,[...i,"$schema"]));if(n&&ip(p,o,i,s,y),l){let m=$o(p);if(!m)y.push(S("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=pi(m);try{if(c.validateSchema(p,!0))c.compile(p);else{let d=c.errors?.map(f=>`${f.instancePath||"/"} ${f.message}`).join("; ")??"unknown meta-schema error";y.push(S("invalid-tool-schema","error",`${o} is not valid JSON Schema ${m}: ${d}`,i))}}catch(d){let f=Po(p);try{if(!f.externalReferences.length)throw d;pi(m).compile(f.schema);let b=[...new Set(f.externalReferences)].sort();y.push(S("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${b.map(h=>JSON.stringify(h)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(b){y.push(S("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${m}: ${b.message}`,i))}}}}if(r==="outputSchema"&&p.type!=="object")for(let m of e)m!=="2026-07-28"&&y.push(S("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${m}`,[...i,"type"]))}sp(u,a,e,s,y)})}function ho(t,s,y,g,u,a){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){a.push(S("tool-example-schema-mismatch","error",`${y} must be an object`,g));return}for(let e of t.required??[])Object.hasOwn(s,e)||a.push(S("tool-example-schema-mismatch","error",`${y} is missing required property ${JSON.stringify(e)}`,[...g,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||a.push(S("tool-example-schema-mismatch","error",`${y} contains undeclared property ${JSON.stringify(e)}`,[...g,e]))}function go(t,s,y,g,u,a){let e=$o(t);if(!e)return;let r=Po(t);if(r.externalReferences.length){let p=[...new Set(r.externalReferences)].sort();a.push(S("incomplete-tool-example-validation","warning",`${y} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,g));return}try{let p=pi(e).compile(t);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";a.push(S("tool-example-schema-mismatch","error",`${y} does not validate against its associated Tool schema: ${o}`,g))}}catch{}}function np(t,s,y){let g=ut(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=Pe(t,u,g),r=e.filter(o=>L.get(o)L.get(o)>=L.get(pt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${a}].examples[${JSON.stringify(o)}]`,l=["tools",a,"examples",o],m=i.result??{},c=[...l,"result"],d=m.isError!==!0;for(let f of["jsonrpc","id","error"])Object.hasOwn(m,f)&&y.push(S("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(f)}`,[...c,f]));for(let f of["task","inputRequests","requestState"])Object.hasOwn(m,f)&&y.push(S("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(f)}`,[...c,f]));for(let f of e){let b=`${n}.result`;f==="2026-07-28"&&m.resultType!=="complete"&&y.push(S("tool-example-result-version-mismatch","error",`${b}.resultType must be "complete" for MCP ${f}`,[...c,"resultType"])),f!=="2026-07-28"&&Object.hasOwn(m,"resultType")&&y.push(S("tool-example-result-version-mismatch","error",`${b}.resultType is not defined for MCP ${f}`,[...c,"resultType"])),Object.hasOwn(m,"structuredContent")&&L.get(f){let $=`${b}.content[${P}]`,q=[...c,"content",P];h.type==="audio"&&L.get(f){Object.hasOwn(r,"_meta")&&L.get(e){let n=`${g}.result.contents[${i}]`,l=[...u,"result","contents",i];if(o.uri===s&&(p=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(S("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...l,"mimeType"])),t.size!==void 0)){let m=typeof o.text=="string"?tp.encode(o.text).byteLength:typeof o.blob=="string"&&bo(o.blob)?ap(o.blob):void 0;m!==void 0&&m!==t.size&&e.push(S("resource-example-size-mismatch","warning",`${n} contains ${m} raw bytes, which differs from the declared Resource size ${t.size}`,l))}typeof o.blob=="string"&&!bo(o.blob)&&e.push(S("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...l,"blob"]))}),p||e.push(S("resource-example-requested-uri-not-returned","warning",`${g}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function mp(t,s,y){let g=ut(t.protocolVersions??[]);for(let[u,a]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])a.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=Pe(t,e,g),o;if(u==="resourceTemplates")try{o=new Ie,o.add(e.uriTemplate)}catch(i){o=void 0,y.push(S("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${u}[${r}].examples[${JSON.stringify(i)}]`,m=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let d=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof d=="string"&&o&&!o.match(d)&&y.push(S("resource-template-example-invalid-expansion","error",`${l}.uri ${JSON.stringify(d)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...m,"uri"])),pp(c,p,`${l}.result`,[...m,"result"],s,y),typeof d=="string"&&lp(e,d,c,l,m,s,y)}})}function mi(t,s="document"){let y=[];return Ka(t,s,y),Ba(t,s,y),Wa(t,s,y),Qa(t,s,y),Ya(t,s,y),Ha(t,s,y),op(t,s,y),np(t,s,y),mp(t,s,y),y.sort((g,u)=>g.code.localeCompare(u.code)||g.message.localeCompare(u.message)||JSON.stringify(g.path).localeCompare(JSON.stringify(u.path))),y}var fi="__interaction_example__",yi=new Ne({allErrors:!0,strict:!1});_e(yi);var jo=new lt({allErrors:!0,strict:!1});_e(jo);var vo=yi.compile(fo),ko=["tools","resources","resourceTemplates","prompts"],up=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],fp=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),ie=new Map(ds.map((t,s)=>[t,s])),cp={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function F(t,s,y,g){return{code:t,severity:s,message:y,path:g}}function yp(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function hs(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function ui(t,s,y,g){return{code:t,severity:"error",message:`${s}.${g.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${y}`,path:g}}function di(t,s="document"){let y=structuredClone(t),g=[],u=[],a=0;function e(p,o,i,n=[]){let l=/^#\/components\/([^/]+)\/([^/]+)$/.exec(p?.$componentRef??"");if(!l)return p;let[,m,c]=l;if(m!==o)return g.push(ui("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${m}`,i)),{value:p};let d=`${m}/${c}`;if(n.includes(d))return g.push(ui("component-reference-cycle",s,`forms a cycle through ${[...n,d].join(" -> ")}`,i)),{value:p};let f=t?.components?.[m]?.[c];return f===void 0?(g.push(ui("missing-component-reference-target",s,`targets missing component ${JSON.stringify(p.$componentRef)}`,i)),{value:p}):(a+=1,hs(f)?e(f,o,i,[...n,d]):{value:structuredClone(f),targetPath:["components",m,c]})}function r(p,o,i,n=[]){let l=e(p,o,i,n);return l.targetPath&&u.push({referencePath:i,targetPath:l.targetPath}),l.value}for(let p of up)for(let[o,i]of Object.entries(t?.components?.[p]??{}))hs(i)&&(y.components[p][o]=r(i,p,["components",p,o],[`${p}/${o}`]));for(let[p,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let l=y[p][i];if(p==="tools")for(let c of["inputSchema","outputSchema"])hs(n[c])&&(l[c]=r(n[c],"schemas",[p,i,c]));let m=p==="tools"?"toolExamples":p==="resources"?"resourceExamples":p==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,d]of Object.entries(n.examples??{}))hs(d)&&(l.examples[c]=r(d,m,[p,i,"examples",c]))}for(let p of ko)for(let[o,i]of(t?.[p]??[]).entries())for(let[n,l]of(i.elicitations??[]).entries())hs(l.requestedSchema)&&(y[p][o].elicitations[n].requestedSchema=r(l.requestedSchema,"schemas",[p,o,"elicitations",n,"requestedSchema"]));return{document:y,diagnostics:g,substitutions:a,provenance:u}}function dp(t,s){let y=s.instancePath?s.instancePath.slice(1).split("/").map(g=>g.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?y.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&y.push(s.params.additionalProperty),y.map(g=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(g)?Number(g):g)}function Oo(t){return vo(t)?[]:(vo.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:dp(t,s)}))}function ci(t){return Array.isArray(t)?t.map(ci):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[y])=>s.localeCompare(y)).map(([s,y])=>[s,ci(y)])):t}function wo(t){return JSON.stringify(ci(t))}function hp(t,s,y){if(!Array.isArray(t.path))return t;let g=["tools",0,"examples",fi];return g.every((a,e)=>t.path[e]===a)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(fi)}]`,`tools[${s}].interactionExamples[${JSON.stringify(y)}]`),path:["tools",s,"interactionExamples",y,...t.path.slice(g.length)]}:t}function gp(t,s,y,g,u){let a={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[fi]:{input:structuredClone(g.input),result:structuredClone(g.result)}}}]};return mi(a).map(e=>hp(e,s,y)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function bp(t,s,y,g,u){try{let a=yi.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(F("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{try{let a=jo.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(F("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{}}}function $p(t,s,y,g,u){let a=t.clientRequirements;if(!a||typeof a!="object"||Array.isArray(a))return;function e(r,p){u.push(F("interaction-example-client-requirements-contradiction","warning",`${y} ${r}`,p))}if(s.type==="roots"){Object.hasOwn(a,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...g,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(a,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...g,"type"]);return}let r=a.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...g,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...g,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(a,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...g,"type"]);return}let r=a.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...g,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...g,"request","mode"])}}function Pp(t){let s=[],y=t.protocolVersions??[];for(let[g,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let a=u.protocolVersions??y;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let p=`tools[${g}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",g,"interactionExamples",e];s.push(...gp(u,g,e,r,a));for(let[i,n]of(r.steps??[]).entries()){let l=`${p}.steps[${i}]`,m=[...o,"steps",i];if($p(u,n,l,m,s),n.type==="elicitation"){let c=n.request??{},d=n.response??{},f=typeof n.declaration=="string"?(u.elicitations??[]).find(b=>b.name===n.declaration):void 0;for(let b of a)ie.get(b)[r.name,r]));for(let[r,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${g}].examples[${JSON.stringify(r)}]`,i=["prompts",g,"examples",r],n=p.result??{},l=[...i,"result"],m=p.arguments;if(m&&typeof m=="object"&&!Array.isArray(m))for(let[c]of Object.entries(m))e.has(c)||s.push(F("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,d]of e)d.required===!0&&!Object.hasOwn(m??{},c)&&s.push(F("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(F("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...l,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(F("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...l,c]));for(let c of a){let d=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(F("prompt-example-result-version-mismatch","error",`${d}.resultType must be "complete" for MCP ${c}`,[...l,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(F("prompt-example-result-version-mismatch","error",`${d}.resultType is not defined for MCP ${c}`,[...l,"resultType"])),Object.hasOwn(n,"_meta")&&ie.get(c){let h=`${d}.messages[${b}].content`,P=[...l,"messages",b,"content"];wp(f.content??{},h,P,c,s)})}}}return s}function kp(t){let s=new Ie;return s.add(t),new Set(s.templates.flatMap(y=>y.parts).filter(y=>y.type==="expression").flatMap(y=>y.expressions.map(g=>g.name)))}function Op(t,s,y,g,u){let a=`${s}.result`,e=[...y,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(F("completion-example-json-rpc-envelope","error",`${a} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(F("incomplete-completion-example-result","error",`${a} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));g==="2026-07-28"&&t.resultType!=="complete"&&u.push(F("completion-example-result-version-mismatch","error",`${a}.resultType must be "complete" for MCP ${g}`,[...e,"resultType"])),g!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(F("completion-example-result-version-mismatch","error",`${a}.resultType is not defined for MCP ${g}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&ie.get(g)i.name));else try{o=kp(e.uriTemplate)}catch(i){s.push(F("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[g,a,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${p}.completionExamples[${JSON.stringify(i)}]`,m=[g,a,"completionExamples",i],c=n.argument?.name,d=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(F(g==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",g==="prompts"?`${l}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${l}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...m,"argument","name"])),d&&typeof d=="object"&&!Array.isArray(d))for(let b of Object.keys(d))o&&!o.has(b)&&s.push(F(g==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",g==="prompts"?`${l}.context.arguments contains undeclared Prompt argument ${JSON.stringify(b)}`:`${l}.context.arguments contains no RFC 6570 variable ${JSON.stringify(b)} from ${JSON.stringify(e.uriTemplate)}`,[...m,"context","arguments",b])),b===c&&s.push(F("completion-example-duplicate-target-context","error",`${l}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(b)}`,[...m,"context","arguments",b]));let f=n.result??{};for(let b of r){if(ie.get(b)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function qo(t){let s=Oo(t);return s.length?s:xp(t)}var hi="0.8.0-rc.3",Ap="v0.8.0-rc.3",Ep="a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4";function zp(t){let s=qo(t);return{valid:!s.some(y=>y.severity==="error"),diagnostics:s}}var ft=Object.freeze({[ii]:oi,[hi]:gi}),xo=Object.freeze({"0.8.0-rc.2":si,"0.8.0-rc.3":di}),Is=Object.freeze({"0.8.0-rc.2":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json","0.8.0-rc.3":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json"}),Tl=Object.freeze(Object.keys(ft)),Sl=Object.freeze(["0.8.0-rc.2"]),Rl=Object.freeze([...new Set(Object.values(ft).flatMap(t=>t.supportedProtocolVersions))]),Np=Object.freeze(Object.fromEntries(Object.entries(ft).map(([t,s])=>[t,Object.freeze({snapshotTag:s.snapshotTag,schemaUri:Is[t],schemaSha256:s.schemaSha256})]))),$i=new Map;for(let t of Object.values(ft)){let s=Is[t.specification],y=$i.get(s)??[];y.push(t.specification),$i.set(s,y)}function ps(t,s,y=[]){return{code:t,severity:"error",message:s,path:y}}function bi(t,s=[]){let y=ft[t];return{status:"resolved",specification:t,schemaUri:Is[t],provenance:Np[t],diagnostics:s}}function Dl(t,s={}){let y=s?.specification;if(y!==void 0&&(typeof y!="string"||!Object.hasOwn(ft,y)))return{status:"unresolved",diagnostics:[ps("unsupported-specification",`Unsupported MCP Description specification: ${String(y)}`)]};let g=t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$schema")?t.$schema:void 0;if(g===void 0)return y!==void 0?bi(y):{status:"unresolved",diagnostics:[ps("missing-snapshot-identity","An exact specification selector or recognized $schema identity is required",["$schema"])]};if(typeof g!="string")return{status:"unresolved",diagnostics:[ps("invalid-schema-identity","$schema must be a string to resolve an MCP Description specification",["$schema"])]};let u=$i.get(g)??[];return y!==void 0?Is[y]===g?bi(y):{status:"unresolved",diagnostics:[ps("contradictory-snapshot-identity",`$schema ${JSON.stringify(g)} does not identify specification ${JSON.stringify(y)}`,["$schema"])]}:u.length===1?bi(u[0]):u.length>1?{status:"unresolved",diagnostics:[ps("ambiguous-schema-identity",`$schema ${JSON.stringify(g)} is shared by ${u.join(", ")} and does not select one immutable snapshot`,["$schema"])]}:{status:"unresolved",diagnostics:[ps("unknown-schema-identity",`Unknown MCP Description $schema identity: ${JSON.stringify(g)}`,["$schema"])]}}function Zl(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(typeof s.specification!="string"||!Object.hasOwn(ft,s.specification))throw new RangeError(`Unsupported MCP Description specification: ${String(s.specification)}`);return ft[s.specification].validate(t)}function Cl(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(!Object.hasOwn(xo,s.specification))throw new RangeError(`Component reference resolution does not support specification: ${String(s.specification)}`);return xo[s.specification](t)}export{Sl as deprecatedSpecifications,Ns as mcpExtensionCatalogue,_s as mcpExtensionMaturity,Cl as resolveMcpDescriptionComponentReferences,Dl as resolveMcpDescriptionSpecification,Np as specificationProvenance,Rl as supportedProtocolVersions,Tl as supportedSpecifications,Zl as validateMcpDescription}; +var xo=Object.defineProperty;var Os=(t,s)=>()=>(s||t((s={exports:{}}).exports,s),s.exports),$i=(t,s)=>{for(var y in s)xo(t,y,{get:s[y],enumerable:!0})};var vi=Os((Ip,Pi)=>{"use strict";Pi.exports=function t(s,y){if(s===y)return!0;if(s&&y&&typeof s=="object"&&typeof y=="object"){if(s.constructor!==y.constructor)return!1;var g,u,a;if(Array.isArray(s)){if(g=s.length,g!=y.length)return!1;for(u=g;u--!==0;)if(!t(s[u],y[u]))return!1;return!0}if(s.constructor===RegExp)return s.source===y.source&&s.flags===y.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===y.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===y.toString();if(a=Object.keys(s),g=a.length,g!==Object.keys(y).length)return!1;for(u=g;u--!==0;)if(!Object.prototype.hasOwnProperty.call(y,a[u]))return!1;for(u=g;u--!==0;){var e=a[u];if(!t(s[e],y[e]))return!1}return!0}return s!==s&&y!==y}});var qs=Os(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});var wi=vi();wi.code='require("ajv/dist/runtime/equal").default';Zs.default=wi});var zi=Os(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.formatNames=Re.fastFormats=Re.fullFormats=void 0;function Se(t,s){return{validate:t,compare:s}}Re.fullFormats={date:Se(qi,Us),time:Se(Vs(!0),Ls),"date-time":Se(ji(!0),Ai),"iso-time":Se(Vs(),xi),"iso-date-time":Se(ji(),Ei),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:Io,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:Vo,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:To,int32:{type:"number",validate:Do},int64:{type:"number",validate:Zo},float:{type:"number",validate:Oi},double:{type:"number",validate:Oi},password:!0,binary:!0};Re.fastFormats={...Re.fullFormats,date:Se(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Us),time:Se(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ls),"date-time":Se(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ai),"iso-time":Se(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,xi),"iso-date-time":Se(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ei),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Re.formatNames=Object.keys(Re.fullFormats);function Ao(t){return t%4===0&&(t%100!==0||t%400===0)}var Eo=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,zo=[0,31,28,31,30,31,30,31,31,30,31,30,31];function qi(t){let s=Eo.exec(t);if(!s)return!1;let y=+s[1],g=+s[2],u=+s[3];return g>=1&&g<=12&&u>=1&&u<=(g===2&&Ao(y)?29:zo[g])}function Us(t,s){if(t&&s)return t>s?1:t23||i>59||t&&!r)return!1;if(u<=23&&a<=59&&e<60)return!0;let n=a-i*p,l=u-o*p-(n<0?1:0);return(l===23||l===-1)&&(n===59||n===-1)&&e<61}}function Ls(t,s){if(!(t&&s))return;let y=new Date("2020-01-01T"+t).valueOf(),g=new Date("2020-01-01T"+s).valueOf();if(y&&g)return y-g}function xi(t,s){if(!(t&&s))return;let y=Cs.exec(t),g=Cs.exec(s);if(y&&g)return t=y[1]+y[2]+y[3],s=g[1]+g[2]+g[3],t>s?1:t=So}function Zo(t){return Number.isInteger(t)}function Oi(){return!0}var Co=/[^\\]\\Z/;function Vo(t){if(Co.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var _i=Os(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});function Ni(t){let s=t.length,y=0,g=0,u;for(;g=55296&&u<=56319&&gZa,snapshotTag:()=>Da,specification:()=>ii,supportedProtocolVersions:()=>cs,validate:()=>Ca});import{Validator as In}from"@cfworker/json-schema";var Mo=xs,Uo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"urn:mcpdesc:standalone:0.8.0-rc.3",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 3 (v0.8.0-rc.3; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}},fe=Object.prototype.hasOwnProperty,E=new RegExp("^x-","u"),Lo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"};var Es=new RegExp("^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$","u");var ht={validate:z};function z(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=z.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t))for(let b in t)ht.validate(t[b],{instancePath:s+"/"+b.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:b,rootData:u,dynamicAnchors:a})||(e=e===null?ht.validate.errors:e.concat(ht.validate.errors),r=e.length);else{let b={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[b]:e.push(b),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(Array.isArray(t)){let b=t.length;for(let h=0;h1){e:for(;i--;)for(n=i;n--;)if(Mi(t[i],t[n])){let l={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[l]:e.push(l),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return Y.errors=e,r===0}Y.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function vt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.subscribe!==void 0&&typeof t.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return vt.errors=e,r===0}vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function wt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return wt.errors=e,r===0}wt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function jt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=jt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(fe.call(Lo.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.completions!==void 0){let i=t.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.experimental!==void 0){let i=t.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.extensions!==void 0){let i=t.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),r++}for(let n in i){let l=r;if(typeof n=="string"&&!Es.test(n)){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}for(let n in i){let l=i[n];if(!(l&&typeof l=="object"&&!Array.isArray(l))){let m={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.logging!==void 0){let i=t.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.prompts!==void 0&&(Pt(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:a})||(e=e===null?Pt.errors:e.concat(Pt.errors),r=e.length)),t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.resources!==void 0&&(vt(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:a})||(e=e===null?vt.errors:e.concat(vt.errors),r=e.length)),t.tasks!==void 0){let i=t.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let l={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n)if(l!=="tools"){let m={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),r++}if(n.tools!==void 0){let l=n.tools;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let m in l)if(m!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(l.call!==void 0){let m=l.call;if(!(m&&typeof m=="object"&&!Array.isArray(m))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}}else{let m={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}t.tools!==void 0&&(wt(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:a})||(e=e===null?wt.errors:e.concat(wt.errors),r=e.length));for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return jt.errors=e,r===0}jt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var X=new RegExp("^[A-Za-z0-9._-]+$","u"),ae=new RegExp("^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$","u");var ee=new RegExp("^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$","u"),Jo={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Ii={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},bt={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};var B=zi().fullFormats.uri;function Me(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Me.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.text===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="mimeType"||h==="text"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var m=$===r;if(!m){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.text!==void 0&&typeof t.text!="string"){let h={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.blob===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="blob"||h==="mimeType"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var f=$===r;if(!f){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let h={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=d===r;if(b&&i?(i=!1,n=[n,1]):b&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Me.errors=e,p.props=c,r===0}Me.evaluated={dynamicProps:!0,dynamicItems:!1};var Ho={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function kt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=kt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.sizes!==void 0){let o=t.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.text!==void 0&&typeof t.text!="string"){let $={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="text"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.data===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[$]:e.push($),r++}if(t.mimeType===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="_meta"||$==="annotations"||$==="data"||$==="mimeType"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t._meta!==void 0){let $=t._meta;if($&&typeof $=="object"&&!Array.isArray($))for(let q in $){let w=r;if(typeof q=="string"&&!ee.test(q)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:q};e===null?e=[j]:e.push(j),r++}var f=w===r;if(!f){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:q},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.annotations!==void 0){let $=t.annotations;if($&&typeof $=="object"&&!Array.isArray($)){if($.audience!==void 0){let q=$.audience;if(Array.isArray(q)){let w=q.length;for(let j=0;j1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.data!==void 0&&typeof t.data!="string"){let $={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let $={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let $=t.type;if(!($==="image"||$==="audio")){let q={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Ii.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[q]:e.push(q),r++}}}else{let $={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=d===r;if(b&&i)i=!1,n=[n,1];else{b&&(i=!0,n=1,c!==!0&&(c=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.resource===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="_meta"||w==="annotations"||w==="resource"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let w=t._meta;if(w&&typeof w=="object"&&!Array.isArray(w))for(let j in w){let v=r;if(typeof j=="string"&&!ee.test(j)){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[k]:e.push(k),r++}var h=v===r;if(!h){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[k]:e.push(k),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.annotations!==void 0){let w=t.annotations;if(w&&typeof w=="object"&&!Array.isArray(w)){if(w.audience!==void 0){let j=w.audience;if(Array.isArray(j)){let v=j.length;for(let k=0;k1||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[v]:e.push(v),r++}if(j<0||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.resource!==void 0&&(Me(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:a})||(e=e===null?Me.errors:e.concat(Me.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let w={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[w]:e.push(w),r++}var b=$===r;if(b&&i)i=!1,n=[n,2];else{b&&(i=!0,n=2,c!==!0&&(c=!0));let w=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[v]:e.push(v),r++}if(t.uri===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[v]:e.push(v),r++}if(t.name===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!fe.call(Ii.oneOf[3].properties,v)){let k={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t._meta!==void 0){let v=t._meta;if(v&&typeof v=="object"&&!Array.isArray(v))for(let k in v){let O=r;if(typeof k=="string"&&!ee.test(k)){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:k};e===null?e=[x]:e.push(x),r++}var P=O===r;if(!P){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:k},message:"property name must be valid"};e===null?e=[x]:e.push(x),r++}}else{let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.annotations!==void 0){let v=t.annotations;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.audience!==void 0){let k=v.audience;if(Array.isArray(k)){let O=k.length;for(let x=0;x1||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[O]:e.push(O),r++}if(k<0||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[O]:e.push(O),r++}}}else{let k={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.description!==void 0&&typeof t.description!="string"){let v={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.icons!==void 0&&(me(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:a})||(e=e===null?me.errors:e.concat(me.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let v={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0&&typeof t.name!="string"){let v={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.size!==void 0&&typeof t.size!="number"){let v={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}if(t.title!==void 0&&typeof t.title!="string"){let v={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource_link"){let v={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}if(t.uri!==void 0){let v=t.uri;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}}else{let v={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}var b=w===r;b&&i?(i=!1,n=[n,3]):b&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return ye.errors=e,p.props=c,r===0}ye.evaluated={dynamicProps:!0,dynamicItems:!1};function Ot(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),r++}if(t.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0&&(ye(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?ye.errors:e.concat(ye.errors),r=e.length)),t.role!==void 0){let o=t.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:Jo.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ot.errors=e,r===0}Ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=qt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Le.errors=e,r===0}Le.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Fe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Fe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.result!==void 0&&(Le(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Le.errors:e.concat(Le.errors),r=e.length));for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Fe.errors=e,r===0}Fe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Je(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Je.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||o==="uri"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.result!==void 0&&(Le(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Le.errors:e.concat(Le.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Je.errors=e,r===0}Je.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function he(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=he.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let P={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(P!=="$componentRef"){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.$componentRef!==void 0){let P=t.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var h=l===r;if(h){i=!0,n=0;var m=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let P={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}let d=r,f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.$componentRef===void 0&&(P="$componentRef")){let $={};e===null?e=[$]:e.push($),r++}}var b=f===r;if(b){let P={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=d,e!==null&&(d?e.length=d:e=null);var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}return he.errors=e,p.props=m,r===0}he.evaluated={dynamicProps:!0,dynamicItems:!1};function He(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=He.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let m={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[m]:e.push(m),r++}let l=n.length;for(let m=0;m=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.minLength!==void 0){let h=t.minLength;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),r++}if(typeof h=="number"&&(h<0||isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0&&t.type!=="string"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="default"||h==="description"||h==="maximum"||h==="minimum"||h==="title"||h==="type")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.default!==void 0&&typeof t.default!="number"){let h={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let h={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let h={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0){let h=t.type;if(!(h==="number"||h==="integer")){let P={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Si.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="default"||$==="description"||$==="title"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let $={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.title!==void 0&&typeof t.title!="string"){let $={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="boolean"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.enum===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="default"||w==="description"||w==="enum"||w==="enumNames"||w==="title"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.default!==void 0&&typeof t.default!="string"){let w={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let w={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.enum!==void 0){let w=t.enum;if(Array.isArray(w)){let j=w.length;for(let v=0;v=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.minItems!==void 0){let O=t.minItems;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[x]:e.push(x),r++}if(typeof O=="number"&&(O<0||isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.title!==void 0&&typeof t.title!="string"){let O={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="array"){let O={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}var d=v===r;d&&i?(i=!1,n=[n,5]):d&&(i=!0,n=5,m!==!0&&(m=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Rt.errors=e,p.props=m,r===0}Rt.evaluated={dynamicProps:!0,dynamicItems:!1};function Ke(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ke.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.$schema!==void 0){let o=t.$schema;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.properties!==void 0){let o=t.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)Rt(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Rt.errors:e.concat(Rt.errors),r=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.required!==void 0){let o=t.required;if(Array.isArray(o)){let i=o.length;for(let m=0;m1){let m={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof m[c]=="number"){l=m[c];let d={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+n+" are identical)"};e===null?e=[d]:e.push(d),r++;break}m[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}if(t.type!==void 0&&t.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ke.errors=e,r===0}Ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ke(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ke.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r,m=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.url===void 0&&(v="url")){let k={};e===null?e=[k]:e.push(k),r++}}var d=c===r;if(d){let v={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=m,e!==null&&(m?e.length=m:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let v={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[v]:e.push(v),r++}if(t.mode!==void 0&&t.mode!=="form"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}}var q=l===r;if(q){i=!0,n=0;var f={};f.mode=!0}let b=r,h=r,P=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.requestedSchema===void 0&&(v="requestedSchema")){let k={};e===null?e=[k]:e.push(k),r++}}var $=P===r;if($){let v={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=h,e!==null&&(h?e.length=h:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}var q=b===r;if(q&&i?(i=!1,n=[n,1]):q&&(i=!0,n=1,f!==!0&&(f=f||{},f.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let v={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[v]:e.push(v),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}if(t.mode===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[v]:e.push(v),r++}if(t.message===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!(fe.call(Ti.properties,v)||E.test(v))){let k={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t.message!==void 0){let v=t.message;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.mode!==void 0){let v=t.mode;if(!(v==="form"||v==="url")){let k={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:Ti.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[k]:e.push(k),r++}}if(t.name!==void 0){let v=t.name;if(typeof v=="string"){if(!X.test(v)){let k={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onCancel!==void 0){let v=t.onCancel;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onDecline!==void 0){let v=t.onDecline;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.requestedSchema!==void 0){let v=t.requestedSchema,k=r,O=!1,x=null,I=r;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.$componentRef===void 0){let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[A]:e.push(A),r++}for(let A in v)if(A!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(v.$componentRef!==void 0){let A=v.$componentRef;if(typeof A=="string"){if(!ae.test(A)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),r++}var j=I===r;if(j){O=!0,x=0;var w=!0}let Z=r;Ke(v,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length);var j=Z===r;if(j&&O?(O=!1,x=[x,1]):j&&(O=!0,x=1,w!==!0&&(w=!0)),O)r=k,e!==null&&(k?e.length=k:e=null);else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:x},message:"must match exactly one schema in oneOf"};e===null?e=[A]:e.push(A),r++}}if(t.url!==void 0){let v=t.url;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.when!==void 0){let v=t.when;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}for(let v in t)E.test(v)&&(z(t[v],{instancePath:s+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:v,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let v={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}return ke.errors=e,r===0}ke.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Ue(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Ue.errors:e.concat(Ue.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Dt.errors=e,r===0}Dt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function te(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=te.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let h={};for(;f--;){let P=c[f];if(typeof P=="string"){if(typeof h[P]=="number"){b=h[P];let $={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[$]:e.push($),r++;break}h[P]=f}}}}else{let d={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}}}else{let m={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return te.errors=e,r===0}te.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function Zt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Zt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(Ko.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Zt.errors=e,r===0}Zt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Yo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function Ct(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ct.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Je(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Je.errors:e.concat(Je.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Ct.errors=e,r===0}Ct.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Vt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(Yo.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(je(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.completionExamples!==void 0&&(Be(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:a})||(e=e===null?Be.errors:e.concat(Be.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Vt.errors=e,r===0}Vt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Qo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function Mt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Mt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Fe(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Fe.errors:e.concat(Fe.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Mt.errors=e,r===0}Mt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ut(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ut.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(Qo.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(je(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?je.errors:e.concat(je.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Ut.errors=e,r===0}Ut.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Go={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function ve(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ve.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.authorizationUrl!==void 0){let o=t.authorizationUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.refreshUrl!==void 0){let o=t.refreshUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.scopes!==void 0){let o=t.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.tokenUrl!==void 0){let o=t.tokenUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return ve.errors=e,r===0}ve.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Lt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let f={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[f]:e.push(f),r++}var d=n===r;i=i||d;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let f={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[f]:e.push(f),r++}var d=l===r;i=i||d;let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let f={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[f]:e.push(f),r++}var d=m===r;i=i||d;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let f={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(i=i||d,i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[f]:e.push(f),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let f in t)if(!(f==="authorizationCode"||f==="clientCredentials"||f==="implicit"||f==="password"||E.test(f))){let b={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.authorizationCode!==void 0){let f=t.authorizationCode;if(ve(f,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)){if(f.authorizationUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}if(f.tokenUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}}if(t.clientCredentials!==void 0){let f=t.clientCredentials;if(ve(f,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.implicit!==void 0){let f=t.implicit;if(ve(f,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.authorizationUrl===void 0){let b={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.password!==void 0){let f=t.password;if(ve(f,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:a})||(e=e===null?ve.errors:e.concat(ve.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}return Lt.errors=e,r===0}Lt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ft(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ft.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.scheme===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="bearerFormat"||f==="description"||f==="scheme"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let f={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let f={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.name===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[f]:e.push(f),r++}if(t.in===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="description"||f==="in"||f==="name"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.in!==void 0){let f=t.in;if(typeof f!="string"){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}if(!(f==="header"||f==="query"||f==="cookie")){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:Go.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}if(t.name!==void 0&&typeof t.name!="string"){let f={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="apiKey"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}if(t.flows===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="description"||h==="flows"||h==="type"||E.test(h))){let P={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.flows!==void 0&&(Lt(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:a})||(e=e===null?Lt.errors:e.concat(Lt.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}for(let h in t)E.test(h)&&(z(t[h],{instancePath:s+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:h,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let h={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=f===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="description"||$==="openIdConnectUrl"||$==="type"||E.test($))){let q={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl!==void 0){let $=t.openIdConnectUrl;if(typeof $=="string"){if(!B($)){let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),r++}}if(t.type!==void 0&&t.type!=="openIdConnect"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}for(let $ in t)E.test($)&&(z(t[$],{instancePath:s+"/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:$,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let $={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;d&&i?(i=!1,n=[n,3]):d&&(i=!0,n=3,m!==!0&&(m=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Ft.errors=e,p.props=m,r===0}Ft.evaluated={dynamicProps:!0,dynamicItems:!1};function Jt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Jt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!X.test(i)){let l={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[l]:e.push(l),r++}var o=n===r;if(!o){let l={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let i in t)Ft(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Ft.errors:e.concat(Ft.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Jt.errors=e,r===0}Jt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ht(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ht.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="description"||o==="name"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0){let o=t.name;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ht.errors=e,r===0}Ht.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Xo={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var en={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Wt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Wt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;We(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?We.errors:e.concat(We.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Wt.errors=e,r===0}Wt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Bt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Bt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}t.requestedSchema!==void 0&&(Ke(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?Ke.errors:e.concat(Ke.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Bt.errors=e,r===0}Bt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Kt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Kt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Bt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Bt.errors:e.concat(Bt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[f]:e.push(f),r++}if(t.message===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="message"||f==="mode"||f==="url")){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.message!==void 0){let f=t.message;if(typeof f=="string"){if(oe(f)<1){let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}if(t.mode!==void 0&&t.mode!=="url"){let f={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Kt.errors=e,p.props=m,r===0}Kt.evaluated={dynamicProps:!0,dynamicItems:!1};var tn={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Yt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Yt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)z(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Yt.errors=e,r===0}Yt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qt.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Yt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Yt.errors:e.concat(Yt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(f!=="action"){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.action!==void 0){let f=t.action;if(!(f==="decline"||f==="cancel")){let b={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:tn.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Qt.errors=e,p.props=m,r===0}Qt.evaluated={dynamicProps:!0,dynamicItems:!1};function Gt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Gt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!X.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.request!==void 0&&(Kt(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:a})||(e=e===null?Kt.errors:e.concat(Kt.errors),r=e.length)),t.response!==void 0&&(Qt(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?Qt.errors:e.concat(Qt.errors),r=e.length)),t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Gt.errors=e,r===0}Gt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Ri={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},rn={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},sn={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Xt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Xt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Xt.errors=e,r===0}Xt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function er(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=er.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.content!==void 0){let i=t.content,n=r,l=!1,m=null,c=r;ye(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?ye.errors:e.concat(ye.errors),r=e.length);var o=c===r;o&&(l=!0,m=0);let d=r;if(Array.isArray(i)){if(i.length<1){let b={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[b]:e.push(b),r++}let f=i.length;for(let b=0;b1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.hints!==void 0){let o=t.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return rr.errors=e,r===0}rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function sr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=sr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!he(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:a}))e=e===null?he.errors:e.concat(he.errors),r=e.length;else var o=he.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(oe(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(z(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return sr.errors=e,r===0}sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ir(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ir.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!fe.call(Ri.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.includeContext!==void 0){let o=t.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:Ri.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}if(t.maxTokens!==void 0){let o=t.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),r++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.response!==void 0&&(ar(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?ar.errors:e.concat(ar.errors),r=e.length)),t.type!==void 0&&t.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(z(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return pr.errors=e,r===0}pr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function lr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=lr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Gt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Gt.errors:e.concat(Gt.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;nr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?nr.errors:e.concat(nr.errors),r=e.length);var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;pr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?pr.errors:e.concat(pr.errors),r=e.length);var d=f===r;d&&i?(i=!1,n=[n,2]):d&&(i=!0,n=2,m!==!0&&(m=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return lr.errors=e,p.props=m,r===0}lr.evaluated={dynamicProps:!0,dynamicItems:!1};function mr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=mr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="result"||o==="steps"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)z(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.result!==void 0&&(He(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?He.errors:e.concat(He.errors),r=e.length)),t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let b={};for(;d--;){let h=m[d];if(typeof h=="string"){if(typeof b[h]=="number"){f=b[h];let P={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:d,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+d+" are identical)"};e===null?e=[P]:e.push(P),r++;break}b[h]=d}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.title!==void 0&&typeof t.title!="string"){let m={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}for(let m in t)E.test(m)&&(z(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}return fr.errors=e,r===0}fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function cr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=cr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="protocolVersions"||f==="security"||f==="type"||f==="url"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.protocolVersions!==void 0&&(Y(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Y.errors:e.concat(Y.errors),r=e.length)),t.security!==void 0&&(te(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:a})||(e=e===null?te.errors:e.concat(te.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(z(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?z.errors:e.concat(z.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.command===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="args"||f==="command"||f==="env"||f==="protocolVersions"||f==="security"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.args!==void 0){let f=t.args;if(Array.isArray(f)){let b=f.length;for(let h=0;h1){e:for(;i--;)for(n=i;n--;)if(Mi(t[i],t[n])){let l={instancePath:s,schemaPath:"#/uniqueItems",keyword:"uniqueItems",params:{i,j:n},message:"must NOT have duplicate items (items ## "+n+" and "+i+" are identical)"};e===null?e=[l]:e.push(l),r++;break e}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}return Q.errors=e,r===0}Q.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function dr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=dr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||o==="subscribe"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.subscribe!==void 0&&typeof t.subscribe!="boolean"){let o={instancePath:s+"/subscribe",schemaPath:"#/properties/subscribe/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return dr.errors=e,r===0}dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function hr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=hr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let o in t)if(!(o==="listChanged"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.listChanged!==void 0&&typeof t.listChanged!="boolean"){let o={instancePath:s+"/listChanged",schemaPath:"#/properties/listChanged/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return hr.errors=e,r===0}hr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function gr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=gr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){for(let i in t)if(!(fe.call(an.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.completions!==void 0){let i=t.completions;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/completions",schemaPath:"#/properties/completions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.experimental!==void 0){let i=t.experimental;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/experimental",schemaPath:"#/properties/experimental/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.extensions!==void 0){let i=t.extensions;if(i&&typeof i=="object"&&!Array.isArray(i)){if(Object.keys(i).length<1){let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[n]:e.push(n),r++}for(let n in i){let l=r;if(typeof n=="string"&&!Es.test(n)){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},message:'must match pattern "^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}for(let n in i){let l=i[n];if(!(l&&typeof l=="object"&&!Array.isArray(l))){let m={instancePath:s+"/extensions/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/extensionCapabilities/additionalProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let n={instancePath:s+"/extensions",schemaPath:"#/$defs/extensionCapabilities/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.logging!==void 0){let i=t.logging;if(!(i&&typeof i=="object"&&!Array.isArray(i))){let n={instancePath:s+"/logging",schemaPath:"#/properties/logging/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.prompts!==void 0&&(yr(t.prompts,{instancePath:s+"/prompts",parentData:t,parentDataProperty:"prompts",rootData:u,dynamicAnchors:a})||(e=e===null?yr.errors:e.concat(yr.errors),r=e.length)),t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.resources!==void 0&&(dr(t.resources,{instancePath:s+"/resources",parentData:t,parentDataProperty:"resources",rootData:u,dynamicAnchors:a})||(e=e===null?dr.errors:e.concat(dr.errors),r=e.length)),t.tasks!==void 0){let i=t.tasks;if(i&&typeof i=="object"&&!Array.isArray(i)){for(let n in i)if(!(n==="cancel"||n==="list"||n==="requests")){let l={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:n},message:"must NOT have additional properties"};e===null?e=[l]:e.push(l),r++}if(i.cancel!==void 0){let n=i.cancel;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/cancel",schemaPath:"#/properties/tasks/properties/cancel/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.list!==void 0){let n=i.list;if(!(n&&typeof n=="object"&&!Array.isArray(n))){let l={instancePath:s+"/tasks/list",schemaPath:"#/properties/tasks/properties/list/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}if(i.requests!==void 0){let n=i.requests;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n)if(l!=="tools"){let m={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};e===null?e=[m]:e.push(m),r++}if(n.tools!==void 0){let l=n.tools;if(l&&typeof l=="object"&&!Array.isArray(l)){for(let m in l)if(m!=="call"){let c={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:m},message:"must NOT have additional properties"};e===null?e=[c]:e.push(c),r++}if(l.call!==void 0){let m=l.call;if(!(m&&typeof m=="object"&&!Array.isArray(m))){let c={instancePath:s+"/tasks/requests/tools/call",schemaPath:"#/properties/tasks/properties/requests/properties/tools/properties/call/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[c]:e.push(c),r++}}}else{let m={instancePath:s+"/tasks/requests/tools",schemaPath:"#/properties/tasks/properties/requests/properties/tools/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let l={instancePath:s+"/tasks/requests",schemaPath:"#/properties/tasks/properties/requests/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/tasks",schemaPath:"#/properties/tasks/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}t.tools!==void 0&&(hr(t.tools,{instancePath:s+"/tools",parentData:t,parentDataProperty:"tools",rootData:u,dynamicAnchors:a})||(e=e===null?hr.errors:e.concat(hr.errors),r=e.length));for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return gr.errors=e,r===0}gr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var ln={additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},Di={oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},$t={additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"};function Qe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.text===void 0){let h={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"text"},message:"must have required property 'text'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="mimeType"||h==="text"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var m=$===r;if(!m){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/0/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.text!==void 0&&typeof t.text!="string"){let h={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/0/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[h]:e.push(h),r++}if(t.blob===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"blob"},message:"must have required property 'blob'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="_meta"||h==="blob"||h==="mimeType"||h==="uri")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t._meta!==void 0){let h=t._meta;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=r;if(typeof P=="string"&&!ee.test(P)){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:P};e===null?e=[q]:e.push(q),r++}var f=$===r;if(!f){let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:P},message:"property name must be valid"};e===null?e=[q]:e.push(q),r++}}else{let P={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.blob!==void 0&&typeof t.blob!="string"){let h={instancePath:s+"/blob",schemaPath:"#/oneOf/1/properties/blob/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let h={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.uri!==void 0){let h=t.uri;if(typeof h=="string"){if(!B(h)){let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/uri",schemaPath:"#/oneOf/1/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var b=d===r;if(b&&i?(i=!1,n=[n,1]):b&&(i=!0,n=1,c!==!0&&(c=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return Qe.errors=e,p.props=c,r===0}Qe.evaluated={dynamicProps:!0,dynamicItems:!1};var mn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"};function br(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=br.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.src===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"src"},message:"must have required property 'src'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="mimeType"||o==="sizes"||o==="src"||o==="theme"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let o={instancePath:s+"/mimeType",schemaPath:"#/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.sizes!==void 0){let o=t.sizes;if(Array.isArray(o)){let i=o.length;for(let n=0;n1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.text!==void 0&&typeof t.text!="string"){let $={instancePath:s+"/text",schemaPath:"#/oneOf/0/properties/text/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="text"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"text"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=l===r;if(b){i=!0,n=0;var c=!0}let d=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.data===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"data"},message:"must have required property 'data'"};e===null?e=[$]:e.push($),r++}if(t.mimeType===void 0){let $={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"mimeType"},message:"must have required property 'mimeType'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="_meta"||$==="annotations"||$==="data"||$==="mimeType"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t._meta!==void 0){let $=t._meta;if($&&typeof $=="object"&&!Array.isArray($))for(let q in $){let w=r;if(typeof q=="string"&&!ee.test(q)){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:q};e===null?e=[j]:e.push(j),r++}var f=w===r;if(!f){let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:q},message:"property name must be valid"};e===null?e=[j]:e.push(j),r++}}else{let q={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.annotations!==void 0){let $=t.annotations;if($&&typeof $=="object"&&!Array.isArray($)){if($.audience!==void 0){let q=$.audience;if(Array.isArray(q)){let w=q.length;for(let j=0;j1||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[w]:e.push(w),r++}if(q<0||isNaN(q)){let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[w]:e.push(w),r++}}}else{let q={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[q]:e.push(q),r++}}if(t.data!==void 0&&typeof t.data!="string"){let $={instancePath:s+"/data",schemaPath:"#/oneOf/1/properties/data/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.mimeType!==void 0&&typeof t.mimeType!="string"){let $={instancePath:s+"/mimeType",schemaPath:"#/oneOf/1/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0){let $=t.type;if(!($==="image"||$==="audio")){let q={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Di.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[q]:e.push(q),r++}}}else{let $={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var b=d===r;if(b&&i)i=!1,n=[n,1];else{b&&(i=!0,n=1,c!==!0&&(c=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.resource===void 0){let w={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"resource"},message:"must have required property 'resource'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="_meta"||w==="annotations"||w==="resource"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t._meta!==void 0){let w=t._meta;if(w&&typeof w=="object"&&!Array.isArray(w))for(let j in w){let v=r;if(typeof j=="string"&&!ee.test(j)){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:j};e===null?e=[k]:e.push(k),r++}var h=v===r;if(!h){let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:j},message:"property name must be valid"};e===null?e=[k]:e.push(k),r++}}else{let j={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.annotations!==void 0){let w=t.annotations;if(w&&typeof w=="object"&&!Array.isArray(w)){if(w.audience!==void 0){let j=w.audience;if(Array.isArray(j)){let v=j.length;for(let k=0;k1||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[v]:e.push(v),r++}if(j<0||isNaN(j)){let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[v]:e.push(v),r++}}else{let v={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}}}else{let j={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[j]:e.push(j),r++}}if(t.resource!==void 0&&(Qe(t.resource,{instancePath:s+"/resource",parentData:t,parentDataProperty:"resource",rootData:u,dynamicAnchors:a})||(e=e===null?Qe.errors:e.concat(Qe.errors),r=e.length)),t.type!==void 0&&t.type!=="resource"){let w={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"resource"},message:"must be equal to constant"};e===null?e=[w]:e.push(w),r++}}else{let w={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[w]:e.push(w),r++}var b=$===r;if(b&&i)i=!1,n=[n,2];else{b&&(i=!0,n=2,c!==!0&&(c=!0));let w=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[v]:e.push(v),r++}if(t.uri===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[v]:e.push(v),r++}if(t.name===void 0){let v={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!fe.call(Di.oneOf[3].properties,v)){let k={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t._meta!==void 0){let v=t._meta;if(v&&typeof v=="object"&&!Array.isArray(v))for(let k in v){let O=r;if(typeof k=="string"&&!ee.test(k)){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:k};e===null?e=[x]:e.push(x),r++}var P=O===r;if(!P){let x={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:k},message:"property name must be valid"};e===null?e=[x]:e.push(x),r++}}else{let k={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.annotations!==void 0){let v=t.annotations;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.audience!==void 0){let k=v.audience;if(Array.isArray(k)){let O=k.length;for(let x=0;x1||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[O]:e.push(O),r++}if(k<0||isNaN(k)){let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[O]:e.push(O),r++}}}else{let k={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[k]:e.push(k),r++}}if(t.description!==void 0&&typeof t.description!="string"){let v={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.icons!==void 0&&(ue(t.icons,{instancePath:s+"/icons",parentData:t,parentDataProperty:"icons",rootData:u,dynamicAnchors:a})||(e=e===null?ue.errors:e.concat(ue.errors),r=e.length)),t.mimeType!==void 0&&typeof t.mimeType!="string"){let v={instancePath:s+"/mimeType",schemaPath:"#/oneOf/3/properties/mimeType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.name!==void 0&&typeof t.name!="string"){let v={instancePath:s+"/name",schemaPath:"#/oneOf/3/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.size!==void 0&&typeof t.size!="number"){let v={instancePath:s+"/size",schemaPath:"#/oneOf/3/properties/size/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[v]:e.push(v),r++}if(t.title!==void 0&&typeof t.title!="string"){let v={instancePath:s+"/title",schemaPath:"#/oneOf/3/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[v]:e.push(v),r++}if(t.type!==void 0&&t.type!=="resource_link"){let v={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"resource_link"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}if(t.uri!==void 0){let v=t.uri;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/uri",schemaPath:"#/oneOf/3/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}}else{let v={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}var b=w===r;b&&i?(i=!1,n=[n,3]):b&&(i=!0,n=3,c!==!0&&(c=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let $={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[$]:e.push($),r++}return de.errors=e,p.props=c,r===0}de.evaluated={dynamicProps:!0,dynamicItems:!1};function $r(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=$r.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.role===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"role"},message:"must have required property 'role'"};e===null?e=[o]:e.push(o),r++}if(t.content===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="content"||o==="role")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.content!==void 0&&(de(t.content,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?de.errors:e.concat(de.errors),r=e.length)),t.role!==void 0){let o=t.role;if(typeof o!="string"){let i={instancePath:s+"/role",schemaPath:"#/properties/role/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(!(o==="user"||o==="assistant")){let i={instancePath:s+"/role",schemaPath:"#/properties/role/enum",keyword:"enum",params:{allowedValues:ln.properties.role.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return $r.errors=e,r===0}$r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Pr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Pr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.messages!==void 0){let i=t.messages;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/ttlMs",schemaPath:"#/properties/ttlMs/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Xe.errors=e,r===0}Xe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function et(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=et.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}t.result!==void 0&&(Xe(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length));for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return et.errors=e,r===0}et.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function tt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=tt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="result"||o==="uri"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.result!==void 0&&(Xe(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?Xe.errors:e.concat(Xe.errors),r=e.length)),t.uri!==void 0){let o=t.uri;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return tt.errors=e,r===0}tt.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ge(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ge.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.$componentRef===void 0){let P={instancePath:s,schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in t)if(P!=="$componentRef"){let $={instancePath:s,schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(t.$componentRef!==void 0){let P=t.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s,schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var h=l===r;if(h){i=!0,n=0;var m=!0}let c=r;if(!(t&&typeof t=="object"&&!Array.isArray(t))){let P={instancePath:s,schemaPath:"#/$defs/jsonSchemaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}let d=r,f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let P;if(t.$componentRef===void 0&&(P="$componentRef")){let $={};e===null?e=[$]:e.push($),r++}}var b=f===r;if(b){let P={instancePath:s,schemaPath:"#/oneOf/1/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[P]:e.push(P),r++}else r=d,e!==null&&(d?e.length=d:e=null);var h=c===r;if(h&&i?(i=!1,n=[n,1]):h&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let P={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}return ge.errors=e,p.props=m,r===0}ge.evaluated={dynamicProps:!0,dynamicItems:!1};function rt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=rt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.content!==void 0){let i=t.content;if(Array.isArray(i)){let n=i.length;for(let l=0;l=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}if(i.values!==void 0){let n=i.values;if(Array.isArray(n)){if(n.length>100){let m={instancePath:s+"/completion/values",schemaPath:"#/$defs/completionResult/properties/values/maxItems",keyword:"maxItems",params:{limit:100},message:"must NOT have more than 100 items"};e===null?e=[m]:e.push(m),r++}let l=n.length;for(let m=0;m=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.minLength!==void 0){let h=t.minLength;if(!(typeof h=="number"&&!(h%1)&&!isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[P]:e.push(P),r++}if(typeof h=="number"&&(h<0||isNaN(h))){let P={instancePath:s+"/minLength",schemaPath:"#/oneOf/0/properties/minLength/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[P]:e.push(P),r++}}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/0/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0&&t.type!=="string"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"string"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}}else{let h={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="default"||h==="description"||h==="maximum"||h==="minimum"||h==="title"||h==="type")){let P={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.default!==void 0&&typeof t.default!="number"){let h={instancePath:s+"/default",schemaPath:"#/oneOf/1/properties/default/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.maximum!==void 0&&typeof t.maximum!="number"){let h={instancePath:s+"/maximum",schemaPath:"#/oneOf/1/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let h={instancePath:s+"/minimum",schemaPath:"#/oneOf/1/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[h]:e.push(h),r++}if(t.title!==void 0&&typeof t.title!="string"){let h={instancePath:s+"/title",schemaPath:"#/oneOf/1/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.type!==void 0){let h=t.type;if(!(h==="number"||h==="integer")){let P={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/enum",keyword:"enum",params:{allowedValues:Ci.oneOf[1].properties.type.enum},message:"must be equal to one of the allowed values"};e===null?e=[P]:e.push(P),r++}}}else{let h={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="default"||$==="description"||$==="title"||$==="type")){let q={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.default!==void 0&&typeof t.default!="boolean"){let $={instancePath:s+"/default",schemaPath:"#/oneOf/2/properties/default/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[$]:e.push($),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.title!==void 0&&typeof t.title!="string"){let $={instancePath:s+"/title",schemaPath:"#/oneOf/2/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.type!==void 0&&t.type!=="boolean"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"boolean"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let $=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[w]:e.push(w),r++}if(t.enum===void 0){let w={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"enum"},message:"must have required property 'enum'"};e===null?e=[w]:e.push(w),r++}for(let w in t)if(!(w==="default"||w==="description"||w==="enum"||w==="enumNames"||w==="title"||w==="type")){let j={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:w},message:"must NOT have additional properties"};e===null?e=[j]:e.push(j),r++}if(t.default!==void 0&&typeof t.default!="string"){let w={instancePath:s+"/default",schemaPath:"#/oneOf/3/properties/default/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.description!==void 0&&typeof t.description!="string"){let w={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[w]:e.push(w),r++}if(t.enum!==void 0){let w=t.enum;if(Array.isArray(w)){let j=w.length;for(let v=0;v=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.minItems!==void 0){let O=t.minItems;if(!(typeof O=="number"&&!(O%1)&&!isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[x]:e.push(x),r++}if(typeof O=="number"&&(O<0||isNaN(O))){let x={instancePath:s+"/minItems",schemaPath:"#/oneOf/5/properties/minItems/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[x]:e.push(x),r++}}if(t.title!==void 0&&typeof t.title!="string"){let O={instancePath:s+"/title",schemaPath:"#/oneOf/5/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[O]:e.push(O),r++}if(t.type!==void 0&&t.type!=="array"){let O={instancePath:s+"/type",schemaPath:"#/oneOf/5/properties/type/const",keyword:"const",params:{allowedValue:"array"},message:"must be equal to constant"};e===null?e=[O]:e.push(O),r++}}else{let O={instancePath:s,schemaPath:"#/oneOf/5/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[O]:e.push(O),r++}var d=v===r;d&&i?(i=!1,n=[n,5]):d&&(i=!0,n=5,m!==!0&&(m=!0))}}}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let h={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[h]:e.push(h),r++}return zr.errors=e,p.props=m,r===0}zr.evaluated={dynamicProps:!0,dynamicItems:!1};function ot(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ot.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.properties===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"properties"},message:"must have required property 'properties'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="$schema"||o==="properties"||o==="required"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.$schema!==void 0){let o=t.$schema;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/$schema",schemaPath:"#/properties/%24schema/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.properties!==void 0){let o=t.properties;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)zr(o[i],{instancePath:s+"/properties/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?zr.errors:e.concat(zr.errors),r=e.length);else{let i={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.required!==void 0){let o=t.required;if(Array.isArray(o)){let i=o.length;for(let m=0;m1){let m={};for(;n--;){let c=o[n];if(typeof c=="string"){if(typeof m[c]=="number"){l=m[c];let d={instancePath:s+"/required",schemaPath:"#/properties/required/uniqueItems",keyword:"uniqueItems",params:{i:n,j:l},message:"must NOT have duplicate items (items ## "+l+" and "+n+" are identical)"};e===null?e=[d]:e.push(d),r++;break}m[c]=n}}}}else{let i={instancePath:s+"/required",schemaPath:"#/properties/required/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}}if(t.type!==void 0&&t.type!=="object"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return ot.errors=e,r===0}ot.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function qe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=qe.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r,m=r,c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.url===void 0&&(v="url")){let k={};e===null?e=[k]:e.push(k),r++}}var d=c===r;if(d){let v={instancePath:s,schemaPath:"#/oneOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=m,e!==null&&(m?e.length=m:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.requestedSchema===void 0){let v={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[v]:e.push(v),r++}if(t.mode!==void 0&&t.mode!=="form"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/0/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}}var q=l===r;if(q){i=!0,n=0;var f={};f.mode=!0}let b=r,h=r,P=r;if(t&&typeof t=="object"&&!Array.isArray(t)){let v;if(t.requestedSchema===void 0&&(v="requestedSchema")){let k={};e===null?e=[k]:e.push(k),r++}}var $=P===r;if($){let v={instancePath:s,schemaPath:"#/oneOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};e===null?e=[v]:e.push(v),r++}else r=h,e!==null&&(h?e.length=h:e=null);if(t&&typeof t=="object"&&!Array.isArray(t)&&t.mode!==void 0&&t.mode!=="url"){let v={instancePath:s+"/mode",schemaPath:"#/oneOf/1/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[v]:e.push(v),r++}var q=b===r;if(q&&i?(i=!1,n=[n,1]):q&&(i=!0,n=1,f!==!0&&(f=f||{},f.mode=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let v={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[v]:e.push(v),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[v]:e.push(v),r++}if(t.mode===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[v]:e.push(v),r++}if(t.message===void 0){let v={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[v]:e.push(v),r++}for(let v in t)if(!(fe.call(Zi.properties,v)||E.test(v))){let k={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:v},message:"must NOT have additional properties"};e===null?e=[k]:e.push(k),r++}if(t.message!==void 0){let v=t.message;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.mode!==void 0){let v=t.mode;if(!(v==="form"||v==="url")){let k={instancePath:s+"/mode",schemaPath:"#/properties/mode/enum",keyword:"enum",params:{allowedValues:Zi.properties.mode.enum},message:"must be equal to one of the allowed values"};e===null?e=[k]:e.push(k),r++}}if(t.name!==void 0){let v=t.name;if(typeof v=="string"){if(!X.test(v)){let k={instancePath:s+"/name",schemaPath:"#/properties/name/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onCancel!==void 0){let v=t.onCancel;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onCancel",schemaPath:"#/properties/onCancel/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.onDecline!==void 0){let v=t.onDecline;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/onDecline",schemaPath:"#/properties/onDecline/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.requestedSchema!==void 0){let v=t.requestedSchema,k=r,O=!1,x=null,I=r;if(v&&typeof v=="object"&&!Array.isArray(v)){if(v.$componentRef===void 0){let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[A]:e.push(A),r++}for(let A in v)if(A!=="$componentRef"){let _={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:A},message:"must NOT have additional properties"};e===null?e=[_]:e.push(_),r++}if(v.$componentRef!==void 0){let A=v.$componentRef;if(typeof A=="string"){if(!ae.test(A)){let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[_]:e.push(_),r++}}else{let _={instancePath:s+"/requestedSchema/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[_]:e.push(_),r++}}}else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[A]:e.push(A),r++}var j=I===r;if(j){O=!0,x=0;var w=!0}let Z=r;ot(v,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length);var j=Z===r;if(j&&O?(O=!1,x=[x,1]):j&&(O=!0,x=1,w!==!0&&(w=!0)),O)r=k,e!==null&&(k?e.length=k:e=null);else{let A={instancePath:s+"/requestedSchema",schemaPath:"#/properties/requestedSchema/oneOf",keyword:"oneOf",params:{passingSchemas:x},message:"must match exactly one schema in oneOf"};e===null?e=[A]:e.push(A),r++}}if(t.url!==void 0){let v=t.url;if(typeof v=="string"){if(!B(v)){let k={instancePath:s+"/url",schemaPath:"#/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/url",schemaPath:"#/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}if(t.when!==void 0){let v=t.when;if(typeof v=="string"){if(oe(v)<1){let k={instancePath:s+"/when",schemaPath:"#/properties/when/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[k]:e.push(k),r++}}else{let k={instancePath:s+"/when",schemaPath:"#/properties/when/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[k]:e.push(k),r++}}for(let v in t)E.test(v)&&(N(t[v],{instancePath:s+"/"+v.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:v,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let v={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[v]:e.push(v),r++}return qe.errors=e,r===0}qe.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Nr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Nr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;Ge(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?Ge.errors:e.concat(Ge.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Nr.errors=e,r===0}Nr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function re(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=re.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){let i=t.length;for(let n=0;n1){let h={};for(;f--;){let P=c[f];if(typeof P=="string"){if(typeof h[P]=="number"){b=h[P];let $={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[$]:e.push($),r++;break}h[P]=f}}}}else{let d={instancePath:s+"/"+n+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/securityRequirement/additionalProperties/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}}}else{let m={instancePath:s+"/"+n,schemaPath:"#/$defs/securityRequirement/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}}}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}return re.errors=e,r===0}re.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function _r(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=_r.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(cn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.arguments!==void 0){let i=t.arguments;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/arguments",schemaPath:"#/properties/arguments/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return _r.errors=e,r===0}_r.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var yn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"};function Ir(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ir.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;tt(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?tt.errors:e.concat(tt.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Ir.errors=e,r===0}Ir.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Tr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Tr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uriTemplate===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uriTemplate"},message:"must have required property 'uriTemplate'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(yn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(Oe(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?Oe.errors:e.concat(Oe.errors),r=e.length)),t.completionExamples!==void 0&&(it(t.completionExamples,{instancePath:s+"/completionExamples",parentData:t,parentDataProperty:"completionExamples",rootData:u,dynamicAnchors:a})||(e=e===null?it.errors:e.concat(it.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uriTemplate!==void 0&&typeof t.uriTemplate!="string"){let i={instancePath:s+"/uriTemplate",schemaPath:"#/properties/uriTemplate/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Tr.errors=e,r===0}Tr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var dn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"};function Sr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Sr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;et(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?et.errors:e.concat(et.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Sr.errors=e,r===0}Sr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Rr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Rr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.uri===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"uri"},message:"must have required property 'uri'"};e===null?e=[i]:e.push(i),r++}if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(fe.call(dn.properties,i)||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t._meta!==void 0){let i=t._meta;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=r;if(typeof n=="string"&&!ee.test(n)){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames/pattern",keyword:"pattern",params:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},message:'must match pattern "^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"',propertyName:n};e===null?e=[m]:e.push(m),r++}var o=l===r;if(!o){let m={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/propertyNames",keyword:"propertyNames",params:{propertyName:n},message:"property name must be valid"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/_meta",schemaPath:"#/$defs/metaObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.audience!==void 0){let n=i.audience;if(Array.isArray(n)){let l=n.length;for(let m=0;m1||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[l]:e.push(l),r++}if(n<0||isNaN(n)){let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[l]:e.push(l),r++}}else{let l={instancePath:s+"/annotations/priority",schemaPath:"#/$defs/resourceAnnotations/properties/priority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[l]:e.push(l),r++}}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/resourceAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.clientRequirements!==void 0&&(Oe(t.clientRequirements,{instancePath:s+"/clientRequirements",parentData:t,parentDataProperty:"clientRequirements",rootData:u,dynamicAnchors:a})||(e=e===null?Oe.errors:e.concat(Oe.errors),r=e.length)),t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let i={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.elicitations!==void 0){let i=t.elicitations;if(Array.isArray(i)){if(i.length<1){let l={instancePath:s+"/elicitations",schemaPath:"#/properties/elicitations/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[l]:e.push(l),r++}let n=i.length;for(let l=0;l1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.uri!==void 0&&typeof t.uri!="string"){let i={instancePath:s+"/uri",schemaPath:"#/properties/uri/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Rr.errors=e,r===0}Rr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var hn={oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]};function we(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=we.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.scopes===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"scopes"},message:"must have required property 'scopes'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="authorizationUrl"||o==="refreshUrl"||o==="scopes"||o==="tokenUrl"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.authorizationUrl!==void 0){let o=t.authorizationUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/authorizationUrl",schemaPath:"#/properties/authorizationUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.refreshUrl!==void 0){let o=t.refreshUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/refreshUrl",schemaPath:"#/properties/refreshUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.scopes!==void 0){let o=t.scopes;if(o&&typeof o=="object"&&!Array.isArray(o)){for(let i in o)if(typeof o[i]!="string"){let n={instancePath:s+"/scopes/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/scopes/additionalProperties/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/scopes",schemaPath:"#/properties/scopes/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.tokenUrl!==void 0){let o=t.tokenUrl;if(typeof o=="string"){if(!B(o)){let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/tokenUrl",schemaPath:"#/properties/tokenUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return we.errors=e,r===0}we.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Dr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Dr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.implicit===void 0){let f={instancePath:s,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty:"implicit"},message:"must have required property 'implicit'"};e===null?e=[f]:e.push(f),r++}var d=n===r;i=i||d;let l=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.password===void 0){let f={instancePath:s,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty:"password"},message:"must have required property 'password'"};e===null?e=[f]:e.push(f),r++}var d=l===r;i=i||d;let m=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.clientCredentials===void 0){let f={instancePath:s,schemaPath:"#/anyOf/2/required",keyword:"required",params:{missingProperty:"clientCredentials"},message:"must have required property 'clientCredentials'"};e===null?e=[f]:e.push(f),r++}var d=m===r;i=i||d;let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)&&t.authorizationCode===void 0){let f={instancePath:s,schemaPath:"#/anyOf/3/required",keyword:"required",params:{missingProperty:"authorizationCode"},message:"must have required property 'authorizationCode'"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(i=i||d,i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[f]:e.push(f),r++}if(t&&typeof t=="object"&&!Array.isArray(t)){for(let f in t)if(!(f==="authorizationCode"||f==="clientCredentials"||f==="implicit"||f==="password"||E.test(f))){let b={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.authorizationCode!==void 0){let f=t.authorizationCode;if(we(f,{instancePath:s+"/authorizationCode",parentData:t,parentDataProperty:"authorizationCode",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)){if(f.authorizationUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}if(f.tokenUrl===void 0){let b={instancePath:s+"/authorizationCode",schemaPath:"#/properties/authorizationCode/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}}if(t.clientCredentials!==void 0){let f=t.clientCredentials;if(we(f,{instancePath:s+"/clientCredentials",parentData:t,parentDataProperty:"clientCredentials",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/clientCredentials",schemaPath:"#/properties/clientCredentials/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.implicit!==void 0){let f=t.implicit;if(we(f,{instancePath:s+"/implicit",parentData:t,parentDataProperty:"implicit",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.authorizationUrl===void 0){let b={instancePath:s+"/implicit",schemaPath:"#/properties/implicit/allOf/1/required",keyword:"required",params:{missingProperty:"authorizationUrl"},message:"must have required property 'authorizationUrl'"};e===null?e=[b]:e.push(b),r++}}if(t.password!==void 0){let f=t.password;if(we(f,{instancePath:s+"/password",parentData:t,parentDataProperty:"password",rootData:u,dynamicAnchors:a})||(e=e===null?we.errors:e.concat(we.errors),r=e.length),f&&typeof f=="object"&&!Array.isArray(f)&&f.tokenUrl===void 0){let b={instancePath:s+"/password",schemaPath:"#/properties/password/allOf/1/required",keyword:"required",params:{missingProperty:"tokenUrl"},message:"must have required property 'tokenUrl'"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}return Dr.errors=e,r===0}Dr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Zr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Zr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.scheme===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"scheme"},message:"must have required property 'scheme'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="bearerFormat"||f==="description"||f==="scheme"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.bearerFormat!==void 0&&typeof t.bearerFormat!="string"){let f={instancePath:s+"/bearerFormat",schemaPath:"#/oneOf/0/properties/bearerFormat/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/0/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.scheme!==void 0&&typeof t.scheme!="string"){let f={instancePath:s+"/scheme",schemaPath:"#/oneOf/0/properties/scheme/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.name===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[f]:e.push(f),r++}if(t.in===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"in"},message:"must have required property 'in'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="description"||f==="in"||f==="name"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.description!==void 0&&typeof t.description!="string"){let f={instancePath:s+"/description",schemaPath:"#/oneOf/1/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.in!==void 0){let f=t.in;if(typeof f!="string"){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}if(!(f==="header"||f==="query"||f==="cookie")){let b={instancePath:s+"/in",schemaPath:"#/oneOf/1/properties/in/enum",keyword:"enum",params:{allowedValues:hn.oneOf[1].properties.in.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}if(t.name!==void 0&&typeof t.name!="string"){let f={instancePath:s+"/name",schemaPath:"#/oneOf/1/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[f]:e.push(f),r++}if(t.type!==void 0&&t.type!=="apiKey"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/1/properties/type/const",keyword:"const",params:{allowedValue:"apiKey"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[h]:e.push(h),r++}if(t.flows===void 0){let h={instancePath:s,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty:"flows"},message:"must have required property 'flows'"};e===null?e=[h]:e.push(h),r++}for(let h in t)if(!(h==="description"||h==="flows"||h==="type"||E.test(h))){let P={instancePath:s,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:h},message:"must NOT have additional properties"};e===null?e=[P]:e.push(P),r++}if(t.description!==void 0&&typeof t.description!="string"){let h={instancePath:s+"/description",schemaPath:"#/oneOf/2/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}if(t.flows!==void 0&&(Dr(t.flows,{instancePath:s+"/flows",parentData:t,parentDataProperty:"flows",rootData:u,dynamicAnchors:a})||(e=e===null?Dr.errors:e.concat(Dr.errors),r=e.length)),t.type!==void 0&&t.type!=="oauth2"){let h={instancePath:s+"/type",schemaPath:"#/oneOf/2/properties/type/const",keyword:"const",params:{allowedValue:"oauth2"},message:"must be equal to constant"};e===null?e=[h]:e.push(h),r++}for(let h in t)E.test(h)&&(N(t[h],{instancePath:s+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:h,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let h={instancePath:s,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[h]:e.push(h),r++}var d=f===r;if(d&&i)i=!1,n=[n,2];else{d&&(i=!0,n=2,m!==!0&&(m=!0));let h=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl===void 0){let $={instancePath:s,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty:"openIdConnectUrl"},message:"must have required property 'openIdConnectUrl'"};e===null?e=[$]:e.push($),r++}for(let $ in t)if(!($==="description"||$==="openIdConnectUrl"||$==="type"||E.test($))){let q={instancePath:s,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:$},message:"must NOT have additional properties"};e===null?e=[q]:e.push(q),r++}if(t.description!==void 0&&typeof t.description!="string"){let $={instancePath:s+"/description",schemaPath:"#/oneOf/3/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}if(t.openIdConnectUrl!==void 0){let $=t.openIdConnectUrl;if(typeof $=="string"){if(!B($)){let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[q]:e.push(q),r++}}else{let q={instancePath:s+"/openIdConnectUrl",schemaPath:"#/oneOf/3/properties/openIdConnectUrl/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[q]:e.push(q),r++}}if(t.type!==void 0&&t.type!=="openIdConnect"){let $={instancePath:s+"/type",schemaPath:"#/oneOf/3/properties/type/const",keyword:"const",params:{allowedValue:"openIdConnect"},message:"must be equal to constant"};e===null?e=[$]:e.push($),r++}for(let $ in t)E.test($)&&(N(t[$],{instancePath:s+"/"+$.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:$,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let $={instancePath:s,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[$]:e.push($),r++}var d=h===r;d&&i?(i=!1,n=[n,3]):d&&(i=!0,n=3,m!==!0&&(m=!0))}}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Zr.errors=e,p.props=m,r===0}Zr.evaluated={dynamicProps:!0,dynamicItems:!1};function Cr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Cr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let i={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[i]:e.push(i),r++}for(let i in t){let n=r;if(typeof i=="string"&&!X.test(i)){let l={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:i};e===null?e=[l]:e.push(l),r++}var o=n===r;if(!o){let l={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:i},message:"property name must be valid"};e===null?e=[l]:e.push(l),r++}}for(let i in t)Zr(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?Zr.errors:e.concat(Zr.errors),r=e.length)}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Cr.errors=e,r===0}Cr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Vr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Vr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="description"||o==="name"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.name!==void 0){let o=t.name;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Vr.errors=e,r===0}Vr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var gn={additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"};var bn={additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"};function Mr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Mr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(Object.keys(t).length<1){let l={instancePath:s,schemaPath:"#/minProperties",keyword:"minProperties",params:{limit:1},message:"must NOT have fewer than 1 properties"};e===null?e=[l]:e.push(l),r++}for(let l in t){let m=r;if(typeof l=="string"&&!X.test(l)){let c={instancePath:s,schemaPath:"#/propertyNames/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"',propertyName:l};e===null?e=[c]:e.push(c),r++}var o=m===r;if(!o){let c={instancePath:s,schemaPath:"#/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};e===null?e=[c]:e.push(c),r++}}for(let l in t){let m=t[l],c=r,d=!1,f=null,b=r;if(m&&typeof m=="object"&&!Array.isArray(m)){if(m.$componentRef===void 0){let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/required",keyword:"required",params:{missingProperty:"$componentRef"},message:"must have required property '$componentRef'"};e===null?e=[P]:e.push(P),r++}for(let P in m)if(P!=="$componentRef"){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:P},message:"must NOT have additional properties"};e===null?e=[$]:e.push($),r++}if(m.$componentRef!==void 0){let P=m.$componentRef;if(typeof P=="string"){if(!ae.test(P)){let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/pattern",keyword:"pattern",params:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"},message:'must match pattern "^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$"'};e===null?e=[$]:e.push($),r++}}else{let $={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1")+"/$componentRef",schemaPath:"#/$defs/referenceObject/properties/%24componentRef/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[$]:e.push($),r++}}}else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/referenceObject/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}var n=b===r;if(n){d=!0,f=0;var i=!0}let h=r;st(m,{instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:l,rootData:u,dynamicAnchors:a})||(e=e===null?st.errors:e.concat(st.errors),r=e.length);var n=h===r;if(n&&d?(d=!1,f=[f,1]):n&&(d=!0,f=1,i!==!0&&(i=!0)),d)r=c,e!==null&&(c?e.length=c:e=null);else{let P={instancePath:s+"/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/additionalProperties/oneOf",keyword:"oneOf",params:{passingSchemas:f},message:"must match exactly one schema in oneOf"};e===null?e=[P]:e.push(P),r++}}}else{let l={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[l]:e.push(l),r++}return Mr.errors=e,r===0}Mr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Ur(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ur.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[o]:e.push(o),r++}if(t.message===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[o]:e.push(o),r++}if(t.requestedSchema===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"requestedSchema"},message:"must have required property 'requestedSchema'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="message"||o==="mode"||o==="requestedSchema")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.message!==void 0){let o=t.message;if(typeof o=="string"){if(oe(o)<1){let i={instancePath:s+"/message",schemaPath:"#/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/message",schemaPath:"#/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.mode!==void 0&&t.mode!=="form"){let o={instancePath:s+"/mode",schemaPath:"#/properties/mode/const",keyword:"const",params:{allowedValue:"form"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}t.requestedSchema!==void 0&&(ot(t.requestedSchema,{instancePath:s+"/requestedSchema",parentData:t,parentDataProperty:"requestedSchema",rootData:u,dynamicAnchors:a})||(e=e===null?ot.errors:e.concat(ot.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Ur.errors=e,r===0}Ur.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Lr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Lr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Ur(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Ur.errors:e.concat(Ur.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.mode===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"mode"},message:"must have required property 'mode'"};e===null?e=[f]:e.push(f),r++}if(t.message===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"message"},message:"must have required property 'message'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="message"||f==="mode"||f==="url")){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.message!==void 0){let f=t.message;if(typeof f=="string"){if(oe(f)<1){let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/message",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}if(t.mode!==void 0&&t.mode!=="url"){let f={instancePath:s+"/mode",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/mode/const",keyword:"const",params:{allowedValue:"url"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/$defs/elicitationInteractionUrlRequest/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionUrlRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Lr.errors=e,p.props=m,r===0}Lr.evaluated={dynamicProps:!0,dynamicItems:!1};var $n={additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"};function Fr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Fr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="action"||o==="content")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.action!==void 0&&t.action!=="accept"){let o={instancePath:s+"/action",schemaPath:"#/properties/action/const",keyword:"const",params:{allowedValue:"accept"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}if(t.content!==void 0){let o=t.content;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)N(o[i],{instancePath:s+"/content/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length);else{let i={instancePath:s+"/content",schemaPath:"#/properties/content/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Fr.errors=e,r===0}Fr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Jr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Jr.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Fr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Fr.errors:e.concat(Fr.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.action===void 0){let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/required",keyword:"required",params:{missingProperty:"action"},message:"must have required property 'action'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(f!=="action"){let b={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.action!==void 0){let f=t.action;if(!(f==="decline"||f==="cancel")){let b={instancePath:s+"/action",schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/properties/action/enum",keyword:"enum",params:{allowedValues:$n.properties.action.enum},message:"must be equal to one of the allowed values"};e===null?e=[b]:e.push(b),r++}}}else{let f={instancePath:s,schemaPath:"#/$defs/elicitationInteractionDeclinedResponse/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=c===r;if(d&&i?(i=!1,n=[n,1]):d&&(i=!0,n=1,m!==!0&&(m=!0)),i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return Jr.errors=e,p.props=m,r===0}Jr.evaluated={dynamicProps:!0,dynamicItems:!1};function Hr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Hr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.request===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"request"},message:"must have required property 'request'"};e===null?e=[o]:e.push(o),r++}if(t.response===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"response"},message:"must have required property 'response'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="declaration"||o==="request"||o==="response"||o==="type"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.declaration!==void 0){let o=t.declaration;if(typeof o=="string"){if(!X.test(o)){let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z0-9._-]+$"},message:'must match pattern "^[A-Za-z0-9._-]+$"'};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/declaration",schemaPath:"#/properties/declaration/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}}if(t.request!==void 0&&(Lr(t.request,{instancePath:s+"/request",parentData:t,parentDataProperty:"request",rootData:u,dynamicAnchors:a})||(e=e===null?Lr.errors:e.concat(Lr.errors),r=e.length)),t.response!==void 0&&(Jr(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?Jr.errors:e.concat(Jr.errors),r=e.length)),t.type!==void 0&&t.type!=="elicitation"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"elicitation"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Hr.errors=e,r===0}Hr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};var Vi={additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},Pn={additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},vn={additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"};function Wr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Wr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[o]:e.push(o),r++}if(t.id===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"id"},message:"must have required property 'id'"};e===null?e=[o]:e.push(o),r++}if(t.name===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[o]:e.push(o),r++}if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="id"||o==="input"||o==="name"||o==="type")){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.id!==void 0&&typeof t.id!="string"){let o={instancePath:s+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)N(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.name!==void 0&&typeof t.name!="string"){let o={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.type!==void 0&&t.type!=="tool_use"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"tool_use"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Wr.errors=e,r===0}Wr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Br(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Br.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[i]:e.push(i),r++}if(t.toolUseId===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"toolUseId"},message:"must have required property 'toolUseId'"};e===null?e=[i]:e.push(i),r++}if(t.content===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="content"||i==="isError"||i==="toolUseId"||i==="type")){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.content!==void 0){let i=t.content,n=r,l=!1,m=null,c=r;de(i,{instancePath:s+"/content",parentData:t,parentDataProperty:"content",rootData:u,dynamicAnchors:a})||(e=e===null?de.errors:e.concat(de.errors),r=e.length);var o=c===r;o&&(l=!0,m=0);let d=r;if(Array.isArray(i)){if(i.length<1){let b={instancePath:s+"/content",schemaPath:"#/properties/content/oneOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[b]:e.push(b),r++}let f=i.length;for(let b=0;b1||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/costPriority",schemaPath:"#/properties/costPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.hints!==void 0){let o=t.hints;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/hints",schemaPath:"#/properties/hints/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/intelligencePriority",schemaPath:"#/properties/intelligencePriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}if(t.speedPriority!==void 0){let o=t.speedPriority;if(typeof o=="number"){if(o>1||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/maximum",keyword:"maximum",params:{comparison:"<=",limit:1},message:"must be <= 1"};e===null?e=[i]:e.push(i),r++}if(o<0||isNaN(o)){let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[i]:e.push(i),r++}}else{let i={instancePath:s+"/speedPriority",schemaPath:"#/properties/speedPriority/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}}}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return Yr.errors=e,r===0}Yr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Qr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Qr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.name===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"name"},message:"must have required property 'name'"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema===void 0){let i={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"inputSchema"},message:"must have required property 'inputSchema'"};e===null?e=[i]:e.push(i),r++}for(let i in t)if(!(i==="annotations"||i==="description"||i==="inputSchema"||i==="name"||i==="title"||E.test(i))){let n={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}if(t.annotations!==void 0){let i=t.annotations;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.destructiveHint!==void 0&&typeof i.destructiveHint!="boolean"){let n={instancePath:s+"/annotations/destructiveHint",schemaPath:"#/$defs/toolAnnotations/properties/destructiveHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.idempotentHint!==void 0&&typeof i.idempotentHint!="boolean"){let n={instancePath:s+"/annotations/idempotentHint",schemaPath:"#/$defs/toolAnnotations/properties/idempotentHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.openWorldHint!==void 0&&typeof i.openWorldHint!="boolean"){let n={instancePath:s+"/annotations/openWorldHint",schemaPath:"#/$defs/toolAnnotations/properties/openWorldHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.readOnlyHint!==void 0&&typeof i.readOnlyHint!="boolean"){let n={instancePath:s+"/annotations/readOnlyHint",schemaPath:"#/$defs/toolAnnotations/properties/readOnlyHint/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[n]:e.push(n),r++}if(i.title!==void 0&&typeof i.title!="string"){let n={instancePath:s+"/annotations/title",schemaPath:"#/$defs/toolAnnotations/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/annotations",schemaPath:"#/$defs/toolAnnotations/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}if(t.description!==void 0&&typeof t.description!="string"){let i={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.inputSchema!==void 0){let i=t.inputSchema;if(!ge(i,{instancePath:s+"/inputSchema",parentData:t,parentDataProperty:"inputSchema",rootData:u,dynamicAnchors:a}))e=e===null?ge.errors:e.concat(ge.errors),r=e.length;else var o=ge.evaluated.props;if(i&&typeof i=="object"&&!Array.isArray(i)){if(i.type===void 0){let n={instancePath:s+"/inputSchema",schemaPath:"#/properties/inputSchema/allOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[n]:e.push(n),r++}if(i.type!==void 0&&i.type!=="object"){let n={instancePath:s+"/inputSchema/type",schemaPath:"#/properties/inputSchema/allOf/1/properties/type/const",keyword:"const",params:{allowedValue:"object"},message:"must be equal to constant"};e===null?e=[n]:e.push(n),r++}}o!==!0&&(o=o||{},o.type=!0)}if(t.name!==void 0){let i=t.name;if(typeof i=="string"){if(oe(i)<1){let n={instancePath:s+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit:1},message:"must NOT have fewer than 1 characters"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[n]:e.push(n),r++}}if(t.title!==void 0&&typeof t.title!="string"){let i={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}for(let i in t)E.test(i)&&(N(t[i],{instancePath:s+"/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}return Qr.errors=e,r===0}Qr.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function Gr(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Gr.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.messages===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"messages"},message:"must have required property 'messages'"};e===null?e=[o]:e.push(o),r++}if(t.maxTokens===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"maxTokens"},message:"must have required property 'maxTokens'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!fe.call(Vi.properties,o)){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.includeContext!==void 0){let o=t.includeContext;if(!(o==="none"||o==="thisServer"||o==="allServers")){let i={instancePath:s+"/includeContext",schemaPath:"#/properties/includeContext/enum",keyword:"enum",params:{allowedValues:Vi.properties.includeContext.enum},message:"must be equal to one of the allowed values"};e===null?e=[i]:e.push(i),r++}}if(t.maxTokens!==void 0){let o=t.maxTokens;if(!(typeof o=="number"&&!(o%1)&&!isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[i]:e.push(i),r++}if(typeof o=="number"&&(o<1||isNaN(o))){let i={instancePath:s+"/maxTokens",schemaPath:"#/properties/maxTokens/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};e===null?e=[i]:e.push(i),r++}}if(t.messages!==void 0){let o=t.messages;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n0){let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/maxProperties",keyword:"maxProperties",params:{limit:0},message:"must NOT have more than 0 properties"};e===null?e=[i]:e.push(i),r++}for(let i in o){let n={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:i},message:"must NOT have additional properties"};e===null?e=[n]:e.push(n),r++}}else{let i={instancePath:s+"/request",schemaPath:"#/$defs/rootsListRequest/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.response!==void 0&&(ts(t.response,{instancePath:s+"/response",parentData:t,parentDataProperty:"response",rootData:u,dynamicAnchors:a})||(e=e===null?ts.errors:e.concat(ts.errors),r=e.length)),t.type!==void 0&&t.type!=="roots"){let o={instancePath:s+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue:"roots"},message:"must be equal to constant"};e===null?e=[o]:e.push(o),r++}for(let o in t)E.test(o)&&(N(t[o],{instancePath:s+"/"+o.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:o,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[o]:e.push(o),r++}return rs.errors=e,r===0}rs.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function ss(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ss.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;Hr(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Hr.errors:e.concat(Hr.errors),r=e.length);var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;es(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?es.errors:e.concat(es.errors),r=e.length);var d=c===r;if(d&&i)i=!1,n=[n,1];else{d&&(i=!0,n=1,m!==!0&&(m=!0));let f=r;rs(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?rs.errors:e.concat(rs.errors),r=e.length);var d=f===r;d&&i?(i=!1,n=[n,2]):d&&(i=!0,n=2,m!==!0&&(m=!0))}if(i)r=o,e!==null&&(o?e.length=o:e=null);else{let f={instancePath:s,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:n},message:"must match exactly one schema in oneOf"};e===null?e=[f]:e.push(f),r++}return ss.errors=e,p.props=m,r===0}ss.evaluated={dynamicProps:!0,dynamicItems:!1};function is(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=is.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),t&&typeof t=="object"&&!Array.isArray(t)){if(t.input===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"input"},message:"must have required property 'input'"};e===null?e=[o]:e.push(o),r++}if(t.steps===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"steps"},message:"must have required property 'steps'"};e===null?e=[o]:e.push(o),r++}if(t.result===void 0){let o={instancePath:s,schemaPath:"#/required",keyword:"required",params:{missingProperty:"result"},message:"must have required property 'result'"};e===null?e=[o]:e.push(o),r++}for(let o in t)if(!(o==="input"||o==="result"||o==="steps"||E.test(o))){let i={instancePath:s,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:o},message:"must NOT have additional properties"};e===null?e=[i]:e.push(i),r++}if(t.input!==void 0){let o=t.input;if(o&&typeof o=="object"&&!Array.isArray(o))for(let i in o)N(o[i],{instancePath:s+"/input/"+i.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:o,parentDataProperty:i,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length);else{let i={instancePath:s+"/input",schemaPath:"#/properties/input/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[i]:e.push(i),r++}}if(t.result!==void 0&&(rt(t.result,{instancePath:s+"/result",parentData:t,parentDataProperty:"result",rootData:u,dynamicAnchors:a})||(e=e===null?rt.errors:e.concat(rt.errors),r=e.length)),t.steps!==void 0){let o=t.steps;if(Array.isArray(o)){if(o.length<1){let n={instancePath:s+"/steps",schemaPath:"#/properties/steps/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[n]:e.push(n),r++}let i=o.length;for(let n=0;n1){let b={};for(;d--;){let h=m[d];if(typeof h=="string"){if(typeof b[h]=="number"){f=b[h];let P={instancePath:s+"/tags",schemaPath:"#/properties/tags/uniqueItems",keyword:"uniqueItems",params:{i:d,j:f},message:"must NOT have duplicate items (items ## "+f+" and "+d+" are identical)"};e===null?e=[P]:e.push(P),r++;break}b[h]=d}}}}else{let c={instancePath:s+"/tags",schemaPath:"#/properties/tags/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[c]:e.push(c),r++}}if(t.title!==void 0&&typeof t.title!="string"){let m={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}for(let m in t)E.test(m)&&(N(t[m],{instancePath:s+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:m,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[m]:e.push(m),r++}return ns.errors=e,r===0}ns.evaluated={props:!0,dynamicProps:!1,dynamicItems:!1};function as(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=as.evaluated;p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0);let o=r,i=!1,n=null,l=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.url===void 0){let f={instancePath:s,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty:"url"},message:"must have required property 'url'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="protocolVersions"||f==="security"||f==="type"||f==="url"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.protocolVersions!==void 0&&(Q(t.protocolVersions,{instancePath:s+"/protocolVersions",parentData:t,parentDataProperty:"protocolVersions",rootData:u,dynamicAnchors:a})||(e=e===null?Q.errors:e.concat(Q.errors),r=e.length)),t.security!==void 0&&(re(t.security,{instancePath:s+"/security",parentData:t,parentDataProperty:"security",rootData:u,dynamicAnchors:a})||(e=e===null?re.errors:e.concat(re.errors),r=e.length)),t.type!==void 0&&t.type!=="streamable-http"){let f={instancePath:s+"/type",schemaPath:"#/oneOf/0/properties/type/const",keyword:"const",params:{allowedValue:"streamable-http"},message:"must be equal to constant"};e===null?e=[f]:e.push(f),r++}if(t.url!==void 0){let f=t.url;if(typeof f=="string"){if(!B(f)){let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/format",keyword:"format",params:{format:"uri"},message:'must match format "uri"'};e===null?e=[b]:e.push(b),r++}}else{let b={instancePath:s+"/url",schemaPath:"#/oneOf/0/properties/url/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[b]:e.push(b),r++}}for(let f in t)E.test(f)&&(N(t[f],{instancePath:s+"/"+f.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:t,parentDataProperty:f,rootData:u,dynamicAnchors:a})||(e=e===null?N.errors:e.concat(N.errors),r=e.length))}else{let f={instancePath:s,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[f]:e.push(f),r++}var d=l===r;if(d){i=!0,n=0;var m=!0}let c=r;if(t&&typeof t=="object"&&!Array.isArray(t)){if(t.type===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"type"},message:"must have required property 'type'"};e===null?e=[f]:e.push(f),r++}if(t.command===void 0){let f={instancePath:s,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty:"command"},message:"must have required property 'command'"};e===null?e=[f]:e.push(f),r++}for(let f in t)if(!(f==="args"||f==="command"||f==="env"||f==="protocolVersions"||f==="security"||f==="type"||E.test(f))){let b={instancePath:s,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:f},message:"must NOT have additional properties"};e===null?e=[b]:e.push(b),r++}if(t.args!==void 0){let f=t.args;if(Array.isArray(f)){let b=f.length;for(let h=0;h=",limit:0},message:"must be >= 0"};a===null?a=[r]:a.push(r),e++}return Ce.errors=a,e===0}var Js={validate:J};function Ae(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t}={}){let a=null,e=0;if(Array.isArray(t)){if(t.length<1){let p={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[p]:a.push(p),e++}let r=t.length;for(let p=0;p",limit:0},message:"must be > 0"};a===null?a=[l]:a.push(l),e++}}else{let l={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[l]:a.push(l),e++}}if(t.maximum!==void 0&&typeof t.maximum!="number"){let n={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.exclusiveMaximum!==void 0&&typeof t.exclusiveMaximum!="number"){let n={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let n={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.exclusiveMinimum!==void 0&&typeof t.exclusiveMinimum!="number"){let n={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};a===null?a=[n]:a.push(n),e++}if(t.maxLength!==void 0){let n=t.maxLength;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxLength",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minLength!==void 0&&(Ce(t.minLength,{instancePath:s+"/minLength",parentData:t,parentDataProperty:"minLength",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.pattern!==void 0&&typeof t.pattern!="string"){let n={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}if(t.additionalItems!==void 0&&(J(t.additionalItems,{instancePath:s+"/additionalItems",parentData:t,parentDataProperty:"additionalItems",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.items!==void 0){let n=t.items,l=e,m=!1,c=e;J(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);var r=c===e;if(m=m||r,!m){let d=e;Ae(n,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length);var r=d===e;m=m||r}if(m)e=l,a!==null&&(l?a.length=l:a=null);else{let d={instancePath:s+"/items",schemaPath:"#/properties/items/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[d]:a.push(d),e++}}if(t.maxItems!==void 0){let n=t.maxItems;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxItems",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minItems!==void 0&&(Ce(t.minItems,{instancePath:s+"/minItems",parentData:t,parentDataProperty:"minItems",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.uniqueItems!==void 0&&typeof t.uniqueItems!="boolean"){let n={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};a===null?a=[n]:a.push(n),e++}if(t.contains!==void 0&&(J(t.contains,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.maxProperties!==void 0){let n=t.maxProperties;if(!(typeof n=="number"&&!(n%1)&&!isNaN(n))){let l={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};a===null?a=[l]:a.push(l),e++}if(typeof n=="number"&&(n<0||isNaN(n))){let l={instancePath:s+"/maxProperties",schemaPath:"#/definitions/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};a===null?a=[l]:a.push(l),e++}}if(t.minProperties!==void 0&&(Ce(t.minProperties,{instancePath:s+"/minProperties",parentData:t,parentDataProperty:"minProperties",rootData:u})||(a=a===null?Ce.errors:a.concat(Ce.errors),e=a.length)),t.required!==void 0){let n=t.required;if(Array.isArray(n)){let l=n.length;for(let d=0;d1){let d={};for(;m--;){let f=n[m];if(typeof f=="string"){if(typeof d[f]=="number"){c=d[f];let b={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:m,j:c},message:"must NOT have duplicate items (items ## "+c+" and "+m+" are identical)"};a===null?a=[b]:a.push(b),e++;break}d[f]=m}}}}else{let l={instancePath:s+"/required",schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[l]:a.push(l),e++}}if(t.additionalProperties!==void 0&&(J(t.additionalProperties,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.definitions!==void 0){let n=t.definitions;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n)J(n[l],{instancePath:s+"/definitions/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);else{let l={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.properties!==void 0){let n=t.properties;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n)J(n[l],{instancePath:s+"/properties/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);else{let l={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.patternProperties!==void 0){let n=t.patternProperties;if(n&&typeof n=="object"&&!Array.isArray(n)){for(let l in n){var p=e===e;if(!p){let c={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:l},message:"property name must be valid"};a===null?a=[c]:a.push(c),e++}}for(let l in n)J(n[l],{instancePath:s+"/patternProperties/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)}else{let l={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.dependencies!==void 0){let n=t.dependencies;if(n&&typeof n=="object"&&!Array.isArray(n))for(let l in n){let m=n[l],c=e,d=!1,f=e;J(m,{instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:n,parentDataProperty:l,rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length);var o=f===e;if(d=d||o,!d){let b=e;if(Array.isArray(m)){let P=m.length;for(let w=0;w1){let w={};for(;$--;){let j=m[$];if(typeof j=="string"){if(typeof w[j]=="number"){q=w[j];let v={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:$,j:q},message:"must NOT have duplicate items (items ## "+q+" and "+$+" are identical)"};a===null?a=[v]:a.push(v),e++;break}w[j]=$}}}}else{let P={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/definitions/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[P]:a.push(P),e++}var o=b===e;d=d||o}if(d)e=c,a!==null&&(c?a.length=c:a=null);else{let b={instancePath:s+"/dependencies/"+l.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[b]:a.push(b),e++}}else{let l={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};a===null?a=[l]:a.push(l),e++}}if(t.propertyNames!==void 0&&(J(t.propertyNames,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.enum!==void 0){let n=t.enum;if(Array.isArray(n)){if(n.length<1){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[c]:a.push(c),e++}let l=n.length,m;if(l>1){e:for(;l--;)for(m=l;m--;)if(Ji(n[l],n[m])){let c={instancePath:s+"/enum",schemaPath:"#/properties/enum/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};a===null?a=[c]:a.push(c),e++;break e}}}else{let l={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[l]:a.push(l),e++}}if(t.type!==void 0){let n=t.type,l=e,m=!1,c=e;if(!(n==="array"||n==="boolean"||n==="integer"||n==="null"||n==="number"||n==="object"||n==="string")){let d={instancePath:s+"/type",schemaPath:"#/definitions/simpleTypes/enum",keyword:"enum",params:{allowedValues:Fi.enum},message:"must be equal to one of the allowed values"};a===null?a=[d]:a.push(d),e++}var i=c===e;if(m=m||i,!m){let d=e;if(Array.isArray(n)){if(n.length<1){let $={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};a===null?a=[$]:a.push($),e++}let b=n.length;for(let $=0;$1){e:for(;h--;)for(P=h;P--;)if(Ji(n[h],n[P])){let $={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:h,j:P},message:"must NOT have duplicate items (items ## "+P+" and "+h+" are identical)"};a===null?a=[$]:a.push($),e++;break e}}}else{let b={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};a===null?a=[b]:a.push(b),e++}var i=d===e;m=m||i}if(m)e=l,a!==null&&(l?a.length=l:a=null);else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};a===null?a=[d]:a.push(d),e++}}if(t.format!==void 0&&typeof t.format!="string"){let n={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let n={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let n={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};a===null?a=[n]:a.push(n),e++}t.if!==void 0&&(J(t.if,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.then!==void 0&&(J(t.then,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.else!==void 0&&(J(t.else,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length)),t.allOf!==void 0&&(Ae(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.anyOf!==void 0&&(Ae(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.oneOf!==void 0&&(Ae(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u})||(a=a===null?Ae.errors:a.concat(Ae.errors),e=a.length)),t.not!==void 0&&(J(t.not,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u})||(a=a===null?J.errors:a.concat(J.errors),e=a.length))}return J.errors=a,e===0}var Bi=xe,jn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}};var kn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":!0},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}};var On=new RegExp("^[^#]*#?$","u"),Hs=new RegExp("^[A-Za-z_][-A-Za-z0-9._]*$","u");function Ee(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=Ee.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let c={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:kn.type},message:"must be object,boolean"};e===null?e=[c]:e.push(c),r++}if(a.meta||(a.meta=Ee),t&&typeof t=="object"&&!Array.isArray(t)){if(t.$id!==void 0){let c=t.$id;if(typeof c!="string"){let d={instancePath:s+"/$id",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}if(typeof c=="string"&&!On.test(c)){let d={instancePath:s+"/$id",schemaPath:"#/properties/%24id/pattern",keyword:"pattern",params:{pattern:"^[^#]*#?$"},message:'must match pattern "^[^#]*#?$"'};e===null?e=[d]:e.push(d),r++}}if(t.$schema!==void 0&&typeof t.$schema!="string"){let c={instancePath:s+"/$schema",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$ref!==void 0&&typeof t.$ref!="string"){let c={instancePath:s+"/$ref",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$anchor!==void 0){let c=t.$anchor;if(typeof c=="string"){if(!Hs.test(c)){let d={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[d]:e.push(d),r++}}else{let d={instancePath:s+"/$anchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}}if(t.$dynamicRef!==void 0&&typeof t.$dynamicRef!="string"){let c={instancePath:s+"/$dynamicRef",schemaPath:"#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$dynamicAnchor!==void 0){let c=t.$dynamicAnchor;if(typeof c=="string"){if(!Hs.test(c)){let d={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[d]:e.push(d),r++}}else{let d={instancePath:s+"/$dynamicAnchor",schemaPath:"#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[d]:e.push(d),r++}}if(t.$vocabulary!==void 0){let c=t.$vocabulary;if(c&&typeof c=="object"&&!Array.isArray(c)){for(let d in c){let f=r;if(typeof d!="string"){let b={instancePath:s+"/$vocabulary",schemaPath:"#/$defs/uriString/type",keyword:"type",params:{type:"string"},message:"must be string",propertyName:d};e===null?e=[b]:e.push(b),r++}var o=f===r;if(!o){let b={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/propertyNames",keyword:"propertyNames",params:{propertyName:d},message:"property name must be valid"};e===null?e=[b]:e.push(b),r++}}for(let d in c)if(typeof c[d]!="boolean"){let f={instancePath:s+"/$vocabulary/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/%24vocabulary/additionalProperties/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[f]:e.push(f),r++}}else{let d={instancePath:s+"/$vocabulary",schemaPath:"#/properties/%24vocabulary/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[d]:e.push(d),r++}}if(t.$comment!==void 0&&typeof t.$comment!="string"){let c={instancePath:s+"/$comment",schemaPath:"#/properties/%24comment/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[c]:e.push(c),r++}if(t.$defs!==void 0){let c=t.$defs;if(c&&typeof c=="object"&&!Array.isArray(c))for(let d in c){let f=c[d],b=a.meta;if(b)if(!b(f,{instancePath:s+"/$defs/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:d,rootData:u,dynamicAnchors:a}))e=e===null?b.errors:e.concat(b.errors),r=e.length;else var i=b.evaluated.props,n=b.evaluated.items;else if(!Ee(f,{instancePath:s+"/$defs/"+d.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:c,parentDataProperty:d,rootData:u,dynamicAnchors:a}))e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length;else{var l=Ee.evaluated.props;i!==!0&&l!==void 0&&(l===!0?i=!0:(i=i||{},Object.assign(i,l)));var m=Ee.evaluated.items;n!==!0&&m!==void 0&&(n=m===!0?!0:n>m?n:m)}}else{let d={instancePath:s+"/$defs",schemaPath:"#/properties/%24defs/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[d]:e.push(d),r++}}}return Ee.errors=e,r===0}Ee.evaluated={props:{$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};var qn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":!0},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}};function ce(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ce.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),Array.isArray(t)){if(t.length<1){let c={instancePath:s,schemaPath:"#/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[c]:e.push(c),r++}let m=t.length;for(let c=0;cl?i:l)}}}else{let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[m]:e.push(m),r++}return ce.errors=e,r===0}ce.evaluated={items:!0,dynamicProps:!1,dynamicItems:!1};function C(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=C.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let V={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:qn.type},message:"must be object,boolean"};e===null?e=[V]:e.push(V),r++}if(a.meta||(a.meta=C),t&&typeof t=="object"&&!Array.isArray(t)){if(t.prefixItems!==void 0&&(ce(t.prefixItems,{instancePath:s+"/prefixItems",parentData:t,parentDataProperty:"prefixItems",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.items!==void 0){let V=t.items,R=a.meta;if(R)if(!R(V,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var o=R.evaluated.props,i=R.evaluated.items;else if(!C(V,{instancePath:s+"/items",parentData:t,parentDataProperty:"items",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var n=C.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=C.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}if(t.contains!==void 0){let V=t.contains,R=a.meta;if(R)if(!R(V,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var m=R.evaluated.props,c=R.evaluated.items;else if(!C(V,{instancePath:s+"/contains",parentData:t,parentDataProperty:"contains",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var d=C.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=C.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}}if(t.additionalProperties!==void 0){let V=t.additionalProperties,R=a.meta;if(R)if(!R(V,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var b=R.evaluated.props,h=R.evaluated.items;else if(!C(V,{instancePath:s+"/additionalProperties",parentData:t,parentDataProperty:"additionalProperties",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var P=C.evaluated.props;b!==!0&&P!==void 0&&(P===!0?b=!0:(b=b||{},Object.assign(b,P)));var $=C.evaluated.items;h!==!0&&$!==void 0&&(h=$===!0?!0:h>$?h:$)}}if(t.properties!==void 0){let V=t.properties;if(V&&typeof V=="object"&&!Array.isArray(V))for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/properties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var q=ne.evaluated.props,w=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/properties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var j=C.evaluated.props;q!==!0&&j!==void 0&&(j===!0?q=!0:(q=q||{},Object.assign(q,j)));var v=C.evaluated.items;w!==!0&&v!==void 0&&(w=v===!0?!0:w>v?w:v)}}else{let R={instancePath:s+"/properties",schemaPath:"#/properties/properties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.patternProperties!==void 0){let V=t.patternProperties;if(V&&typeof V=="object"&&!Array.isArray(V)){for(let R in V){var k=r===r;if(!k){let ne={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/propertyNames",keyword:"propertyNames",params:{propertyName:R},message:"property name must be valid"};e===null?e=[ne]:e.push(ne),r++}}for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/patternProperties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var O=ne.evaluated.props,x=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/patternProperties/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var I=C.evaluated.props;O!==!0&&I!==void 0&&(I===!0?O=!0:(O=O||{},Object.assign(O,I)));var Z=C.evaluated.items;x!==!0&&Z!==void 0&&(x=Z===!0?!0:x>Z?x:Z)}}}else{let R={instancePath:s+"/patternProperties",schemaPath:"#/properties/patternProperties/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.dependentSchemas!==void 0){let V=t.dependentSchemas;if(V&&typeof V=="object"&&!Array.isArray(V))for(let R in V){let Ve=V[R],ne=a.meta;if(ne)if(!ne(Ve,{instancePath:s+"/dependentSchemas/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?ne.errors:e.concat(ne.errors),r=e.length;else var A=ne.evaluated.props,_=ne.evaluated.items;else if(!C(Ve,{instancePath:s+"/dependentSchemas/"+R.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:V,parentDataProperty:R,rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var D=C.evaluated.props;A!==!0&&D!==void 0&&(D===!0?A=!0:(A=A||{},Object.assign(A,D)));var W=C.evaluated.items;_!==!0&&W!==void 0&&(_=W===!0?!0:_>W?_:W)}}else{let R={instancePath:s+"/dependentSchemas",schemaPath:"#/properties/dependentSchemas/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[R]:e.push(R),r++}}if(t.propertyNames!==void 0){let V=t.propertyNames,R=a.meta;if(R)if(!R(V,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var K=R.evaluated.props,G=R.evaluated.items;else if(!C(V,{instancePath:s+"/propertyNames",parentData:t,parentDataProperty:"propertyNames",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var H=C.evaluated.props;K!==!0&&H!==void 0&&(H===!0?K=!0:(K=K||{},Object.assign(K,H)));var Te=C.evaluated.items;G!==!0&&Te!==void 0&&(G=Te===!0?!0:G>Te?G:Te)}}if(t.if!==void 0){let V=t.if,R=a.meta;if(R)if(!R(V,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var ls=R.evaluated.props,gs=R.evaluated.items;else if(!C(V,{instancePath:s+"/if",parentData:t,parentDataProperty:"if",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ts=C.evaluated.props;ls!==!0&&Ts!==void 0&&(Ts===!0?ls=!0:(ls=ls||{},Object.assign(ls,Ts)));var bs=C.evaluated.items;gs!==!0&&bs!==void 0&&(gs=bs===!0?!0:gs>bs?gs:bs)}}if(t.then!==void 0){let V=t.then,R=a.meta;if(R)if(!R(V,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var ms=R.evaluated.props,$s=R.evaluated.items;else if(!C(V,{instancePath:s+"/then",parentData:t,parentDataProperty:"then",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ss=C.evaluated.props;ms!==!0&&Ss!==void 0&&(Ss===!0?ms=!0:(ms=ms||{},Object.assign(ms,Ss)));var Ps=C.evaluated.items;$s!==!0&&Ps!==void 0&&($s=Ps===!0?!0:$s>Ps?$s:Ps)}}if(t.else!==void 0){let V=t.else,R=a.meta;if(R)if(!R(V,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var us=R.evaluated.props,vs=R.evaluated.items;else if(!C(V,{instancePath:s+"/else",parentData:t,parentDataProperty:"else",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Rs=C.evaluated.props;us!==!0&&Rs!==void 0&&(Rs===!0?us=!0:(us=us||{},Object.assign(us,Rs)));var ws=C.evaluated.items;vs!==!0&&ws!==void 0&&(vs=ws===!0?!0:vs>ws?vs:ws)}}if(t.allOf!==void 0&&(ce(t.allOf,{instancePath:s+"/allOf",parentData:t,parentDataProperty:"allOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.anyOf!==void 0&&(ce(t.anyOf,{instancePath:s+"/anyOf",parentData:t,parentDataProperty:"anyOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.oneOf!==void 0&&(ce(t.oneOf,{instancePath:s+"/oneOf",parentData:t,parentDataProperty:"oneOf",rootData:u,dynamicAnchors:a})||(e=e===null?ce.errors:e.concat(ce.errors),r=e.length)),t.not!==void 0){let V=t.not,R=a.meta;if(R)if(!R(V,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:a}))e=e===null?R.errors:e.concat(R.errors),r=e.length;else var fs=R.evaluated.props,js=R.evaluated.items;else if(!C(V,{instancePath:s+"/not",parentData:t,parentDataProperty:"not",rootData:u,dynamicAnchors:a}))e=e===null?C.errors:e.concat(C.errors),r=e.length;else{var Ds=C.evaluated.props;fs!==!0&&Ds!==void 0&&(Ds===!0?fs=!0:(fs=fs||{},Object.assign(fs,Ds)));var ks=C.evaluated.items;js!==!0&&ks!==void 0&&(js=ks===!0?!0:js>ks?js:ks)}}}return C.errors=e,r===0}C.evaluated={props:{prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0},dynamicProps:!1,dynamicItems:!1};var xn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}};function be(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=be.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let b={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:xn.type},message:"must be object,boolean"};e===null?e=[b]:e.push(b),r++}if(a.meta||(a.meta=be),t&&typeof t=="object"&&!Array.isArray(t)){if(t.unevaluatedItems!==void 0){let b=t.unevaluatedItems,h=a.meta;if(h)if(!h(b,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:a}))e=e===null?h.errors:e.concat(h.errors),r=e.length;else var o=h.evaluated.props,i=h.evaluated.items;else if(!be(b,{instancePath:s+"/unevaluatedItems",parentData:t,parentDataProperty:"unevaluatedItems",rootData:u,dynamicAnchors:a}))e=e===null?be.errors:e.concat(be.errors),r=e.length;else{var n=be.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=be.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}if(t.unevaluatedProperties!==void 0){let b=t.unevaluatedProperties,h=a.meta;if(h)if(!h(b,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:a}))e=e===null?h.errors:e.concat(h.errors),r=e.length;else var m=h.evaluated.props,c=h.evaluated.items;else if(!be(b,{instancePath:s+"/unevaluatedProperties",parentData:t,parentDataProperty:"unevaluatedProperties",rootData:u,dynamicAnchors:a}))e=e===null?be.errors:e.concat(be.errors),r=e.length;else{var d=be.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=be.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}}}return be.errors=e,r===0}be.evaluated={props:{unevaluatedItems:!0,unevaluatedProperties:!0},dynamicProps:!1,dynamicItems:!1};var An={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":!0},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}}},Wi={enum:["array","boolean","integer","null","number","object","string"]};var En=qs().default;function ct(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ct.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let i={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:An.type},message:"must be object,boolean"};e===null?e=[i]:e.push(i),r++}if(a.meta||(a.meta=ct),t&&typeof t=="object"&&!Array.isArray(t)){if(t.type!==void 0){let i=t.type,n=r,l=!1,m=r;if(!(i==="array"||i==="boolean"||i==="integer"||i==="null"||i==="number"||i==="object"||i==="string")){let d={instancePath:s+"/type",schemaPath:"#/$defs/simpleTypes/enum",keyword:"enum",params:{allowedValues:Wi.enum},message:"must be equal to one of the allowed values"};e===null?e=[d]:e.push(d),r++}var o=m===r;l=l||o;let c=r;if(Array.isArray(i)){if(i.length<1){let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/minItems",keyword:"minItems",params:{limit:1},message:"must NOT have fewer than 1 items"};e===null?e=[h]:e.push(h),r++}let d=i.length;for(let h=0;h1){e:for(;f--;)for(b=f;b--;)if(En(i[f],i[b])){let h={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/uniqueItems",keyword:"uniqueItems",params:{i:f,j:b},message:"must NOT have duplicate items (items ## "+b+" and "+f+" are identical)"};e===null?e=[h]:e.push(h),r++;break e}}}else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[d]:e.push(d),r++}var o=c===r;if(l=l||o,l)r=n,e!==null&&(n?e.length=n:e=null);else{let d={instancePath:s+"/type",schemaPath:"#/properties/type/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[d]:e.push(d),r++}}if(t.enum!==void 0&&!Array.isArray(t.enum)){let i={instancePath:s+"/enum",schemaPath:"#/properties/enum/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[i]:e.push(i),r++}if(t.multipleOf!==void 0){let i=t.multipleOf;if(typeof i=="number"){if(i<=0||isNaN(i)){let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison:">",limit:0},message:"must be > 0"};e===null?e=[n]:e.push(n),r++}}else{let n={instancePath:s+"/multipleOf",schemaPath:"#/properties/multipleOf/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[n]:e.push(n),r++}}if(t.maximum!==void 0&&typeof t.maximum!="number"){let i={instancePath:s+"/maximum",schemaPath:"#/properties/maximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.exclusiveMaximum!==void 0&&typeof t.exclusiveMaximum!="number"){let i={instancePath:s+"/exclusiveMaximum",schemaPath:"#/properties/exclusiveMaximum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.minimum!==void 0&&typeof t.minimum!="number"){let i={instancePath:s+"/minimum",schemaPath:"#/properties/minimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.exclusiveMinimum!==void 0&&typeof t.exclusiveMinimum!="number"){let i={instancePath:s+"/exclusiveMinimum",schemaPath:"#/properties/exclusiveMinimum/type",keyword:"type",params:{type:"number"},message:"must be number"};e===null?e=[i]:e.push(i),r++}if(t.maxLength!==void 0){let i=t.maxLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxLength",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minLength!==void 0){let i=t.minLength;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minLength",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.pattern!==void 0&&typeof t.pattern!="string"){let i={instancePath:s+"/pattern",schemaPath:"#/properties/pattern/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[i]:e.push(i),r++}if(t.maxItems!==void 0){let i=t.maxItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxItems",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minItems!==void 0){let i=t.minItems;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minItems",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.uniqueItems!==void 0&&typeof t.uniqueItems!="boolean"){let i={instancePath:s+"/uniqueItems",schemaPath:"#/properties/uniqueItems/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[i]:e.push(i),r++}if(t.maxContains!==void 0){let i=t.maxContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minContains!==void 0){let i=t.minContains;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minContains",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.maxProperties!==void 0){let i=t.maxProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/maxProperties",schemaPath:"#/$defs/nonNegativeInteger/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.minProperties!==void 0){let i=t.minProperties;if(!(typeof i=="number"&&!(i%1)&&!isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/type",keyword:"type",params:{type:"integer"},message:"must be integer"};e===null?e=[n]:e.push(n),r++}if(typeof i=="number"&&(i<0||isNaN(i))){let n={instancePath:s+"/minProperties",schemaPath:"#/$defs/nonNegativeIntegerDefault0/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};e===null?e=[n]:e.push(n),r++}}if(t.required!==void 0){let i=t.required;if(Array.isArray(i)){let n=i.length;for(let c=0;c1){let c={};for(;l--;){let d=i[l];if(typeof d=="string"){if(typeof c[d]=="number"){m=c[d];let f={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:l,j:m},message:"must NOT have duplicate items (items ## "+m+" and "+l+" are identical)"};e===null?e=[f]:e.push(f),r++;break}c[d]=l}}}}else{let n={instancePath:s+"/required",schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[n]:e.push(n),r++}}if(t.dependentRequired!==void 0){let i=t.dependentRequired;if(i&&typeof i=="object"&&!Array.isArray(i))for(let n in i){let l=i[n];if(Array.isArray(l)){let m=l.length;for(let f=0;f1){let f={};for(;c--;){let b=l[c];if(typeof b=="string"){if(typeof f[b]=="number"){d=f[b];let h={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:c,j:d},message:"must NOT have duplicate items (items ## "+d+" and "+c+" are identical)"};e===null?e=[h]:e.push(h),r++;break}f[b]=c}}}}else{let m={instancePath:s+"/dependentRequired/"+n.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[m]:e.push(m),r++}}else{let n={instancePath:s+"/dependentRequired",schemaPath:"#/properties/dependentRequired/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[n]:e.push(n),r++}}}return ct.errors=e,r===0}ct.evaluated={props:{type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0},dynamicProps:!1,dynamicItems:!1};var zn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}};function yt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=yt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:zn.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(a.meta||(a.meta=yt),t&&typeof t=="object"&&!Array.isArray(t)){if(t.title!==void 0&&typeof t.title!="string"){let o={instancePath:s+"/title",schemaPath:"#/properties/title/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.description!==void 0&&typeof t.description!="string"){let o={instancePath:s+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}if(t.deprecated!==void 0&&typeof t.deprecated!="boolean"){let o={instancePath:s+"/deprecated",schemaPath:"#/properties/deprecated/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.readOnly!==void 0&&typeof t.readOnly!="boolean"){let o={instancePath:s+"/readOnly",schemaPath:"#/properties/readOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.writeOnly!==void 0&&typeof t.writeOnly!="boolean"){let o={instancePath:s+"/writeOnly",schemaPath:"#/properties/writeOnly/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};e===null?e=[o]:e.push(o),r++}if(t.examples!==void 0&&!Array.isArray(t.examples)){let o={instancePath:s+"/examples",schemaPath:"#/properties/examples/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[o]:e.push(o),r++}}return yt.errors=e,r===0}yt.evaluated={props:{title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0},dynamicProps:!1,dynamicItems:!1};var Nn={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}};function dt(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=dt.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let o={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:Nn.type},message:"must be object,boolean"};e===null?e=[o]:e.push(o),r++}if(a.meta||(a.meta=dt),t&&typeof t=="object"&&!Array.isArray(t)&&t.format!==void 0&&typeof t.format!="string"){let o={instancePath:s+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[o]:e.push(o),r++}return dt.errors=e,r===0}dt.evaluated={props:{format:!0},dynamicProps:!1,dynamicItems:!1};var _n={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}};function ze(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=ze.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let m={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:_n.type},message:"must be object,boolean"};e===null?e=[m]:e.push(m),r++}if(a.meta||(a.meta=ze),t&&typeof t=="object"&&!Array.isArray(t)){if(t.contentEncoding!==void 0&&typeof t.contentEncoding!="string"){let m={instancePath:s+"/contentEncoding",schemaPath:"#/properties/contentEncoding/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.contentMediaType!==void 0&&typeof t.contentMediaType!="string"){let m={instancePath:s+"/contentMediaType",schemaPath:"#/properties/contentMediaType/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[m]:e.push(m),r++}if(t.contentSchema!==void 0){let m=t.contentSchema,c=a.meta;if(c)if(!c(m,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:a}))e=e===null?c.errors:e.concat(c.errors),r=e.length;else var o=c.evaluated.props,i=c.evaluated.items;else if(!ze(m,{instancePath:s+"/contentSchema",parentData:t,parentDataProperty:"contentSchema",rootData:u,dynamicAnchors:a}))e=e===null?ze.errors:e.concat(ze.errors),r=e.length;else{var n=ze.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=ze.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}}return ze.errors=e,r===0}ze.evaluated={props:{contentEncoding:!0,contentMediaType:!0,contentSchema:!0},dynamicProps:!1,dynamicItems:!1};function xe(t,{instancePath:s="",parentData:y,parentDataProperty:g,rootData:u=t,dynamicAnchors:a={}}={}){let e=null,r=0,p=xe.evaluated;if(p.dynamicProps&&(p.props=void 0),p.dynamicItems&&(p.items=void 0),!(t&&typeof t=="object"&&!Array.isArray(t))&&typeof t!="boolean"){let h={instancePath:s,schemaPath:"#/type",keyword:"type",params:{type:jn.type},message:"must be object,boolean"};e===null?e=[h]:e.push(h),r++}if(a.meta||(a.meta=xe),Ee(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?Ee.errors:e.concat(Ee.errors),r=e.length),C(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?C.errors:e.concat(C.errors),r=e.length),be(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?be.errors:e.concat(be.errors),r=e.length),ct(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?ct.errors:e.concat(ct.errors),r=e.length),yt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?yt.errors:e.concat(yt.errors),r=e.length),dt(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?dt.errors:e.concat(dt.errors),r=e.length),ze(t,{instancePath:s,parentData:y,parentDataProperty:g,rootData:u,dynamicAnchors:a})||(e=e===null?ze.errors:e.concat(ze.errors),r=e.length),t&&typeof t=="object"&&!Array.isArray(t)){if(t.definitions!==void 0){let h=t.definitions;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=h[P],q=a.meta;if(q)if(!q($,{instancePath:s+"/definitions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?q.errors:e.concat(q.errors),r=e.length;else var o=q.evaluated.props,i=q.evaluated.items;else if(!xe($,{instancePath:s+"/definitions/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?xe.errors:e.concat(xe.errors),r=e.length;else{var n=xe.evaluated.props;o!==!0&&n!==void 0&&(n===!0?o=!0:(o=o||{},Object.assign(o,n)));var l=xe.evaluated.items;i!==!0&&l!==void 0&&(i=l===!0?!0:i>l?i:l)}}else{let P={instancePath:s+"/definitions",schemaPath:"#/properties/definitions/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.dependencies!==void 0){let h=t.dependencies;if(h&&typeof h=="object"&&!Array.isArray(h))for(let P in h){let $=h[P],q=r,w=!1,j=r,v=a.meta;if(v)if(!v($,{instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?v.errors:e.concat(v.errors),r=e.length;else var m=v.evaluated.props,c=v.evaluated.items;else if(!xe($,{instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:h,parentDataProperty:P,rootData:u,dynamicAnchors:a}))e=e===null?xe.errors:e.concat(xe.errors),r=e.length;else{var d=xe.evaluated.props;m!==!0&&d!==void 0&&(d===!0?m=!0:(m=m||{},Object.assign(m,d)));var f=xe.evaluated.items;c!==!0&&f!==void 0&&(c=f===!0?!0:c>f?c:f)}var b=j===r;w=w||b;let k=r;if(Array.isArray($)){let O=$.length;for(let Z=0;Z1){let Z={};for(;x--;){let A=$[x];if(typeof A=="string"){if(typeof Z[A]=="number"){I=Z[A];let _={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/uniqueItems",keyword:"uniqueItems",params:{i:x,j:I},message:"must NOT have duplicate items (items ## "+I+" and "+x+" are identical)"};e===null?e=[_]:e.push(_),r++;break}Z[A]=x}}}}else{let O={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"meta/validation#/$defs/stringArray/type",keyword:"type",params:{type:"array"},message:"must be array"};e===null?e=[O]:e.push(O),r++}var b=k===r;if(w=w||b,b&&c!==!0&&(c=!0),w)r=q,e!==null&&(q?e.length=q:e=null);else{let O={instancePath:s+"/dependencies/"+P.replace(/~/g,"~0").replace(/\//g,"~1"),schemaPath:"#/properties/dependencies/additionalProperties/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};e===null?e=[O]:e.push(O),r++}}else{let P={instancePath:s+"/dependencies",schemaPath:"#/properties/dependencies/type",keyword:"type",params:{type:"object"},message:"must be object"};e===null?e=[P]:e.push(P),r++}}if(t.$recursiveAnchor!==void 0){let h=t.$recursiveAnchor;if(typeof h=="string"){if(!Hs.test(h)){let P={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/pattern",keyword:"pattern",params:{pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},message:'must match pattern "^[A-Za-z_][-A-Za-z0-9._]*$"'};e===null?e=[P]:e.push(P),r++}}else{let P={instancePath:s+"/$recursiveAnchor",schemaPath:"meta/core#/$defs/anchorString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[P]:e.push(P),r++}}if(t.$recursiveRef!==void 0&&typeof t.$recursiveRef!="string"){let h={instancePath:s+"/$recursiveRef",schemaPath:"meta/core#/$defs/uriReferenceString/type",keyword:"type",params:{type:"string"},message:"must be string"};e===null?e=[h]:e.push(h),r++}}return xe.errors=e,r===0}xe.evaluated={props:{definitions:!0,dependencies:!0,$recursiveAnchor:!0,$recursiveRef:!0,contentEncoding:!0,contentMediaType:!0,contentSchema:!0,format:!0,title:!0,description:!0,default:!0,deprecated:!0,readOnly:!0,writeOnly:!0,examples:!0,type:!0,const:!0,enum:!0,multipleOf:!0,maximum:!0,exclusiveMaximum:!0,minimum:!0,exclusiveMinimum:!0,maxLength:!0,minLength:!0,pattern:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxContains:!0,minContains:!0,maxProperties:!0,minProperties:!0,required:!0,dependentRequired:!0,unevaluatedItems:!0,unevaluatedProperties:!0,prefixItems:!0,items:!0,contains:!0,additionalProperties:!0,properties:!0,patternProperties:!0,dependentSchemas:!0,propertyNames:!0,if:!0,then:!0,else:!0,allOf:!0,anyOf:!0,oneOf:!0,not:!0,$id:!0,$schema:!0,$ref:!0,$anchor:!0,$dynamicRef:!0,$dynamicAnchor:!0,$vocabulary:!0,$comment:!0,$defs:!0},dynamicProps:!1,dynamicItems:!1};function Tn(t){return t==="#"?"":t.slice(1)}function Ki(t){return/"([^"]+)"/.exec(t)?.[1]}function Sn(t){let s={};return t.keyword==="required"&&(s.missingProperty=Ki(t.error)),t.keyword==="additionalProperties"&&(s.additionalProperty=Ki(t.error)),{instancePath:Tn(t.instanceLocation),keyword:t.keyword,params:s,message:t.error}}function Rn(t){let s=new Set,y=[];function g(u){if(!(!u||typeof u!="object")){typeof u.$anchor=="string"&&s.add(u.$anchor),typeof u.$dynamicAnchor=="string"&&s.add(u.$dynamicAnchor);for(let a of["$ref","$dynamicRef","$recursiveRef"])typeof u[a]=="string"&&y.push(u[a]);for(let a of Object.values(u))g(a)}}g(t);for(let u of y){if(!u.startsWith("#"))throw new Error(`can't resolve reference ${u}`);if(u==="#"||u==="#recursive")continue;if(!u.startsWith("#/")){if(!s.has(u.slice(1)))throw new Error(`can't resolve reference ${u}`);continue}let a=t;for(let e of u.slice(2).split("/").map(r=>r.replaceAll("~1","/").replaceAll("~0","~"))){if(!a||typeof a!="object"||!Object.hasOwn(a,e))throw new Error(`can't resolve reference ${u}`);a=a[e]}}}function Dn(t,s){Rn(t);let y=new In(t,s,!1),g=u=>{let a=y.validate(u);return g.errors=a.valid?null:a.errors.map(Sn),a.valid};return g.errors=null,g}var zs=class{constructor(s={}){this.errors=null}compile(s){let y=Li.get(s?.description);return y||Dn(s,this.constructor.draft)}validateSchema(s){let y=this.constructor.draft==="7"?Hi:Bi,g=y(s);return this.errors=y.errors,g}},Ws=class extends zs{static draft="7"},Ne=class extends zs{static draft="2020-12"},lt=Ws;function _e(t){return t}function Ks(t){let s=[],y="",g=0;for(;g0;)t[e]==="{"?r++:t[e]==="}"&&r--,e++;if(r>0)throw new Error(`Unclosed expression in template: ${t}`);let p=t.slice(a,e-1),o=Zn(p);s.push(o),g=e}else y+=u,g++}return y&&s.push({type:"literal",value:y}),{template:t,parts:s}}function Zn(t){if(!t.trim())throw new Error("Empty expression");let s=t[0],y=["+","#",".","/",";","?","&"],g,u=t;return y.includes(s)&&(g=s,u=t.slice(1)),{type:"expression",expressions:Cn(u).map(Vn),operator:g}}function Cn(t){let s=[],y="",g=0;for(;g=y.length)return{uri_index:s};let a=y[g];if(a.type==="literal")return t.slice(s).startsWith(a.value)?Bs(t,s+a.value.length,y,g+1,u):null;{let e=y[g+1],p=Mn(t,s,e).sort((o,i)=>e&&e.type==="expression"&&!e.operator?i-o:o-i);for(let o of p){let i=t.slice(s,o),n={...u};if(Un(i,a,n,t,s)){let m=Bs(t,o,y,g+1,n);if(m)return Object.assign(u,n),m}}return null}}function Mn(t,s,y){let g=[];if(y&&y.type==="literal"){let u=s;for(;uu-a)}function Un(t,s,y,g,u){if(s.type!=="expression")return!1;switch(s.operator){case"+":return Fn(t,s,y);case"#":return Ln(t,s,y);case".":return Hn(t,s,y);case"/":return Wn(t,s,y);case";":return Bn(t,s,y);case"?":case"&":return Kn(t,s,y);default:return Jn(t,s,y,g,u)}}function Ln(t,s,y){if(s.type!=="expression")return!1;if(!t.startsWith("#")){for(let u of s.expressions)y[u.name]="";return t===""}let g=t.slice(1);if(s.expressions.length===1){let u=s.expressions[0],a=g;return u.prefix&&a.length>u.prefix&&(a=a.slice(0,u.prefix)),y[u.name]=decodeURIComponent(a),!0}else{let u=g.split(",");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Fn(t,s,y){if(s.type!=="expression")return!1;if(s.expressions.length===1){let g=s.expressions[0],u=t;return g.prefix&&u.length>g.prefix&&(u=u.slice(0,g.prefix)),y[g.name]=decodeURIComponent(u),!0}else{let g=t.split(",");for(let u=0;ua.prefix&&(e=e.slice(0,a.prefix)),y[a.name]=decodeURIComponent(e)}return!0}}function Jn(t,s,y,g,u){if(s.type!=="expression")return!1;if(s.expressions.length===1){let a=s.expressions[0],e=t;return e.includes("/")||e===""&&u+t.length===g.length&&g.endsWith("/")?!1:(a.prefix&&e.length>a.prefix&&(e=e.slice(0,a.prefix)),y[a.name]=decodeURIComponent(e),!0)}else{let a=t.split(",");for(let e=0;er.prefix&&(p=p.slice(0,r.prefix)),y[r.name]=decodeURIComponent(p)}return!0}}function Hn(t,s,y){if(s.type!=="expression")return!1;if(t===""){for(let u of s.expressions)y[u.name]="";return!0}let g=t.startsWith(".")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let a=g.split(".");y[u.name]=a.map(e=>decodeURIComponent(e))}else y[u.name]=decodeURIComponent(g);return!0}else{let u=g.split(".");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Wn(t,s,y){if(s.type!=="expression")return!1;let g=t.startsWith("/")?t.slice(1):t;if(s.expressions.length===1){let u=s.expressions[0];return y[u.name]=decodeURIComponent(g),!0}else{let u=g.split(",");for(let a=0;ae.prefix&&(r=r.slice(0,e.prefix)),y[e.name]=decodeURIComponent(r)}return!0}}function Bn(t,s,y){if(s.type!=="expression")return!1;let g=t.split(";").filter(u=>u);for(let u of g){let a=u.indexOf("=");if(a!==-1){let e=u.slice(0,a),r=u.slice(a+1),p=s.expressions.find(o=>o.name===e);p&&(y[p.name]=decodeURIComponent(r))}}return!0}function Kn(t,s,y){if(s.type!=="expression")return!1;let g=t.replace(/^[?&]/,"");if(s.expressions.length===1){let u=s.expressions[0];if(u.explode){let a=g.split("&");y[u.name]=a.map(e=>decodeURIComponent(e))}else{let a=g.split("&");for(let e of a){let r=e.indexOf("=");if(r!==-1){let p=e.slice(0,r),o=e.slice(r+1);p===u.name&&(y[u.name]=decodeURIComponent(o))}}}}else{let u=g.split("&");for(let a of u){let e=a.indexOf("=");if(e!==-1){let r=a.slice(0,e),p=a.slice(e+1),o=s.expressions.find(i=>i.name===r);o&&(y[o.name]=decodeURIComponent(p))}}}return!0}var Ie=class{constructor(){this.templates=[]}add(s){if(typeof s!="string")throw new Error("Template must be a string");if(s!==""&&s.trim()==="")throw new Error("Template cannot be empty");try{let y=Ks(s);this.templates.push(y)}catch(y){throw new Error(`Invalid template: ${s} - ${y instanceof Error?y.message:String(y)}`)}}match(s){if(typeof s!="string")throw new Error("URI must be a string");for(let y of this.templates){let g=Yi(s,y);if(g!==null)return{template:y.template,params:g}}return null}clear(){this.templates=[]}all(){return this.templates.map(s=>s.template)}};var Qi={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json",title:"MCP Description",description:"MCP Description 0.8.0 Release Candidate 3 (v0.8.0-rc.3; prerelease).",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var cs=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),M=new Map(cs.map((t,s)=>[t,s])),at="2025-11-25",Ys="2025-06-18",Ns=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),Qn=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function _s(t){return Ns.officialIdentifiers.includes(t)?"official":Ns.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function Qs(t){let s=t==="2020-12"?Ne:lt,y=new s({allErrors:!0,strict:!1});return _e(y),y}function mt(t){return[...t].sort((s,y)=>M.get(s)-M.get(y))}function $e(t,s,y){return mt(s?.protocolVersions??y??t.protocolVersions??[])}function Gi(t,s){let y=new Set(s);return t.filter(g=>y.has(g))}function Gn(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let y of Object.values(t.flows??{}))for(let g of Object.keys(y?.scopes??{}))s.add(g);return s}function so(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function io(t){let s=[];function y(g){if(Array.isArray(g))return g.map(y);if(!g||typeof g!="object")return g;let u={};for(let[a,e]of Object.entries(g)){if(a==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[a]=y(e)}return u}return{schema:y(t),externalReferences:s}}function T(t,s,y,g){if(!Array.isArray(g))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:y,path:g}}function Xn(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),y=s.split(".");if(y.length<2)return!1;let g=y[1].toLowerCase();return g==="modelcontextprotocol"||g==="mcp"}function ea(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let y=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?y.slice(0,-1).some(g=>["modelcontextprotocol","mcp"].includes(g.toLowerCase())):y.length>=2&&["modelcontextprotocol","mcp"].includes(y[1].toLowerCase())}function Xi(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function ta(t,s,y){let g=mt(t.protocolVersions??[]),u=g.filter(r=>M.get(r)0;else return!1;return m?c||y.push(T("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...l,r])):y.push(T("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...l,r])),!0}function e(r,p,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[l,m]of Object.entries(r)){if(!Qn.test(l)){y.push(T("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(l)}`,[...n,l]));continue}for(let c of o.filter(d=>M.get(d)>=M.get(Ys)))a(l,m,p,c,i,n)||ea(l,c)&&y.push(T("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(l)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,l]))}}for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{let n=$e(t,o,g),l=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...l,"_meta"]),r==="tools")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.content??[]).forEach((h,P)=>{let $=`${f}.content[${P}]`,q=[...b,"content",P];e(h?._meta,"content",n,`${$}._meta`,[...q,"_meta"]),h?.type==="resource"&&e(h.resource?._meta,"content",n,`${$}.resource._meta`,[...q,"resource","_meta"])})}else if(r!=="prompts")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.contents??[]).forEach((h,P)=>{e(h?._meta,"content",n,`${f}.contents[${P}]._meta`,[...b,"contents",P,"_meta"])})}})}function ra(t,s,y){let g=new Set;if((t.tags??[]).forEach((u,a)=>{if(g.has(u.name)){y.push(T("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",a,"name"]));return}g.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((e,r)=>{(e.tags??[]).forEach((p,o)=>{g.has(p)||y.push(T("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(p)}`,[u,r,"tags",o]))})})}function sa(t,s,y){let g=t.securitySchemes??{},u=new Set(Object.keys(g)),a=new Map(Object.entries(g).map(([r,p])=>[r,Gn(p)]));function e(r,p,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[l,m]of Object.entries(i)){if(!u.has(l)){y.push(T("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(l)}`,[...o,n,l]));continue}let c=g[l];if(!Array.isArray(m))continue;if(m.filter((f,b)=>m.indexOf(f)!==b).length&&y.push(T("duplicate-security-scope","error",`${p}[${n}].${l} contains duplicate scope values`,[...o,n,l])),(c.type==="http"||c.type==="apiKey")&&m.length>0&&y.push(T("non-oauth-scope-misuse","error",`${p}[${n}].${l} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,l])),c.type==="oauth2"||c.type==="openIdConnect"){let f=a.get(l)??new Set;m.forEach((b,h)=>{f.has(b)||y.push(T("uncatalogued-oauth-scope","warning",`${p}[${n}].${l} references scope ${JSON.stringify(b)} that is not present in the declared static scope catalogue`,[...o,n,l,h]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,p)=>{e(r.security,`transports[${p}].security`,["transports",p,"security"])});for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function ia(t,s,y){let g=mt(t.protocolVersions??[]),u=new Set;function a(r,p,o,i){let n=new Set(p);for(let l of r)n.has(l)||y.push(T("protocol-scope-outside-parent","error",`${o} includes protocol version ${l} outside its parent scope`,i))}(t.transports??[]).forEach((r,p)=>{let o=$e(t,r,g);a(o,g,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of g)u.has(r)||y.push(T("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,p)=>{let o=$e(t,r,g);a(o,g,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let r=0;r0&&y.push(T("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,p,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,l)=>{let m=n[o],c=$e(t,n,g);a(c,g,`${r}[${l}].protocolVersions`,[r,l,"protocolVersions"]),(n.elicitations??[]).forEach((f,b)=>{let h=$e(t,f,c);a(h,c,`${r}[${l}].elicitations[${b}].protocolVersions`,[r,l,"elicitations",b,"protocolVersions"])});let d=i.get(m)??[];for(let f of d){let b=Gi(c,f.scope);b.length>0&&y.push(T("primitive-scope-overlap","error",`${r}[${l}] with identifier ${JSON.stringify(m)} overlaps ${r}[${f.index}] for protocol versions ${b.join(", ")}`,[r,l,"protocolVersions"]))}d.push({index:l,scope:c}),i.set(m,d)})}}function oa(t,s,y){let g=mt(t.protocolVersions??[]);function u(a,e,r,p){if(!a||typeof a!="object"||Array.isArray(a))return;e==="2025-06-18"&&Object.hasOwn(a,"$schema")&&y.push(T("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(a.properties??{}));(a.required??[]).forEach((i,n)=>{o.has(i)||y.push(T("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(a.properties??{})){let l=`${r}.properties[${JSON.stringify(i)}]`,m=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&y.push(T("elicitation-form-schema-version-mismatch","error",`${l} uses an enum form introduced after MCP ${e}`,m)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&y.push(T("elicitation-form-schema-version-mismatch","error",`${l}.default is not defined for this property type in MCP ${e}`,[...m,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&y.push(T("elicitation-form-enum-names-mismatch","error",`${l}.enumNames must contain one display name for every enum value`,[...m,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(d=>d.const):void 0;if(c&&!c.includes(n.default)&&y.push(T("elicitation-form-default-outside-enum","error",`${l}.default must be one of the declared enum values`,[...m,"default"])),n.type==="array"){let d=n.items?.enum??n.items?.anyOf?.map(f=>f.const);Array.isArray(d)&&n.default.some(f=>!d.includes(f))&&y.push(T("elicitation-form-default-outside-enum","error",`${l}.default contains a value outside the declared enum values`,[...m,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&y.push(T("elicitation-form-invalid-range","error",`${l}.minLength must not exceed maxLength`,[...m,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&y.push(T("elicitation-form-invalid-range","error",`${l}.minimum must not exceed maximum`,[...m,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&y.push(T("elicitation-form-invalid-range","error",`${l}.minItems must not exceed maxItems`,[...m,"minItems"]))}}}for(let[a,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,p)=>{let o=$e(t,r,g),i=new Set;(r.elicitations??[]).forEach((n,l)=>{let m=`${a}[${p}].elicitations[${l}]`,c=[a,p,"elicitations",l];i.has(n.name)&&y.push(T("duplicate-elicitation-name","error",`${m}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let d=$e(t,n,o);for(let f of d)M.get(f){let p=$e(t,e,g);if(e.type==="streamable-http")for(let o of p)M.get(o)>=M.get("2025-03-26")||y.push(T("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of p)M.get(o){let p=$e(t,e,g),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",p),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${r}]`,o,e,"_meta","2025-06-18",p),u(`tools[${r}]`,o,e,"annotations","2025-03-26",p),a(`tools[${r}]`,o,e,"execution","2025-11-25",p),u(`tools[${r}]`,o,e,"icons","2025-11-25",p)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((p,o)=>{let i=$e(t,p,g),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let l of i)M.get(l)>=M.get("2025-06-18")||y.push(T("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${l}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((l,m)=>{u(`${e}[${o}].arguments[${m}]`,[...n,"arguments",m],l,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let p=$e(t,e,g),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&y.push(T("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)M.get(i)y(i,`${u}.${o}[${n}]`,[...a,o,n],!1,!1));for(let o of aa){let i=g[o];Array.isArray(i)?i.forEach((n,l)=>y(n,`${u}.${o}[${l}]`,[...a,o,l],!1,!1)):y(i,`${u}.${o}`,[...a,o],!1,!1)}let p=g.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||y(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...a,"dependencies",o],!1,!1)}return y(t,"inputSchema",["inputSchema"],!0,!1),s}function fa(t,s,y,g,u){let a=ua(t.inputSchema);if(!a.length)return;for(let r of y)r!=="2026-07-28"&&u.push(T("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of a){let p=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(T("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(T("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(T("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(T("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function ca(t,s,y,g,u){if(Object.hasOwn(t,"properties")){let a=t.properties;if(!a||typeof a!="object"||Array.isArray(a))u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${at}`,[...y,"properties"]));else for(let[e,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)||u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${at}`,[...y,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(a=>typeof a!="string"))&&u.push(T("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${at}`,[...y,"required"]))}function ya(t,s,y){let g=mt(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{let e=$e(t,u,g);for(let r of["inputSchema","outputSchema"]){let p=u[r];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${a}].${r}`,i=["tools",a,r],n=e.some(m=>M.get(m)M.get(m)>=M.get(at));if(Object.hasOwn(p,"$schema"))for(let m of e)M.get(m)>=M.get(at)||y.push(T("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${m}; it requires ${at} or later`,[...i,"$schema"]));if(n&&ca(p,o,i,s,y),l){let m=so(p);if(!m)y.push(T("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=Qs(m);try{if(c.validateSchema(p,!0))c.compile(p);else{let d=c.errors?.map(f=>`${f.instancePath||"/"} ${f.message}`).join("; ")??"unknown meta-schema error";y.push(T("invalid-tool-schema","error",`${o} is not valid JSON Schema ${m}: ${d}`,i))}}catch(d){let f=io(p);try{if(!f.externalReferences.length)throw d;Qs(m).compile(f.schema);let b=[...new Set(f.externalReferences)].sort();y.push(T("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${b.map(h=>JSON.stringify(h)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(b){y.push(T("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${m}: ${b.message}`,i))}}}}if(r==="outputSchema"&&p.type!=="object")for(let m of e)m!=="2026-07-28"&&y.push(T("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${m}`,[...i,"type"]))}fa(u,a,e,s,y)})}function eo(t,s,y,g,u,a){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){a.push(T("tool-example-schema-mismatch","error",`${y} must be an object`,g));return}for(let e of t.required??[])Object.hasOwn(s,e)||a.push(T("tool-example-schema-mismatch","error",`${y} is missing required property ${JSON.stringify(e)}`,[...g,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||a.push(T("tool-example-schema-mismatch","error",`${y} contains undeclared property ${JSON.stringify(e)}`,[...g,e]))}function to(t,s,y,g,u,a){let e=so(t);if(!e)return;let r=io(t);if(r.externalReferences.length){let p=[...new Set(r.externalReferences)].sort();a.push(T("incomplete-tool-example-validation","warning",`${y} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,g));return}try{let p=Qs(e).compile(t);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";a.push(T("tool-example-schema-mismatch","error",`${y} does not validate against its associated Tool schema: ${o}`,g))}}catch{}}function da(t,s,y){let g=mt(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=$e(t,u,g),r=e.filter(o=>M.get(o)M.get(o)>=M.get(at));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${a}].examples[${JSON.stringify(o)}]`,l=["tools",a,"examples",o],m=i.result??{},c=[...l,"result"],d=m.isError!==!0;for(let f of["jsonrpc","id","error"])Object.hasOwn(m,f)&&y.push(T("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(f)}`,[...c,f]));for(let f of["task","inputRequests","requestState"])Object.hasOwn(m,f)&&y.push(T("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(f)}`,[...c,f]));for(let f of e){let b=`${n}.result`;f==="2026-07-28"&&m.resultType!=="complete"&&y.push(T("tool-example-result-version-mismatch","error",`${b}.resultType must be "complete" for MCP ${f}`,[...c,"resultType"])),f!=="2026-07-28"&&Object.hasOwn(m,"resultType")&&y.push(T("tool-example-result-version-mismatch","error",`${b}.resultType is not defined for MCP ${f}`,[...c,"resultType"])),Object.hasOwn(m,"structuredContent")&&M.get(f){let $=`${b}.content[${P}]`,q=[...c,"content",P];h.type==="audio"&&M.get(f){Object.hasOwn(r,"_meta")&&M.get(e){let n=`${g}.result.contents[${i}]`,l=[...u,"result","contents",i];if(o.uri===s&&(p=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(T("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...l,"mimeType"])),t.size!==void 0)){let m=typeof o.text=="string"?ma.encode(o.text).byteLength:typeof o.blob=="string"&&ro(o.blob)?ha(o.blob):void 0;m!==void 0&&m!==t.size&&e.push(T("resource-example-size-mismatch","warning",`${n} contains ${m} raw bytes, which differs from the declared Resource size ${t.size}`,l))}typeof o.blob=="string"&&!ro(o.blob)&&e.push(T("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...l,"blob"]))}),p||e.push(T("resource-example-requested-uri-not-returned","warning",`${g}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function $a(t,s,y){let g=mt(t.protocolVersions??[]);for(let[u,a]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])a.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=$e(t,e,g),o;if(u==="resourceTemplates")try{o=new Ie,o.add(e.uriTemplate)}catch(i){o=void 0,y.push(T("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${u}[${r}].examples[${JSON.stringify(i)}]`,m=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let d=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof d=="string"&&o&&!o.match(d)&&y.push(T("resource-template-example-invalid-expansion","error",`${l}.uri ${JSON.stringify(d)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...m,"uri"])),ga(c,p,`${l}.result`,[...m,"result"],s,y),typeof d=="string"&&ba(e,d,c,l,m,s,y)}})}function Gs(t,s="document"){let y=[];return ia(t,s,y),sa(t,s,y),ra(t,s,y),na(t,s,y),oa(t,s,y),ta(t,s,y),ya(t,s,y),da(t,s,y),$a(t,s,y),y.sort((g,u)=>g.code.localeCompare(u.code)||g.message.localeCompare(u.message)||JSON.stringify(g.path).localeCompare(JSON.stringify(u.path))),y}var ei="__interaction_example__",ri=new Ne({allErrors:!0,strict:!1});_e(ri);var ao=new lt({allErrors:!0,strict:!1});_e(ao);var oo=ri.compile(Qi),po=["tools","resources","resourceTemplates","prompts"],Pa=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],va=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),se=new Map(cs.map((t,s)=>[t,s])),wa={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function U(t,s,y,g){return{code:t,severity:s,message:y,path:g}}function ja(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function ys(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function Xs(t,s,y,g){return{code:t,severity:"error",message:`${s}.${g.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${y}`,path:g}}function si(t,s="document"){let y=structuredClone(t),g=[],u=[],a=0;function e(p,o,i,n=[]){let l=/^#\/components\/([^/]+)\/([^/]+)$/.exec(p?.$componentRef??"");if(!l)return p;let[,m,c]=l;if(m!==o)return g.push(Xs("wrong-component-reference-namespace",s,`must target #/components/${o}, not #/components/${m}`,i)),{value:p};let d=`${m}/${c}`;if(n.includes(d))return g.push(Xs("component-reference-cycle",s,`forms a cycle through ${[...n,d].join(" -> ")}`,i)),{value:p};let f=t?.components?.[m]?.[c];return f===void 0?(g.push(Xs("missing-component-reference-target",s,`targets missing component ${JSON.stringify(p.$componentRef)}`,i)),{value:p}):(a+=1,ys(f)?e(f,o,i,[...n,d]):{value:structuredClone(f),targetPath:["components",m,c]})}function r(p,o,i,n=[]){let l=e(p,o,i,n);return l.targetPath&&u.push({referencePath:i,targetPath:l.targetPath}),l.value}for(let p of Pa)for(let[o,i]of Object.entries(t?.components?.[p]??{}))ys(i)&&(y.components[p][o]=r(i,p,["components",p,o],[`${p}/${o}`]));for(let[p,o]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[i,n]of(o??[]).entries()){let l=y[p][i];if(p==="tools")for(let c of["inputSchema","outputSchema"])ys(n[c])&&(l[c]=r(n[c],"schemas",[p,i,c]));let m=p==="tools"?"toolExamples":p==="resources"?"resourceExamples":p==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[c,d]of Object.entries(n.examples??{}))ys(d)&&(l.examples[c]=r(d,m,[p,i,"examples",c]))}for(let p of po)for(let[o,i]of(t?.[p]??[]).entries())for(let[n,l]of(i.elicitations??[]).entries())ys(l.requestedSchema)&&(y[p][o].elicitations[n].requestedSchema=r(l.requestedSchema,"schemas",[p,o,"elicitations",n,"requestedSchema"]));return{document:y,diagnostics:g,substitutions:a,provenance:u}}function ka(t,s){let y=s.instancePath?s.instancePath.slice(1).split("/").map(g=>g.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?y.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&y.push(s.params.additionalProperty),y.map(g=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(g)?Number(g):g)}function lo(t){return oo(t)?[]:(oo.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:ka(t,s)}))}function ti(t){return Array.isArray(t)?t.map(ti):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[y])=>s.localeCompare(y)).map(([s,y])=>[s,ti(y)])):t}function no(t){return JSON.stringify(ti(t))}function Oa(t,s,y){if(!Array.isArray(t.path))return t;let g=["tools",0,"examples",ei];return g.every((a,e)=>t.path[e]===a)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(ei)}]`,`tools[${s}].interactionExamples[${JSON.stringify(y)}]`),path:["tools",s,"interactionExamples",y,...t.path.slice(g.length)]}:t}function qa(t,s,y,g,u){let a={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[ei]:{input:structuredClone(g.input),result:structuredClone(g.result)}}}]};return Gs(a).map(e=>Oa(e,s,y)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function xa(t,s,y,g,u){try{let a=ri.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(U("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{try{let a=ao.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(U("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{}}}function Aa(t,s,y,g,u){let a=t.clientRequirements;if(!a||typeof a!="object"||Array.isArray(a))return;function e(r,p){u.push(U("interaction-example-client-requirements-contradiction","warning",`${y} ${r}`,p))}if(s.type==="roots"){Object.hasOwn(a,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...g,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(a,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...g,"type"]);return}let r=a.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...g,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...g,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(a,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...g,"type"]);return}let r=a.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...g,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...g,"request","mode"])}}function Ea(t){let s=[],y=t.protocolVersions??[];for(let[g,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let a=u.protocolVersions??y;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let p=`tools[${g}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",g,"interactionExamples",e];s.push(...qa(u,g,e,r,a));for(let[i,n]of(r.steps??[]).entries()){let l=`${p}.steps[${i}]`,m=[...o,"steps",i];if(Aa(u,n,l,m,s),n.type==="elicitation"){let c=n.request??{},d=n.response??{},f=typeof n.declaration=="string"?(u.elicitations??[]).find(b=>b.name===n.declaration):void 0;for(let b of a)se.get(b)[r.name,r]));for(let[r,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${g}].examples[${JSON.stringify(r)}]`,i=["prompts",g,"examples",r],n=p.result??{},l=[...i,"result"],m=p.arguments;if(m&&typeof m=="object"&&!Array.isArray(m))for(let[c]of Object.entries(m))e.has(c)||s.push(U("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,d]of e)d.required===!0&&!Object.hasOwn(m??{},c)&&s.push(U("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(U("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...l,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(U("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...l,c]));for(let c of a){let d=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(U("prompt-example-result-version-mismatch","error",`${d}.resultType must be "complete" for MCP ${c}`,[...l,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(U("prompt-example-result-version-mismatch","error",`${d}.resultType is not defined for MCP ${c}`,[...l,"resultType"])),Object.hasOwn(n,"_meta")&&se.get(c){let h=`${d}.messages[${b}].content`,P=[...l,"messages",b,"content"];Na(f.content??{},h,P,c,s)})}}}return s}function Ia(t){let s=new Ie;return s.add(t),new Set(s.templates.flatMap(y=>y.parts).filter(y=>y.type==="expression").flatMap(y=>y.expressions.map(g=>g.name)))}function Ta(t,s,y,g,u){let a=`${s}.result`,e=[...y,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(U("completion-example-json-rpc-envelope","error",`${a} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(U("incomplete-completion-example-result","error",`${a} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));g==="2026-07-28"&&t.resultType!=="complete"&&u.push(U("completion-example-result-version-mismatch","error",`${a}.resultType must be "complete" for MCP ${g}`,[...e,"resultType"])),g!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(U("completion-example-result-version-mismatch","error",`${a}.resultType is not defined for MCP ${g}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&se.get(g)i.name));else try{o=Ia(e.uriTemplate)}catch(i){s.push(U("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[g,a,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${p}.completionExamples[${JSON.stringify(i)}]`,m=[g,a,"completionExamples",i],c=n.argument?.name,d=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(U(g==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",g==="prompts"?`${l}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${l}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...m,"argument","name"])),d&&typeof d=="object"&&!Array.isArray(d))for(let b of Object.keys(d))o&&!o.has(b)&&s.push(U(g==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",g==="prompts"?`${l}.context.arguments contains undeclared Prompt argument ${JSON.stringify(b)}`:`${l}.context.arguments contains no RFC 6570 variable ${JSON.stringify(b)} from ${JSON.stringify(e.uriTemplate)}`,[...m,"context","arguments",b])),b===c&&s.push(U("completion-example-duplicate-target-context","error",`${l}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(b)}`,[...m,"context","arguments",b]));let f=n.result??{};for(let b of r){if(se.get(b)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function mo(t){let s=lo(t);return s.length?s:Ra(t)}var ii="0.8.0-rc.3",Da="v0.8.0-rc.3",Za="a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4";function Ca(t){let s=mo(t);return{valid:!s.some(y=>y.severity==="error"),diagnostics:s}}var hi={};$i(hi,{schemaSha256:()=>Ep,snapshotTag:()=>Ap,specification:()=>di,supportedProtocolVersions:()=>ds,validate:()=>zp});var uo={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json",title:"MCP Server Description (mcpdesc format)",description:"A static, curated description of what an MCP server offers. Uses MCP-native terminology, an OpenAPI-aligned info and security structure, and support for multiple transports, protocol revisions, and specification extensions. Supports MCP protocol revisions 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, and 2026-07-28.",type:"object",required:["mcpdesc","info","protocolVersions"],additionalProperties:!1,properties:{$schema:{type:"string"},capabilities:{items:{$ref:"#/$defs/capabilities"},minItems:1,type:"array"},components:{$ref:"#/$defs/components"},info:{$ref:"#/$defs/info"},instructions:{type:"string"},mcpdesc:{const:"0.8.0",type:"string"},prompts:{items:{$ref:"#/$defs/prompt"},minItems:1,type:"array"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resourceTemplates:{items:{$ref:"#/$defs/resourceTemplate"},minItems:1,type:"array"},resources:{items:{$ref:"#/$defs/resource"},minItems:1,type:"array"},security:{$ref:"#/$defs/securityRequirementArray"},securitySchemes:{$ref:"#/$defs/securitySchemeMap"},tags:{items:{$ref:"#/$defs/tag"},minItems:1,type:"array"},tools:{items:{$ref:"#/$defs/tool"},minItems:1,type:"array"},transports:{items:{$ref:"#/$defs/transport"},minItems:1,type:"array"}},patternProperties:{"^x-":{$ref:"#/$defs/jsonValue"}},$defs:{capabilities:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{completions:{additionalProperties:!0,type:"object"},experimental:{additionalProperties:!0,type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},logging:{additionalProperties:!0,type:"object"},prompts:{$ref:"#/$defs/capabilityPrompts"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},resources:{$ref:"#/$defs/capabilityResources"},tasks:{additionalProperties:!1,properties:{cancel:{additionalProperties:!0,type:"object"},list:{additionalProperties:!0,type:"object"},requests:{additionalProperties:!1,properties:{tools:{additionalProperties:!1,properties:{call:{additionalProperties:!0,type:"object"}},type:"object"}},type:"object"}},type:"object"},tools:{$ref:"#/$defs/capabilityTools"}},type:"object"},capabilityPrompts:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},capabilityResources:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"},subscribe:{type:"boolean"}},type:"object"},capabilityTools:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{listChanged:{type:"boolean"}},type:"object"},clientCapabilityRequirements:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{elicitation:{$ref:"#/$defs/clientCapabilityValue"},experimental:{additionalProperties:{$ref:"#/$defs/clientCapabilityValue"},type:"object"},extensions:{$ref:"#/$defs/extensionCapabilities"},roots:{$ref:"#/$defs/clientCapabilityValue"},sampling:{$ref:"#/$defs/clientCapabilityValue"},tasks:{$ref:"#/$defs/clientCapabilityValue"}},type:"object"},clientCapabilityValue:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},completedCompletionResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},completion:{$ref:"#/$defs/completionResult"},resultType:{const:"complete"}},required:["completion"],type:"object"},completedPromptResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},description:{type:"string"},messages:{items:{$ref:"#/$defs/promptMessageExample"},type:"array"},resultType:{const:"complete"}},required:["messages"],type:"object"},completedReadResourceResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},cacheScope:{enum:["public","private"]},contents:{items:{$ref:"#/$defs/resourceContents"},minItems:1,type:"array"},resultType:{const:"complete"},ttlMs:{minimum:0,type:"number"}},required:["contents"],type:"object"},completedToolResultExample:{additionalProperties:!0,properties:{_meta:{$ref:"#/$defs/metaObject"},content:{items:{$ref:"#/$defs/toolResultContent"},type:"array"},isError:{type:"boolean"},resultType:{const:"complete"},structuredContent:{$ref:"#/$defs/jsonValue"}},required:["content"],type:"object"},completionArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},value:{type:"string"}},required:["name","value"],type:"object"},completionContext:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},minProperties:1,type:"object"}},required:["arguments"],type:"object"},completionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{argument:{$ref:"#/$defs/completionArgument"},context:{$ref:"#/$defs/completionContext"},result:{$ref:"#/$defs/completedCompletionResultExample"}},required:["argument","result"],type:"object"},completionExamples:{additionalProperties:{$ref:"#/$defs/completionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},completionResult:{additionalProperties:!0,properties:{hasMore:{type:"boolean"},total:{minimum:0,type:"integer"},values:{items:{type:"string"},maxItems:100,type:"array"}},required:["values"],type:"object"},componentMap:{minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},components:{additionalProperties:!1,minProperties:1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{promptExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]}}]},resourceExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]}}]},resourceTemplateExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]}}]},schemas:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{$ref:"#/$defs/schemaComponentValue"}}]},toolExamples:{allOf:[{$ref:"#/$defs/componentMap"},{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]}}]}},type:"object"},contact:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{email:{format:"email",type:"string"},name:{type:"string"},url:{format:"uri",type:"string"}},type:"object"},elicitationDeclaration:{additionalProperties:!1,oneOf:[{not:{required:["url"]},properties:{mode:{const:"form"}},required:["requestedSchema"]},{not:{required:["requestedSchema"]},properties:{mode:{const:"url"}}}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{message:{minLength:1,type:"string"},mode:{enum:["form","url"]},name:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},onCancel:{minLength:1,type:"string"},onDecline:{minLength:1,type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},requestedSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/elicitationFormSchema"}]},url:{format:"uri",type:"string"},when:{minLength:1,type:"string"}},required:["name","mode","message"],type:"object"},elicitationFormOption:{additionalProperties:!1,properties:{const:{type:"string"},title:{type:"string"}},required:["const","title"],type:"object"},elicitationFormProperty:{oneOf:[{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},format:{enum:["email","uri","date","date-time"]},maxLength:{minimum:0,type:"integer"},minLength:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"string"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"number"},description:{type:"string"},maximum:{type:"number"},minimum:{type:"number"},title:{type:"string"},type:{enum:["number","integer"]}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"boolean"},description:{type:"string"},title:{type:"string"},type:{const:"boolean"}},required:["type"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},enum:{items:{type:"string"},type:"array"},enumNames:{items:{type:"string"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{default:{type:"string"},description:{type:"string"},oneOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"},title:{type:"string"},type:{const:"string"}},required:["type","oneOf"],type:"object"},{additionalProperties:!1,properties:{default:{items:{type:"string"},type:"array"},description:{type:"string"},items:{oneOf:[{additionalProperties:!1,properties:{enum:{items:{type:"string"},type:"array"},type:{const:"string"}},required:["type","enum"],type:"object"},{additionalProperties:!1,properties:{anyOf:{items:{$ref:"#/$defs/elicitationFormOption"},type:"array"}},required:["anyOf"],type:"object"}]},maxItems:{minimum:0,type:"integer"},minItems:{minimum:0,type:"integer"},title:{type:"string"},type:{const:"array"}},required:["type","items"],type:"object"}]},elicitationFormSchema:{additionalProperties:!1,properties:{$schema:{format:"uri",type:"string"},properties:{additionalProperties:{$ref:"#/$defs/elicitationFormProperty"},type:"object"},required:{items:{type:"string"},type:"array",uniqueItems:!0},type:{const:"object"}},required:["type","properties"],type:"object"},elicitationInteractionAcceptedResponse:{additionalProperties:!1,properties:{action:{const:"accept"},content:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"}},required:["action"],type:"object"},elicitationInteractionDeclinedResponse:{additionalProperties:!1,properties:{action:{enum:["decline","cancel"]}},required:["action"],type:"object"},elicitationInteractionFormRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"form"},requestedSchema:{$ref:"#/$defs/elicitationFormSchema"}},required:["mode","message","requestedSchema"],type:"object"},elicitationInteractionRequest:{oneOf:[{$ref:"#/$defs/elicitationInteractionFormRequest"},{$ref:"#/$defs/elicitationInteractionUrlRequest"}]},elicitationInteractionResponse:{oneOf:[{$ref:"#/$defs/elicitationInteractionAcceptedResponse"},{$ref:"#/$defs/elicitationInteractionDeclinedResponse"}]},elicitationInteractionUrlRequest:{additionalProperties:!1,properties:{message:{minLength:1,type:"string"},mode:{const:"url"},url:{format:"uri",type:"string"}},required:["mode","message","url"],type:"object"},execution:{additionalProperties:!1,properties:{taskSupport:{enum:["forbidden","optional","required"],type:"string"}},type:"object"},extensionCapabilities:{additionalProperties:{type:"object"},minProperties:1,propertyNames:{pattern:"^[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*/[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?$"},type:"object"},icon:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{mimeType:{type:"string"},sizes:{items:{type:"string"},type:"array"},src:{format:"uri",type:"string"},theme:{enum:["light","dark"],type:"string"}},required:["src"],type:"object"},icons:{items:{$ref:"#/$defs/icon"},minItems:1,type:"array"},info:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{contact:{$ref:"#/$defs/contact"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},id:{type:"string"},license:{$ref:"#/$defs/license"},name:{minLength:1,type:"string"},title:{type:"string"},version:{minLength:1,type:"string"},websiteUrl:{format:"uri",type:"string"}},required:["name","version"],type:"object"},jsonSchemaObject:{additionalProperties:!0,type:"object"},jsonValue:{oneOf:[{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},{items:{$ref:"#/$defs/jsonValue"},type:"array"},{type:"string"},{type:"number"},{type:"boolean"},{type:"null"}]},license:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{name:{type:"string"},url:{format:"uri",type:"string"}},required:["name"],type:"object"},metaObject:{additionalProperties:!0,propertyNames:{pattern:"^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$"},type:"object"},oauthFlow:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationUrl:{format:"uri",type:"string"},refreshUrl:{format:"uri",type:"string"},scopes:{additionalProperties:{type:"string"},type:"object"},tokenUrl:{format:"uri",type:"string"}},required:["scopes"],type:"object"},oauthFlows:{additionalProperties:!1,anyOf:[{required:["implicit"]},{required:["password"]},{required:["clientCredentials"]},{required:["authorizationCode"]}],patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{authorizationCode:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl","tokenUrl"]}]},clientCredentials:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]},implicit:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["authorizationUrl"]}]},password:{allOf:[{$ref:"#/$defs/oauthFlow"},{required:["tokenUrl"]}]}},type:"object"},prompt:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},arguments:{items:{$ref:"#/$defs/promptArgument"},minItems:1,type:"array"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/promptExamples"},icons:{$ref:"#/$defs/icons"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name"],type:"object"},promptArgument:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{type:"string"},required:{type:"boolean"},title:{type:"string"}},required:["name"],type:"object"},promptExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{arguments:{additionalProperties:{type:"string"},type:"object"},result:{$ref:"#/$defs/completedPromptResultExample"}},required:["result"],type:"object"},promptExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/promptExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},promptMessageExample:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/toolResultContent"},role:{enum:["user","assistant"],type:"string"}},required:["role","content"],type:"object"},protocolVersionScope:{items:{$ref:"#/$defs/supportedProtocolVersion"},minItems:1,type:"array",uniqueItems:!0},referenceObject:{additionalProperties:!1,properties:{$componentRef:{pattern:"^#/components/(schemas|toolExamples|resourceExamples|resourceTemplateExamples|promptExamples)/[A-Za-z0-9._-]+$",type:"string"}},required:["$componentRef"],type:"object"},resource:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},size:{type:"number"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uri:{type:"string"}},required:["uri","name"],type:"object"},resourceAnnotations:{additionalProperties:!0,properties:{audience:{items:{enum:["user","assistant"],type:"string"},type:"array"},lastModified:{type:"string"},priority:{maximum:1,minimum:0,type:"number"}},type:"object"},resourceContents:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},mimeType:{type:"string"},text:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},blob:{type:"string"},mimeType:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri","blob"],type:"object"}]},resourceExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"}},required:["result"],type:"object"},resourceExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},resourceTemplate:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},completionExamples:{$ref:"#/$defs/completionExamples"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/resourceTemplateExamples"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"},uriTemplate:{type:"string"}},required:["uriTemplate","name"],type:"object"},resourceTemplateExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{result:{$ref:"#/$defs/completedReadResourceResultExample"},uri:{format:"uri",type:"string"}},required:["uri","result"],type:"object"},resourceTemplateExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/resourceTemplateExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},rootDeclaration:{additionalProperties:!1,properties:{name:{type:"string"},uri:{format:"uri",type:"string"}},required:["uri"],type:"object"},rootsListRequest:{additionalProperties:!1,maxProperties:0,type:"object"},rootsListResult:{additionalProperties:!1,properties:{roots:{items:{$ref:"#/$defs/rootDeclaration"},type:"array"}},required:["roots"],type:"object"},samplingContentBlock:{oneOf:[{$ref:"#/$defs/toolResultContent"},{$ref:"#/$defs/samplingToolUseContent"},{$ref:"#/$defs/samplingToolResultContent"}]},samplingCreateMessageRequest:{additionalProperties:!1,properties:{includeContext:{enum:["none","thisServer","allServers"]},maxTokens:{minimum:1,type:"integer"},messages:{items:{$ref:"#/$defs/samplingMessage"},minItems:1,type:"array"},metadata:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},modelPreferences:{$ref:"#/$defs/samplingModelPreferences"},stopSequences:{items:{type:"string"},type:"array"},systemPrompt:{type:"string"},temperature:{type:"number"},toolChoice:{$ref:"#/$defs/samplingToolChoice"},tools:{items:{$ref:"#/$defs/samplingRequestTool"},minItems:1,type:"array"}},required:["messages","maxTokens"],type:"object"},samplingCreateMessageResult:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},model:{type:"string"},role:{const:"assistant"},stopReason:{type:"string"}},required:["role","content","model"],type:"object"},samplingMessage:{additionalProperties:!1,properties:{content:{$ref:"#/$defs/samplingMessageContent"},role:{enum:["user","assistant"]}},required:["role","content"],type:"object"},samplingMessageContent:{oneOf:[{$ref:"#/$defs/samplingContentBlock"},{items:{$ref:"#/$defs/samplingContentBlock"},minItems:1,type:"array"}]},samplingModelHint:{additionalProperties:!1,properties:{name:{minLength:1,type:"string"}},required:["name"],type:"object"},samplingModelPreferences:{additionalProperties:!1,properties:{costPriority:{maximum:1,minimum:0,type:"number"},hints:{items:{$ref:"#/$defs/samplingModelHint"},minItems:1,type:"array"},intelligencePriority:{maximum:1,minimum:0,type:"number"},speedPriority:{maximum:1,minimum:0,type:"number"}},type:"object"},samplingRequestTool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{annotations:{$ref:"#/$defs/toolAnnotations"},description:{type:"string"},inputSchema:{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]},name:{minLength:1,type:"string"},title:{type:"string"}},required:["name","inputSchema"],type:"object"},samplingToolChoice:{additionalProperties:!1,properties:{mode:{enum:["auto","required","none"]}},required:["mode"],type:"object"},samplingToolResultContent:{additionalProperties:!1,properties:{content:{oneOf:[{$ref:"#/$defs/toolResultContent"},{items:{$ref:"#/$defs/toolResultContent"},minItems:1,type:"array"}]},isError:{type:"boolean"},toolUseId:{type:"string"},type:{const:"tool_result"}},required:["type","toolUseId","content"],type:"object"},samplingToolUseContent:{additionalProperties:!1,properties:{id:{type:"string"},input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},name:{type:"string"},type:{const:"tool_use"}},required:["type","id","name","input"],type:"object"},schemaComponentValue:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/jsonSchemaObject"},{not:{required:["$componentRef"]}}]}]},securityRequirement:{additionalProperties:{items:{type:"string"},type:"array",uniqueItems:!0},propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},securityRequirementArray:{items:{$ref:"#/$defs/securityRequirement"},type:"array"},securityScheme:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{bearerFormat:{type:"string"},description:{type:"string"},scheme:{type:"string"},type:{const:"http"}},required:["type","scheme"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},in:{enum:["header","query","cookie"],type:"string"},name:{type:"string"},type:{const:"apiKey"}},required:["type","name","in"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},flows:{$ref:"#/$defs/oauthFlows"},type:{const:"oauth2"}},required:["type","flows"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},openIdConnectUrl:{format:"uri",type:"string"},type:{const:"openIdConnect"}},required:["type","openIdConnectUrl"],type:"object"}]},securitySchemeMap:{additionalProperties:{$ref:"#/$defs/securityScheme"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},specificationExtensionValue:{$ref:"#/$defs/jsonValue"},supportedProtocolVersion:{enum:["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"],type:"string"},tag:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{description:{type:"string"},name:{minLength:1,type:"string"}},required:["name"],type:"object"},tool:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/toolAnnotations"},clientRequirements:{$ref:"#/$defs/clientCapabilityRequirements"},deprecated:{type:"boolean"},description:{type:"string"},elicitations:{items:{$ref:"#/$defs/elicitationDeclaration"},minItems:1,type:"array"},examples:{$ref:"#/$defs/toolExamples"},execution:{$ref:"#/$defs/execution"},icons:{$ref:"#/$defs/icons"},inputSchema:{oneOf:[{$ref:"#/$defs/referenceObject"},{allOf:[{$ref:"#/$defs/schemaComponentValue"},{properties:{type:{const:"object"}},required:["type"]}]}]},interactionExamples:{$ref:"#/$defs/toolInteractionExamples"},name:{minLength:1,type:"string"},outputSchema:{$ref:"#/$defs/schemaComponentValue"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},tags:{items:{type:"string"},minItems:1,type:"array",uniqueItems:!0},title:{type:"string"}},required:["name","inputSchema"],type:"object"},toolAnnotations:{additionalProperties:!0,properties:{destructiveHint:{type:"boolean"},idempotentHint:{type:"boolean"},openWorldHint:{type:"boolean"},readOnlyHint:{type:"boolean"},title:{type:"string"}},type:"object"},toolExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"}},required:["input","result"],type:"object"},toolExamples:{additionalProperties:{oneOf:[{$ref:"#/$defs/referenceObject"},{$ref:"#/$defs/toolExample"}]},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionElicitationStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{declaration:{pattern:"^[A-Za-z0-9._-]+$",type:"string"},request:{$ref:"#/$defs/elicitationInteractionRequest"},response:{$ref:"#/$defs/elicitationInteractionResponse"},type:{const:"elicitation"}},required:["type","request","response"],type:"object"},toolInteractionExample:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{input:{additionalProperties:{$ref:"#/$defs/jsonValue"},type:"object"},result:{$ref:"#/$defs/completedToolResultExample"},steps:{items:{$ref:"#/$defs/toolInteractionStep"},minItems:1,type:"array"}},required:["input","steps","result"],type:"object"},toolInteractionExamples:{additionalProperties:{$ref:"#/$defs/toolInteractionExample"},minProperties:1,propertyNames:{pattern:"^[A-Za-z0-9._-]+$"},type:"object"},toolInteractionRootsStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/rootsListRequest"},response:{$ref:"#/$defs/rootsListResult"},type:{const:"roots"}},required:["type","request","response"],type:"object"},toolInteractionSamplingStep:{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{request:{$ref:"#/$defs/samplingCreateMessageRequest"},response:{$ref:"#/$defs/samplingCreateMessageResult"},type:{const:"sampling"}},required:["type","request","response"],type:"object"},toolInteractionStep:{oneOf:[{$ref:"#/$defs/toolInteractionElicitationStep"},{$ref:"#/$defs/toolInteractionSamplingStep"},{$ref:"#/$defs/toolInteractionRootsStep"}]},toolResultContent:{oneOf:[{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},text:{type:"string"},type:{const:"text"}},required:["type","text"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},data:{type:"string"},mimeType:{type:"string"},type:{enum:["image","audio"]}},required:["type","data","mimeType"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},resource:{$ref:"#/$defs/resourceContents"},type:{const:"resource"}},required:["type","resource"],type:"object"},{additionalProperties:!1,properties:{_meta:{$ref:"#/$defs/metaObject"},annotations:{$ref:"#/$defs/resourceAnnotations"},description:{type:"string"},icons:{$ref:"#/$defs/icons"},mimeType:{type:"string"},name:{type:"string"},size:{type:"number"},title:{type:"string"},type:{const:"resource_link"},uri:{format:"uri",type:"string"}},required:["type","uri","name"],type:"object"}]},transport:{oneOf:[{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"streamable-http"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{args:{items:{type:"string"},type:"array"},command:{type:"string"},env:{additionalProperties:{type:"string"},type:"object"},protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"stdio"}},required:["type","command"],type:"object"},{additionalProperties:!1,patternProperties:{"^x-":{$ref:"#/$defs/specificationExtensionValue"}},properties:{protocolVersions:{$ref:"#/$defs/protocolVersionScope"},security:{$ref:"#/$defs/securityRequirementArray"},type:{const:"sse"},url:{format:"uri",type:"string"}},required:["type","url"],type:"object"}]}}};var ds=Object.freeze(["2024-11-05","2025-03-26","2025-06-18","2025-11-25","2026-07-28"]),L=new Map(ds.map((t,s)=>[t,s])),pt="2025-11-25",ni="2025-06-18",ai=Object.freeze({effectiveDate:"2026-09-04",source:"https://modelcontextprotocol.io/extensions/overview",officialIdentifiers:Object.freeze(["io.modelcontextprotocol/enterprise-managed-authorization","io.modelcontextprotocol/oauth-client-credentials","io.modelcontextprotocol/tasks","io.modelcontextprotocol/ui"]),experimentalIdentifiers:Object.freeze([])}),Ma=/^(?:(?:[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)(?:\.[A-Za-z](?:[A-Za-z0-9-]*[A-Za-z0-9])?)*\/)?(?:[A-Za-z0-9](?:[A-Za-z0-9._-]*[A-Za-z0-9])?)?$/;function li(t){return ai.officialIdentifiers.includes(t)?"official":ai.experimentalIdentifiers.includes(t)?"experimental":"uncatalogued"}function pi(t){let s=t==="2020-12"?Ne:lt,y=new s({allErrors:!0,strict:!1});return _e(y),y}function ut(t){return[...t].sort((s,y)=>L.get(s)-L.get(y))}function Pe(t,s,y){return ut(s?.protocolVersions??y??t.protocolVersions??[])}function fo(t,s){let y=new Set(s);return t.filter(g=>y.has(g))}function Ua(t){if(!t||typeof t!="object")return new Set;let s=new Set;if(t.type==="oauth2")for(let y of Object.values(t.flows??{}))for(let g of Object.keys(y?.scopes??{}))s.add(g);return s}function bo(t){let s=t?.$schema;return s===void 0?"2020-12":typeof s!="string"?null:/^https?:\/\/json-schema\.org\/draft\/2020-12\/schema#?$/.test(s)?"2020-12":/^https?:\/\/json-schema\.org\/draft-07\/schema#?$/.test(s)?"draft-07":null}function $o(t){let s=[];function y(g){if(Array.isArray(g))return g.map(y);if(!g||typeof g!="object")return g;let u={};for(let[a,e]of Object.entries(g)){if(a==="$ref"&&typeof e=="string"&&!e.startsWith("#")){s.push(e);continue}u[a]=y(e)}return u}return{schema:y(t),externalReferences:s}}function S(t,s,y,g){if(!Array.isArray(g))throw new TypeError(`Diagnostic ${t} is missing an explicit path`);return{code:t,severity:s,message:y,path:g}}function La(t){if(typeof t!="string")return!1;let[s]=t.split("/",1),y=s.split(".");if(y.length<2)return!1;let g=y[1].toLowerCase();return g==="modelcontextprotocol"||g==="mcp"}function Fa(t,s){if(typeof t!="string"||!t.includes("/"))return!1;let y=t.slice(0,t.indexOf("/")).split(".");return s==="2025-06-18"?y.slice(0,-1).some(g=>["modelcontextprotocol","mcp"].includes(g.toLowerCase())):y.length>=2&&["modelcontextprotocol","mcp"].includes(y[1].toLowerCase())}function co(t){return t&&typeof t=="object"&&!Array.isArray(t)&&typeof t.name=="string"&&typeof t.version=="string"}function Ja(t,s,y){let g=ut(t.protocolVersions??[]),u=g.filter(r=>L.get(r)0;else return!1;return m?c||y.push(S("meta-reserved-key-value","error",`${n}[${JSON.stringify(r)}] has an invalid value for MCP ${i}`,[...l,r])):y.push(S("meta-reserved-key-context","error",`${n} uses reserved _meta key ${JSON.stringify(r)} in a ${o} context where MCP ${i} does not define it`,[...l,r])),!0}function e(r,p,o,i,n){if(!(!r||typeof r!="object"||Array.isArray(r)))for(let[l,m]of Object.entries(r)){if(!Ma.test(l)){y.push(S("meta-key-invalid","error",`${i} contains invalid MCP _meta key ${JSON.stringify(l)}`,[...n,l]));continue}for(let c of o.filter(d=>L.get(d)>=L.get(ni)))a(l,m,p,c,i,n)||Fa(l,c)&&y.push(S("meta-unknown-reserved-key","warning",`${i} contains unrecognized key ${JSON.stringify(l)} under an MCP-reserved prefix for MCP ${c}; preserve it and review its authority`,[...n,l]))}}for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{let n=Pe(t,o,g),l=[r,i];if(e(o._meta,"declaration",n,`${r}[${i}]._meta`,[...l,"_meta"]),r==="tools")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.content??[]).forEach((h,P)=>{let $=`${f}.content[${P}]`,q=[...b,"content",P];e(h?._meta,"content",n,`${$}._meta`,[...q,"_meta"]),h?.type==="resource"&&e(h.resource?._meta,"content",n,`${$}.resource._meta`,[...q,"resource","_meta"])})}else if(r!=="prompts")for(let[m,c]of Object.entries(o.examples??{})){let d=c?.result;if(!d||typeof d!="object"||Array.isArray(d))continue;let f=`${r}[${i}].examples[${JSON.stringify(m)}].result`,b=[...l,"examples",m,"result"];e(d._meta,"result",n,`${f}._meta`,[...b,"_meta"]),(d.contents??[]).forEach((h,P)=>{e(h?._meta,"content",n,`${f}.contents[${P}]._meta`,[...b,"contents",P,"_meta"])})}})}function Ha(t,s,y){let g=new Set;if((t.tags??[]).forEach((u,a)=>{if(g.has(u.name)){y.push(S("duplicate-root-tag","error",`root tags must use unique names; found duplicate tag ${JSON.stringify(u.name)}`,["tags",a,"name"]));return}g.add(u.name)}),!!Object.hasOwn(t,"tags"))for(let[u,a]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])a.forEach((e,r)=>{(e.tags??[]).forEach((p,o)=>{g.has(p)||y.push(S("unknown-tag-reference","error",`${u}[${r}] references undeclared tag ${JSON.stringify(p)}`,[u,r,"tags",o]))})})}function Wa(t,s,y){let g=t.securitySchemes??{},u=new Set(Object.keys(g)),a=new Map(Object.entries(g).map(([r,p])=>[r,Ua(p)]));function e(r,p,o){Array.isArray(r)&&r.forEach((i,n)=>{for(let[l,m]of Object.entries(i)){if(!u.has(l)){y.push(S("unknown-security-scheme","error",`${p}[${n}] references unknown security scheme ${JSON.stringify(l)}`,[...o,n,l]));continue}let c=g[l];if(!Array.isArray(m))continue;if(m.filter((f,b)=>m.indexOf(f)!==b).length&&y.push(S("duplicate-security-scope","error",`${p}[${n}].${l} contains duplicate scope values`,[...o,n,l])),(c.type==="http"||c.type==="apiKey")&&m.length>0&&y.push(S("non-oauth-scope-misuse","error",`${p}[${n}].${l} uses scopes with ${c.type}, but only oauth2 and openIdConnect requirements may list scopes`,[...o,n,l])),c.type==="oauth2"||c.type==="openIdConnect"){let f=a.get(l)??new Set;m.forEach((b,h)=>{f.has(b)||y.push(S("uncatalogued-oauth-scope","warning",`${p}[${n}].${l} references scope ${JSON.stringify(b)} that is not present in the declared static scope catalogue`,[...o,n,l,h]))})}}})}e(t.security,"security",["security"]),(t.transports??[]).forEach((r,p)=>{e(r.security,`transports[${p}].security`,["transports",p,"security"])});for(let[r,p]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])p.forEach((o,i)=>{e(o.security,`${r}[${i}].security`,[r,i,"security"])})}function Ba(t,s,y){let g=ut(t.protocolVersions??[]),u=new Set;function a(r,p,o,i){let n=new Set(p);for(let l of r)n.has(l)||y.push(S("protocol-scope-outside-parent","error",`${o} includes protocol version ${l} outside its parent scope`,i))}(t.transports??[]).forEach((r,p)=>{let o=Pe(t,r,g);a(o,g,`transports[${p}].protocolVersions`,["transports",p,"protocolVersions"]);for(let i of o)u.add(i)});for(let r of g)u.has(r)||y.push(S("transport-coverage-gap","error",`protocol version ${r} is present at the root but not covered by any transport`,["protocolVersions"]));let e=t.capabilities??[];e.forEach((r,p)=>{let o=Pe(t,r,g);a(o,g,`capabilities[${p}].protocolVersions`,["capabilities",p,"protocolVersions"])});for(let r=0;r0&&y.push(S("capability-scope-overlap","error",`capabilities[${r}] and capabilities[${p}] overlap for protocol versions ${n.join(", ")}`,["capabilities",r,"protocolVersions"]))}for(let[r,p,o]of[["tools",t.tools??[],"name"],["prompts",t.prompts??[],"name"],["resources",t.resources??[],"uri"],["resourceTemplates",t.resourceTemplates??[],"uriTemplate"]]){let i=new Map;p.forEach((n,l)=>{let m=n[o],c=Pe(t,n,g);a(c,g,`${r}[${l}].protocolVersions`,[r,l,"protocolVersions"]),(n.elicitations??[]).forEach((f,b)=>{let h=Pe(t,f,c);a(h,c,`${r}[${l}].elicitations[${b}].protocolVersions`,[r,l,"elicitations",b,"protocolVersions"])});let d=i.get(m)??[];for(let f of d){let b=fo(c,f.scope);b.length>0&&y.push(S("primitive-scope-overlap","error",`${r}[${l}] with identifier ${JSON.stringify(m)} overlaps ${r}[${f.index}] for protocol versions ${b.join(", ")}`,[r,l,"protocolVersions"]))}d.push({index:l,scope:c}),i.set(m,d)})}}function Ka(t,s,y){let g=ut(t.protocolVersions??[]);function u(a,e,r,p){if(!a||typeof a!="object"||Array.isArray(a))return;e==="2025-06-18"&&Object.hasOwn(a,"$schema")&&y.push(S("elicitation-form-schema-version-mismatch","error",`${r}.$schema is not defined for MCP ${e}`,[...p,"$schema"]));let o=new Set(Object.keys(a.properties??{}));(a.required??[]).forEach((i,n)=>{o.has(i)||y.push(S("elicitation-form-required-property-unknown","error",`${r}.required references undeclared property ${JSON.stringify(i)}`,[...p,"required",n]))});for(let[i,n]of Object.entries(a.properties??{})){let l=`${r}.properties[${JSON.stringify(i)}]`,m=[...p,"properties",i];if(!(!n||typeof n!="object"||Array.isArray(n))){if(e==="2025-06-18"&&((n.type==="array"||Object.hasOwn(n,"oneOf"))&&y.push(S("elicitation-form-schema-version-mismatch","error",`${l} uses an enum form introduced after MCP ${e}`,m)),Object.hasOwn(n,"default")&&n.type!=="boolean"&&y.push(S("elicitation-form-schema-version-mismatch","error",`${l}.default is not defined for this property type in MCP ${e}`,[...m,"default"]))),Array.isArray(n.enumNames)&&Array.isArray(n.enum)&&n.enumNames.length!==n.enum.length&&y.push(S("elicitation-form-enum-names-mismatch","error",`${l}.enumNames must contain one display name for every enum value`,[...m,"enumNames"])),Object.hasOwn(n,"default")){let c=Array.isArray(n.enum)?n.enum:Array.isArray(n.oneOf)?n.oneOf.map(d=>d.const):void 0;if(c&&!c.includes(n.default)&&y.push(S("elicitation-form-default-outside-enum","error",`${l}.default must be one of the declared enum values`,[...m,"default"])),n.type==="array"){let d=n.items?.enum??n.items?.anyOf?.map(f=>f.const);Array.isArray(d)&&n.default.some(f=>!d.includes(f))&&y.push(S("elicitation-form-default-outside-enum","error",`${l}.default contains a value outside the declared enum values`,[...m,"default"]))}}typeof n.minLength=="number"&&typeof n.maxLength=="number"&&n.minLength>n.maxLength&&y.push(S("elicitation-form-invalid-range","error",`${l}.minLength must not exceed maxLength`,[...m,"minLength"])),typeof n.minimum=="number"&&typeof n.maximum=="number"&&n.minimum>n.maximum&&y.push(S("elicitation-form-invalid-range","error",`${l}.minimum must not exceed maximum`,[...m,"minimum"])),typeof n.minItems=="number"&&typeof n.maxItems=="number"&&n.minItems>n.maxItems&&y.push(S("elicitation-form-invalid-range","error",`${l}.minItems must not exceed maxItems`,[...m,"minItems"]))}}}for(let[a,e]of[["tools",t.tools??[]],["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])e.forEach((r,p)=>{let o=Pe(t,r,g),i=new Set;(r.elicitations??[]).forEach((n,l)=>{let m=`${a}[${p}].elicitations[${l}]`,c=[a,p,"elicitations",l];i.has(n.name)&&y.push(S("duplicate-elicitation-name","error",`${m}.name duplicates Elicitation Declaration name ${JSON.stringify(n.name)} within the containing primitive`,[...c,"name"])),i.add(n.name);let d=Pe(t,n,o);for(let f of d)L.get(f){let p=Pe(t,e,g);if(e.type==="streamable-http")for(let o of p)L.get(o)>=L.get("2025-03-26")||y.push(S("transport-not-supported-by-version","error",`transports[${r}] uses Streamable HTTP, which is not defined for MCP ${o}; it requires 2025-03-26 or later`,["transports",r,"type"]));if(e.type==="sse")for(let o of p)L.get(o){let p=Pe(t,e,g),o=["tools",r];u(`tools[${r}]`,o,e,"title","2025-06-18",p),u(`tools[${r}]`,o,e,"outputSchema","2025-06-18",p),u(`tools[${r}]`,o,e,"_meta","2025-06-18",p),u(`tools[${r}]`,o,e,"annotations","2025-03-26",p),a(`tools[${r}]`,o,e,"execution","2025-11-25",p),u(`tools[${r}]`,o,e,"icons","2025-11-25",p)});for(let[e,r]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]],["prompts",t.prompts??[]]])r.forEach((p,o)=>{let i=Pe(t,p,g),n=[e,o];if(u(`${e}[${o}]`,n,p,"title","2025-06-18",i),u(`${e}[${o}]`,n,p,"_meta","2025-06-18",i),u(`${e}[${o}]`,n,p,"icons","2025-11-25",i),e!=="prompts"&&p.annotations?.lastModified!==void 0)for(let l of i)L.get(l)>=L.get("2025-06-18")||y.push(S("resource-annotation-not-supported-by-version","error",`${e}[${o}].annotations.lastModified is not defined for MCP ${l}`,[...n,"annotations","lastModified"]));e==="prompts"&&(p.arguments??[]).forEach((l,m)=>{u(`${e}[${o}].arguments[${m}]`,[...n,"arguments",m],l,"title","2025-06-18",i)})});(t.capabilities??[]).forEach((e,r)=>{let p=Pe(t,e,g),o=["capabilities",r];if("completions"in e&&u(`capabilities[${r}]`,o,e,"completions","2025-03-26",p),"tasks"in e&&(u(`capabilities[${r}]`,o,e,"tasks","2025-11-25",p),p.includes("2026-07-28")&&y.push(S("tasks-core-not-valid-in-2026","error",`capabilities[${r}].tasks cannot apply to MCP 2026-07-28; use capabilities.extensions instead`,[...o,"tasks"]))),"extensions"in e){for(let i of p)L.get(i)y(i,`${u}.${o}[${n}]`,[...a,o,n],!1,!1));for(let o of Qa){let i=g[o];Array.isArray(i)?i.forEach((n,l)=>y(n,`${u}.${o}[${l}]`,[...a,o,l],!1,!1)):y(i,`${u}.${o}`,[...a,o],!1,!1)}let p=g.dependencies;if(p&&typeof p=="object"&&!Array.isArray(p))for(let[o,i]of Object.entries(p))Array.isArray(i)||y(i,`${u}.dependencies[${JSON.stringify(o)}]`,[...a,"dependencies",o],!1,!1)}return y(t,"inputSchema",["inputSchema"],!0,!1),s}function rp(t,s,y,g,u){let a=tp(t.inputSchema);if(!a.length)return;for(let r of y)r!=="2026-07-28"&&u.push(S("field-not-supported-by-version","error",`tools[${s}].inputSchema uses x-mcp-header, which is not defined for MCP ${r}`,["tools",s,"inputSchema"]));let e=new Map;for(let r of a){let p=`tools[${s}].${r.location}.x-mcp-header`,o=["tools",s,...r.path,"x-mcp-header"];if(r.staticallyReachable||u.push(S("invalid-x-mcp-header","error",`${p} is not on a property statically reachable from the schema root through properties only`,o)),typeof r.value!="string"||!/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/.test(r.value)){u.push(S("invalid-x-mcp-header","error",`${p} must be a non-empty HTTP field-name token`,o));continue}["boolean","integer","string"].includes(r.type)||u.push(S("invalid-x-mcp-header","error",`${p} may annotate only a boolean, integer, or string property`,o));let i=r.value.toLowerCase(),n=e.get(i);n?u.push(S("duplicate-x-mcp-header","error",`${p} duplicates ${n} case-insensitively`,o)):e.set(i,p)}}function sp(t,s,y,g,u){if(Object.hasOwn(t,"properties")){let a=t.properties;if(!a||typeof a!="object"||Array.isArray(a))u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.properties must be an object for MCP revisions before ${pt}`,[...y,"properties"]));else for(let[e,r]of Object.entries(a))r&&typeof r=="object"&&!Array.isArray(r)||u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.properties[${JSON.stringify(e)}] must be an object for MCP revisions before ${pt}`,[...y,"properties",e]))}Object.hasOwn(t,"required")&&(!Array.isArray(t.required)||t.required.some(a=>typeof a!="string"))&&u.push(S("invalid-legacy-tool-schema-shape","error",`${s}.required must be an array of strings for MCP revisions before ${pt}`,[...y,"required"]))}function ip(t,s,y){let g=ut(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{let e=Pe(t,u,g);for(let r of["inputSchema","outputSchema"]){let p=u[r];if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`tools[${a}].${r}`,i=["tools",a,r],n=e.some(m=>L.get(m)L.get(m)>=L.get(pt));if(Object.hasOwn(p,"$schema"))for(let m of e)L.get(m)>=L.get(pt)||y.push(S("field-not-supported-by-version","error",`${o}.$schema is not defined for MCP ${m}; it requires ${pt} or later`,[...i,"$schema"]));if(n&&sp(p,o,i,s,y),l){let m=bo(p);if(!m)y.push(S("unsupported-tool-schema-dialect","error",`${o} declares an unsupported JSON Schema dialect ${JSON.stringify(p.$schema)}`,[...i,"$schema"]));else{let c=pi(m);try{if(c.validateSchema(p,!0))c.compile(p);else{let d=c.errors?.map(f=>`${f.instancePath||"/"} ${f.message}`).join("; ")??"unknown meta-schema error";y.push(S("invalid-tool-schema","error",`${o} is not valid JSON Schema ${m}: ${d}`,i))}}catch(d){let f=$o(p);try{if(!f.externalReferences.length)throw d;pi(m).compile(f.schema);let b=[...new Set(f.externalReferences)].sort();y.push(S("unresolved-external-tool-schema-reference","warning",`${o} contains external $ref values unavailable to offline validation (${b.map(h=>JSON.stringify(h)).join(", ")}); the references are preserved, but complete Tool schema validation was not possible`,i))}catch(b){y.push(S("invalid-tool-schema","error",`${o} is not a compilable JSON Schema ${m}: ${b.message}`,i))}}}}if(r==="outputSchema"&&p.type!=="object")for(let m of e)m!=="2026-07-28"&&y.push(S("field-not-supported-by-version","error",`${o} must have type "object" when it applies to MCP ${m}`,[...i,"type"]))}rp(u,a,e,s,y)})}function yo(t,s,y,g,u,a){if(t.type==="object"&&(!s||typeof s!="object"||Array.isArray(s))){a.push(S("tool-example-schema-mismatch","error",`${y} must be an object`,g));return}for(let e of t.required??[])Object.hasOwn(s,e)||a.push(S("tool-example-schema-mismatch","error",`${y} is missing required property ${JSON.stringify(e)}`,[...g,e]));if(t.additionalProperties===!1&&t.properties&&typeof t.properties=="object")for(let e of Object.keys(s))Object.hasOwn(t.properties,e)||a.push(S("tool-example-schema-mismatch","error",`${y} contains undeclared property ${JSON.stringify(e)}`,[...g,e]))}function ho(t,s,y,g,u,a){let e=bo(t);if(!e)return;let r=$o(t);if(r.externalReferences.length){let p=[...new Set(r.externalReferences)].sort();a.push(S("incomplete-tool-example-validation","warning",`${y} could not be validated completely because its associated Tool schema contains unresolved external $ref values (${p.map(o=>JSON.stringify(o)).join(", ")})`,g));return}try{let p=pi(e).compile(t);if(!p(s)){let o=p.errors?.map(i=>`${i.instancePath||"/"} ${i.message}`).join("; ")??"unknown validation error";a.push(S("tool-example-schema-mismatch","error",`${y} does not validate against its associated Tool schema: ${o}`,g))}}catch{}}function op(t,s,y){let g=ut(t.protocolVersions??[]);(t.tools??[]).forEach((u,a)=>{if(!u.examples||typeof u.examples!="object"||Array.isArray(u.examples))return;let e=Pe(t,u,g),r=e.filter(o=>L.get(o)L.get(o)>=L.get(pt));for(let[o,i]of Object.entries(u.examples)){if(!i||typeof i!="object")continue;let n=`tools[${a}].examples[${JSON.stringify(o)}]`,l=["tools",a,"examples",o],m=i.result??{},c=[...l,"result"],d=m.isError!==!0;for(let f of["jsonrpc","id","error"])Object.hasOwn(m,f)&&y.push(S("tool-example-json-rpc-envelope","error",`${n}.result must not contain JSON-RPC envelope field ${JSON.stringify(f)}`,[...c,f]));for(let f of["task","inputRequests","requestState"])Object.hasOwn(m,f)&&y.push(S("incomplete-tool-example-result","error",`${n}.result must not contain non-completed workflow field ${JSON.stringify(f)}`,[...c,f]));for(let f of e){let b=`${n}.result`;f==="2026-07-28"&&m.resultType!=="complete"&&y.push(S("tool-example-result-version-mismatch","error",`${b}.resultType must be "complete" for MCP ${f}`,[...c,"resultType"])),f!=="2026-07-28"&&Object.hasOwn(m,"resultType")&&y.push(S("tool-example-result-version-mismatch","error",`${b}.resultType is not defined for MCP ${f}`,[...c,"resultType"])),Object.hasOwn(m,"structuredContent")&&L.get(f){let $=`${b}.content[${P}]`,q=[...c,"content",P];h.type==="audio"&&L.get(f){Object.hasOwn(r,"_meta")&&L.get(e){let n=`${g}.result.contents[${i}]`,l=[...u,"result","contents",i];if(o.uri===s&&(p=!0,t.mimeType&&o.mimeType&&o.mimeType!==t.mimeType&&e.push(S("resource-example-mime-type-mismatch","warning",`${n}.mimeType ${JSON.stringify(o.mimeType)} differs from the declaration MIME type ${JSON.stringify(t.mimeType)}`,[...l,"mimeType"])),t.size!==void 0)){let m=typeof o.text=="string"?ep.encode(o.text).byteLength:typeof o.blob=="string"&&go(o.blob)?np(o.blob):void 0;m!==void 0&&m!==t.size&&e.push(S("resource-example-size-mismatch","warning",`${n} contains ${m} raw bytes, which differs from the declared Resource size ${t.size}`,l))}typeof o.blob=="string"&&!go(o.blob)&&e.push(S("invalid-resource-example-base64","error",`${n}.blob must be valid canonical base64`,[...l,"blob"]))}),p||e.push(S("resource-example-requested-uri-not-returned","warning",`${g}.result.contents has no entry for requested URI ${JSON.stringify(s)}; this is valid only for a documented collection or indirection`,[...u,"result","contents"]))}function lp(t,s,y){let g=ut(t.protocolVersions??[]);for(let[u,a]of[["resources",t.resources??[]],["resourceTemplates",t.resourceTemplates??[]]])a.forEach((e,r)=>{if(!e.examples||typeof e.examples!="object"||Array.isArray(e.examples))return;let p=Pe(t,e,g),o;if(u==="resourceTemplates")try{o=new Ie,o.add(e.uriTemplate)}catch(i){o=void 0,y.push(S("resource-template-example-invalid-template","error",`${u}[${r}].uriTemplate is not a valid RFC 6570 template: ${i.message}`,[u,r,"uriTemplate"]))}for(let[i,n]of Object.entries(e.examples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${u}[${r}].examples[${JSON.stringify(i)}]`,m=[u,r,"examples",i],c=n.result;if(!c||typeof c!="object"||Array.isArray(c))continue;let d=u==="resources"?e.uri:n.uri;u==="resourceTemplates"&&typeof d=="string"&&o&&!o.match(d)&&y.push(S("resource-template-example-invalid-expansion","error",`${l}.uri ${JSON.stringify(d)} is not a valid RFC 6570 expansion of ${JSON.stringify(e.uriTemplate)}`,[...m,"uri"])),ap(c,p,`${l}.result`,[...m,"result"],s,y),typeof d=="string"&&pp(e,d,c,l,m,s,y)}})}function mi(t,s="document"){let y=[];return Ba(t,s,y),Wa(t,s,y),Ha(t,s,y),Ya(t,s,y),Ka(t,s,y),Ja(t,s,y),ip(t,s,y),op(t,s,y),lp(t,s,y),y.sort((g,u)=>g.code.localeCompare(u.code)||g.message.localeCompare(u.message)||JSON.stringify(g.path).localeCompare(JSON.stringify(u.path))),y}var fi="__interaction_example__",yi=new Ne({allErrors:!0,strict:!1});_e(yi);var wo=new lt({allErrors:!0,strict:!1});_e(wo);var Po=yi.compile(uo),jo=["tools","resources","resourceTemplates","prompts"],mp=["schemas","toolExamples","resourceExamples","resourceTemplateExamples","promptExamples"],up=new Set(["roots","sampling","elicitation","tasks","extensions","experimental"]),ie=new Map(ds.map((t,s)=>[t,s])),fp={"2024-11-05":new Set(["roots","sampling","experimental"]),"2025-03-26":new Set(["roots","sampling","experimental"]),"2025-06-18":new Set(["roots","sampling","elicitation","experimental"]),"2025-11-25":new Set(["roots","sampling","elicitation","tasks","experimental"]),"2026-07-28":new Set(["roots","sampling","elicitation","extensions","experimental"])};function F(t,s,y,g){return{code:t,severity:s,message:y,path:g}}function cp(t){if(typeof t!="string"||!t.includes("/"))return!1;let s=t.slice(0,t.indexOf("/")).split(".");return s.length>=2&&["modelcontextprotocol","mcp"].includes(s[1].toLowerCase())}function hs(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$componentRef")}function ui(t,s,y,g){return{code:t,severity:"error",message:`${s}.${g.map(u=>typeof u=="number"?`[${u}]`:u).join(".")} ${y}`,path:g}}function yp(t,s="document"){let y=structuredClone(t),g=[],u=0;function a(e,r,p,o=[]){let i=/^#\/components\/([^/]+)\/([^/]+)$/.exec(e?.$componentRef??"");if(!i)return e;let[,n,l]=i;if(n!==r)return g.push(ui("wrong-component-reference-namespace",s,`must target #/components/${r}, not #/components/${n}`,p)),e;let m=`${n}/${l}`;if(o.includes(m))return g.push(ui("component-reference-cycle",s,`forms a cycle through ${[...o,m].join(" -> ")}`,p)),e;let c=t?.components?.[n]?.[l];return c===void 0?(g.push(ui("missing-component-reference-target",s,`targets missing component ${JSON.stringify(e.$componentRef)}`,p)),e):(u+=1,hs(c)?a(c,r,p,[...o,m]):structuredClone(c))}for(let e of mp)for(let[r,p]of Object.entries(t?.components?.[e]??{}))hs(p)&&(y.components[e][r]=a(p,e,["components",e,r],[`${e}/${r}`]));for(let[e,r]of Object.entries({tools:t?.tools,resources:t?.resources,resourceTemplates:t?.resourceTemplates,prompts:t?.prompts}))for(let[p,o]of(r??[]).entries()){let i=y[e][p];if(e==="tools")for(let l of["inputSchema","outputSchema"])hs(o[l])&&(i[l]=a(o[l],"schemas",[e,p,l]));let n=e==="tools"?"toolExamples":e==="resources"?"resourceExamples":e==="resourceTemplates"?"resourceTemplateExamples":"promptExamples";for(let[l,m]of Object.entries(o.examples??{}))hs(m)&&(i.examples[l]=a(m,n,[e,p,"examples",l]))}for(let e of jo)for(let[r,p]of(t?.[e]??[]).entries())for(let[o,i]of(p.elicitations??[]).entries())hs(i.requestedSchema)&&(y[e][r].elicitations[o].requestedSchema=a(i.requestedSchema,"schemas",[e,r,"elicitations",o,"requestedSchema"]));return{document:y,diagnostics:g,substitutions:u}}function dp(t,s){let y=s.instancePath?s.instancePath.slice(1).split("/").map(g=>g.replaceAll("~1","/").replaceAll("~0","~")):[];return s.keyword==="required"&&typeof s.params.missingProperty=="string"?y.push(s.params.missingProperty):s.keyword==="additionalProperties"&&typeof s.params.additionalProperty=="string"&&y.push(s.params.additionalProperty),y.map(g=>Array.isArray(t)&&/^(?:0|[1-9][0-9]*)$/.test(g)?Number(g):g)}function ko(t){return Po(t)?[]:(Po.errors??[]).map(s=>({code:"schema-validation",severity:"error",message:`does not validate against 0.8.0: ${s.instancePath||"/"} ${s.message??"unknown error"}`,path:dp(t,s)}))}function ci(t){return Array.isArray(t)?t.map(ci):t&&typeof t=="object"?Object.fromEntries(Object.entries(t).sort(([s],[y])=>s.localeCompare(y)).map(([s,y])=>[s,ci(y)])):t}function vo(t){return JSON.stringify(ci(t))}function hp(t,s,y){if(!Array.isArray(t.path))return t;let g=["tools",0,"examples",fi];return g.every((a,e)=>t.path[e]===a)?{...t,message:t.message.replace(`tools[0].examples[${JSON.stringify(fi)}]`,`tools[${s}].interactionExamples[${JSON.stringify(y)}]`),path:["tools",s,"interactionExamples",y,...t.path.slice(g.length)]}:t}function gp(t,s,y,g,u){let a={mcpdesc:"0.8.0",info:{name:"tool-interaction-validation",version:"1.0.0"},protocolVersions:[...u],tools:[{name:t.name,inputSchema:structuredClone(t.inputSchema),...t.outputSchema?{outputSchema:structuredClone(t.outputSchema)}:{},examples:{[fi]:{input:structuredClone(g.input),result:structuredClone(g.result)}}}]};return mi(a).map(e=>hp(e,s,y)).filter(e=>e.path?.[0]==="tools"&&e.path?.[1]===s&&e.path?.[2]==="interactionExamples")}function bp(t,s,y,g,u){try{let a=yi.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(F("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{try{let a=wo.compile(t);if(!a(s)){let e=a.errors?.map(r=>`${r.instancePath||"/"} ${r.message}`).join("; ")??"unknown validation error";u.push(F("interaction-example-elicitation-content-schema-mismatch","error",`${y} does not validate against the elicitation request schema: ${e}`,g))}}catch{}}}function $p(t,s,y,g,u){let a=t.clientRequirements;if(!a||typeof a!="object"||Array.isArray(a))return;function e(r,p){u.push(F("interaction-example-client-requirements-contradiction","warning",`${y} ${r}`,p))}if(s.type==="roots"){Object.hasOwn(a,"roots")||e("illustrates roots input, but the Tool clientRequirements do not declare roots",[...g,"type"]);return}if(s.type==="sampling"){if(!Object.hasOwn(a,"sampling")){e("illustrates sampling input, but the Tool clientRequirements do not declare sampling",[...g,"type"]);return}let r=a.sampling??{};(Object.hasOwn(s.request,"tools")||Object.hasOwn(s.request,"toolChoice"))&&!Object.hasOwn(r,"tools")&&e("illustrates sampling Tool use, but the Tool clientRequirements do not declare sampling.tools",[...g,"request",Object.hasOwn(s.request,"tools")?"tools":"toolChoice"]),s.request.includeContext&&s.request.includeContext!=="none"&&!Object.hasOwn(r,"context")&&e("illustrates sampling context inclusion, but the Tool clientRequirements do not declare sampling.context",[...g,"request","includeContext"]);return}if(s.type==="elicitation"){if(!Object.hasOwn(a,"elicitation")){e("illustrates elicitation input, but the Tool clientRequirements do not declare elicitation",[...g,"type"]);return}let r=a.elicitation??{};s.request.mode==="url"&&!Object.hasOwn(r,"url")&&e("illustrates URL elicitation, but the Tool clientRequirements do not declare elicitation.url",[...g,"request","mode"]),s.request.mode==="form"&&Object.keys(r).length>0&&!Object.hasOwn(r,"form")&&e("illustrates form elicitation, but the Tool clientRequirements do not declare elicitation.form",[...g,"request","mode"])}}function Pp(t){let s=[],y=t.protocolVersions??[];for(let[g,u]of(t.tools??[]).entries()){if(!u.interactionExamples||typeof u.interactionExamples!="object"||Array.isArray(u.interactionExamples))continue;let a=u.protocolVersions??y;for(let[e,r]of Object.entries(u.interactionExamples)){if(!r||typeof r!="object"||Array.isArray(r))continue;let p=`tools[${g}].interactionExamples[${JSON.stringify(e)}]`,o=["tools",g,"interactionExamples",e];s.push(...gp(u,g,e,r,a));for(let[i,n]of(r.steps??[]).entries()){let l=`${p}.steps[${i}]`,m=[...o,"steps",i];if($p(u,n,l,m,s),n.type==="elicitation"){let c=n.request??{},d=n.response??{},f=typeof n.declaration=="string"?(u.elicitations??[]).find(b=>b.name===n.declaration):void 0;for(let b of a)ie.get(b)[r.name,r]));for(let[r,p]of Object.entries(u.examples)){if(!p||typeof p!="object"||Array.isArray(p))continue;let o=`prompts[${g}].examples[${JSON.stringify(r)}]`,i=["prompts",g,"examples",r],n=p.result??{},l=[...i,"result"],m=p.arguments;if(m&&typeof m=="object"&&!Array.isArray(m))for(let[c]of Object.entries(m))e.has(c)||s.push(F("prompt-example-unknown-argument","error",`${o}.arguments contains undeclared Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let[c,d]of e)d.required===!0&&!Object.hasOwn(m??{},c)&&s.push(F("prompt-example-missing-required-argument","error",`${o}.arguments is missing required Prompt argument ${JSON.stringify(c)}`,[...i,"arguments",c]));for(let c of["jsonrpc","id","error"])Object.hasOwn(n,c)&&s.push(F("prompt-example-json-rpc-envelope","error",`${o}.result must not contain JSON-RPC envelope field ${JSON.stringify(c)}`,[...l,c]));for(let c of["task","inputRequests","requestState"])Object.hasOwn(n,c)&&s.push(F("incomplete-prompt-example-result","error",`${o}.result must not contain non-completed workflow field ${JSON.stringify(c)}`,[...l,c]));for(let c of a){let d=`${o}.result`;c==="2026-07-28"&&n.resultType!=="complete"&&s.push(F("prompt-example-result-version-mismatch","error",`${d}.resultType must be "complete" for MCP ${c}`,[...l,"resultType"])),c!=="2026-07-28"&&Object.hasOwn(n,"resultType")&&s.push(F("prompt-example-result-version-mismatch","error",`${d}.resultType is not defined for MCP ${c}`,[...l,"resultType"])),Object.hasOwn(n,"_meta")&&ie.get(c){let h=`${d}.messages[${b}].content`,P=[...l,"messages",b,"content"];wp(f.content??{},h,P,c,s)})}}}return s}function kp(t){let s=new Ie;return s.add(t),new Set(s.templates.flatMap(y=>y.parts).filter(y=>y.type==="expression").flatMap(y=>y.expressions.map(g=>g.name)))}function Op(t,s,y,g,u){let a=`${s}.result`,e=[...y,"result"];for(let r of["jsonrpc","id","error"])Object.hasOwn(t,r)&&u.push(F("completion-example-json-rpc-envelope","error",`${a} must not contain JSON-RPC envelope field ${JSON.stringify(r)}`,[...e,r]));for(let r of["task","inputRequests","requestState"])Object.hasOwn(t,r)&&u.push(F("incomplete-completion-example-result","error",`${a} must not contain non-completed workflow field ${JSON.stringify(r)}`,[...e,r]));g==="2026-07-28"&&t.resultType!=="complete"&&u.push(F("completion-example-result-version-mismatch","error",`${a}.resultType must be "complete" for MCP ${g}`,[...e,"resultType"])),g!=="2026-07-28"&&Object.hasOwn(t,"resultType")&&u.push(F("completion-example-result-version-mismatch","error",`${a}.resultType is not defined for MCP ${g}`,[...e,"resultType"])),Object.hasOwn(t,"_meta")&&ie.get(g)i.name));else try{o=kp(e.uriTemplate)}catch(i){s.push(F("resource-template-completion-example-invalid-template","error",`${p}.uriTemplate is not a valid RFC 6570 template: ${i.message}`,[g,a,"uriTemplate"])),o=void 0}for(let[i,n]of Object.entries(e.completionExamples)){if(!n||typeof n!="object"||Array.isArray(n))continue;let l=`${p}.completionExamples[${JSON.stringify(i)}]`,m=[g,a,"completionExamples",i],c=n.argument?.name,d=n.context?.arguments;if(typeof c=="string"&&o&&!o.has(c)&&s.push(F(g==="prompts"?"prompt-completion-example-unknown-argument":"resource-template-completion-example-unknown-variable","error",g==="prompts"?`${l}.argument.name identifies undeclared Prompt argument ${JSON.stringify(c)}`:`${l}.argument.name identifies no RFC 6570 variable in ${JSON.stringify(e.uriTemplate)}`,[...m,"argument","name"])),d&&typeof d=="object"&&!Array.isArray(d))for(let b of Object.keys(d))o&&!o.has(b)&&s.push(F(g==="prompts"?"prompt-completion-example-context-unknown-argument":"resource-template-completion-example-context-unknown-variable","error",g==="prompts"?`${l}.context.arguments contains undeclared Prompt argument ${JSON.stringify(b)}`:`${l}.context.arguments contains no RFC 6570 variable ${JSON.stringify(b)} from ${JSON.stringify(e.uriTemplate)}`,[...m,"context","arguments",b])),b===c&&s.push(F("completion-example-duplicate-target-context","error",`${l}.context.arguments MUST NOT repeat the completed argument ${JSON.stringify(b)}`,[...m,"context","arguments",b]));let f=n.result??{};for(let b of r){if(ie.get(b)e.code!=="transport-coverage-gap")).sort((e,r)=>e.code.localeCompare(r.code)||e.message.localeCompare(r.message)||JSON.stringify(e.path).localeCompare(JSON.stringify(r.path)))}function Oo(t){let s=ko(t);return s.length?s:xp(t)}var di="0.8.0-rc.4",Ap="v0.8.0-rc.4",Ep="d38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef";function zp(t){let s=Oo(t);return{valid:!s.some(y=>y.severity==="error"),diagnostics:s}}var ft=Object.freeze({[ii]:oi,[di]:hi}),qo=Object.freeze({"0.8.0-rc.3":si}),Is=Object.freeze({"0.8.0-rc.3":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json","0.8.0-rc.4":"https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json"}),Il=Object.freeze(Object.keys(ft)),Tl=Object.freeze(["0.8.0-rc.3"]),Sl=Object.freeze([...new Set(Object.values(ft).flatMap(t=>t.supportedProtocolVersions))]),Np=Object.freeze(Object.fromEntries(Object.entries(ft).map(([t,s])=>[t,Object.freeze({snapshotTag:s.snapshotTag,schemaUri:Is[t],schemaSha256:s.schemaSha256})]))),bi=new Map;for(let t of Object.values(ft)){let s=Is[t.specification],y=bi.get(s)??[];y.push(t.specification),bi.set(s,y)}function ps(t,s,y=[]){return{code:t,severity:"error",message:s,path:y}}function gi(t,s=[]){let y=ft[t];return{status:"resolved",specification:t,schemaUri:Is[t],provenance:Np[t],diagnostics:s}}function Rl(t,s={}){let y=s?.specification;if(y!==void 0&&(typeof y!="string"||!Object.hasOwn(ft,y)))return{status:"unresolved",diagnostics:[ps("unsupported-specification",`Unsupported MCP Description specification: ${String(y)}`)]};let g=t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.hasOwn(t,"$schema")?t.$schema:void 0;if(g===void 0)return y!==void 0?gi(y):{status:"unresolved",diagnostics:[ps("missing-snapshot-identity","An exact specification selector or recognized $schema identity is required",["$schema"])]};if(typeof g!="string")return{status:"unresolved",diagnostics:[ps("invalid-schema-identity","$schema must be a string to resolve an MCP Description specification",["$schema"])]};let u=bi.get(g)??[];return y!==void 0?Is[y]===g?gi(y):{status:"unresolved",diagnostics:[ps("contradictory-snapshot-identity",`$schema ${JSON.stringify(g)} does not identify specification ${JSON.stringify(y)}`,["$schema"])]}:u.length===1?gi(u[0]):u.length>1?{status:"unresolved",diagnostics:[ps("ambiguous-schema-identity",`$schema ${JSON.stringify(g)} is shared by ${u.join(", ")} and does not select one immutable snapshot`,["$schema"])]}:{status:"unresolved",diagnostics:[ps("unknown-schema-identity",`Unknown MCP Description $schema identity: ${JSON.stringify(g)}`,["$schema"])]}}function Dl(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(typeof s.specification!="string"||!Object.hasOwn(ft,s.specification))throw new RangeError(`Unsupported MCP Description specification: ${String(s.specification)}`);return ft[s.specification].validate(t)}function Zl(t,s){if(!s||typeof s!="object"||Array.isArray(s)||!Object.hasOwn(s,"specification"))throw new TypeError("options.specification is required");if(!Object.hasOwn(qo,s.specification))throw new RangeError(`Component reference resolution does not support specification: ${String(s.specification)}`);return qo[s.specification](t)}export{Tl as deprecatedSpecifications,Ns as mcpExtensionCatalogue,_s as mcpExtensionMaturity,Zl as resolveMcpDescriptionComponentReferences,Rl as resolveMcpDescriptionSpecification,Np as specificationProvenance,Sl as supportedProtocolVersions,Il as supportedSpecifications,Dl as validateMcpDescription}; diff --git a/packages/validator/test/api.test.js b/packages/validator/test/api.test.js index a0b0b5e..7a1bf1c 100644 --- a/packages/validator/test/api.test.js +++ b/packages/validator/test/api.test.js @@ -15,23 +15,23 @@ import { } from '../src/index.js'; const fixtureRoots = { - '0.8.0-rc.2': new URL('./snapshots/0.8.0-rc.2/fixtures/', import.meta.url), - '0.8.0-rc.3': new URL('./snapshots/0.8.0-rc.3/fixtures/', import.meta.url) + '0.8.0-rc.3': new URL('./snapshots/0.8.0-rc.3/fixtures/', import.meta.url), + '0.8.0-rc.4': new URL('./snapshots/0.8.0-rc.4/fixtures/', import.meta.url) }; -function fixture(group, name, specification = '0.8.0-rc.3') { +function fixture(group, name, specification = '0.8.0-rc.4') { return JSON.parse(fs.readFileSync(new URL(`${group}/${name}`, fixtureRoots[specification]), 'utf8')); } -function validate(document, specification = '0.8.0-rc.3') { +function validate(document, specification = '0.8.0-rc.4') { return validateMcpDescription(document, { specification }); } test('exports the active validator API', () => { assert.equal(typeof validateMcpDescription, 'function'); assert.equal(typeof resolveMcpDescriptionComponentReferences, 'function'); - assert.deepEqual(supportedSpecifications, ['0.8.0-rc.2', '0.8.0-rc.3']); - assert.deepEqual(deprecatedSpecifications, ['0.8.0-rc.2']); + assert.deepEqual(supportedSpecifications, ['0.8.0-rc.3', '0.8.0-rc.4']); + assert.deepEqual(deprecatedSpecifications, ['0.8.0-rc.3']); assert.deepEqual(supportedProtocolVersions, [ '2024-11-05', '2025-03-26', @@ -40,15 +40,15 @@ test('exports the active validator API', () => { '2026-07-28' ]); assert.deepEqual(specificationProvenance, { - '0.8.0-rc.2': { - snapshotTag: 'v0.8.0-rc.2', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', - schemaSha256: '40f6775dde052224114e91d6aa484d826eecf56b77f7ac87b4cf707ffbcb6ce8' - }, '0.8.0-rc.3': { snapshotTag: 'v0.8.0-rc.3', schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', schemaSha256: 'a9c3ff77ba37c72362909f538f6e957d055e6fdb372f8b3d529e3651af3fecf4' + }, + '0.8.0-rc.4': { + snapshotTag: 'v0.8.0-rc.4', + schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json', + schemaSha256: 'd38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef' } }); }); @@ -72,16 +72,16 @@ test('exports the pinned RC.2 extension catalogue and maturity classification', assert.ok(Object.isFrozen(mcpExtensionCatalogue.experimentalIdentifiers)); }); -test('keeps RC.2 protocol applicability and extension authority diagnostics independent', () => { - const official = fixture('expected-warning', 'pre-standard-extension-capabilities.json', '0.8.0-rc.2'); +test('keeps RC.3 protocol applicability and extension authority diagnostics independent', () => { + const official = fixture('expected-warning', 'pre-standard-extension-capabilities.json', '0.8.0-rc.3'); assert.deepEqual( - validate(official, '0.8.0-rc.2').diagnostics.map(({ code, severity }) => ({ code, severity })), + validate(official, '0.8.0-rc.3').diagnostics.map(({ code, severity }) => ({ code, severity })), [{ code: 'extensions-not-supported-by-version', severity: 'warning' }] ); official.capabilities[0].extensions = { 'io.modelcontextprotocol/future-capability': {} }; assert.deepEqual( - validate(official, '0.8.0-rc.2').diagnostics.map(({ code, severity }) => ({ code, severity })), + validate(official, '0.8.0-rc.3').diagnostics.map(({ code, severity }) => ({ code, severity })), [ { code: 'extensions-not-supported-by-version', severity: 'warning' }, { code: 'unknown-reserved-extension-identifier', severity: 'warning' } @@ -90,27 +90,27 @@ test('keeps RC.2 protocol applicability and extension authority diagnostics inde }); test('keeps pre-standard client requirements strict and malformed extension maps invalid', () => { - const document = fixture('expected-warning', 'pre-standard-extension-capabilities.json', '0.8.0-rc.2'); + const document = fixture('expected-warning', 'pre-standard-extension-capabilities.json', '0.8.0-rc.3'); delete document.capabilities; document.tools = [{ name: 'requires_apps', inputSchema: { type: 'object', additionalProperties: false }, clientRequirements: { extensions: { 'io.modelcontextprotocol/ui': {} } } }]; - const requirement = validate(document, '0.8.0-rc.2'); + const requirement = validate(document, '0.8.0-rc.3'); assert.equal(requirement.valid, false); assert.ok(requirement.diagnostics.some(({ code, severity }) => ( code === 'client-requirement-version-mismatch' && severity === 'error' ))); for (const extensions of [{}, { 'missing-prefix': {} }, { 'com.example/invalid': true }]) { - const malformed = fixture('expected-warning', 'pre-standard-extension-capabilities.json', '0.8.0-rc.2'); + const malformed = fixture('expected-warning', 'pre-standard-extension-capabilities.json', '0.8.0-rc.3'); malformed.capabilities[0].extensions = extensions; - assert.equal(validate(malformed, '0.8.0-rc.2').valid, false); + assert.equal(validate(malformed, '0.8.0-rc.3').valid, false); } }); -for (const specification of ['0.8.0-rc.2', '0.8.0-rc.3']) { +for (const specification of ['0.8.0-rc.3']) { test(`resolves ${specification} component references with terminal provenance`, () => { const document = fixture('expected-valid', 'reusable-components.json', specification); const original = structuredClone(document); @@ -134,6 +134,10 @@ test('rejects component resolution for unsupported selectors', () => { () => resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-draft.4' }), /does not support specification: 0\.8\.0-draft\.4/ ); + assert.throws( + () => resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.4' }), + /does not support specification: 0\.8\.0-rc\.4/ + ); }); test('requires an explicit exact specification selector', () => { @@ -192,8 +196,8 @@ test('checks explicit selector consistency with declared schema identity', () => assert.equal(selected.specification, '0.8.0-rc.3'); const contradiction = resolveMcpDescriptionSpecification({ - $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' - }, { specification: '0.8.0-rc.2' }); + $schema: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json' + }, { specification: '0.8.0-rc.3' }); assert.equal(contradiction.status, 'unresolved'); assert.equal(contradiction.diagnostics[0].code, 'contradictory-snapshot-identity'); }); @@ -205,9 +209,10 @@ test('distinguishes invalid, unknown, and unsupported identity inputs', () => { }); test('dispatches both active exact selectors', () => { - const document = fixture('expected-valid', 'reusable-components.json', '0.8.0-rc.3'); - assert.equal(validate(document, '0.8.0-rc.3').valid, true); - assert.equal(validate(document, '0.8.0-rc.2').valid, true); + for (const specification of ['0.8.0-rc.3', '0.8.0-rc.4']) { + const document = fixture('expected-valid', 'reusable-components.json', specification); + assert.equal(validate(document, specification).valid, true); + } }); test('accepts an unknown JavaScript value and returns individual structural diagnostics', () => { diff --git a/packages/validator/test/browser.test.js b/packages/validator/test/browser.test.js index a07b5c6..13f873a 100644 --- a/packages/validator/test/browser.test.js +++ b/packages/validator/test/browser.test.js @@ -16,7 +16,7 @@ try { function fixture(group, name) { return JSON.parse(fs.readFileSync( - new URL(`./snapshots/0.8.0-rc.3/fixtures/${group}/${name}`, import.meta.url), + new URL(`./snapshots/0.8.0-rc.4/fixtures/${group}/${name}`, import.meta.url), 'utf8' )); } @@ -25,7 +25,7 @@ function validateUnderCsp(document) { globalThis.eval = () => { throw new EvalError('eval blocked by test CSP'); }; globalThis.Function = function BlockedFunction() { throw new EvalError('Function blocked by test CSP'); }; try { - return browser.validateMcpDescription(document, { specification: '0.8.0-rc.3' }); + return browser.validateMcpDescription(document, { specification: '0.8.0-rc.4' }); } finally { globalThis.eval = originalEval; globalThis.Function = OriginalFunction; diff --git a/packages/validator/test/fixtures.test.js b/packages/validator/test/fixtures.test.js index f2d4b51..8ae81a8 100644 --- a/packages/validator/test/fixtures.test.js +++ b/packages/validator/test/fixtures.test.js @@ -20,7 +20,7 @@ function parseFixture(filename) { return filename.endsWith('.json') ? JSON.parse(source) : YAML.parse(source); } -for (const specification of ['0.8.0-rc.2', '0.8.0-rc.3']) { +for (const specification of ['0.8.0-rc.3', '0.8.0-rc.4']) { const fixtureRoot = fileURLToPath(new URL(`./snapshots/${specification}/fixtures/`, import.meta.url)); for (const [group, expected] of [ ['expected-valid', 'valid'], diff --git a/packages/validator/test/snapshot.test.js b/packages/validator/test/snapshot.test.js index 7499d01..f882061 100644 --- a/packages/validator/test/snapshot.test.js +++ b/packages/validator/test/snapshot.test.js @@ -51,11 +51,6 @@ test('preserves the immutable Release Candidate 2 schema digest and metadata', ( const digest = createHash('sha256').update(embedded).digest('hex'); assert.equal(digest, rc2SchemaSha256); - assert.deepEqual(specificationProvenance['0.8.0-rc.2'], { - snapshotTag: 'v0.8.0-rc.2', - schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.2.json', - schemaSha256: rc2SchemaSha256 - }); }); test('preserves the immutable Release Candidate 3 schema digest and metadata', () => { @@ -69,4 +64,17 @@ test('preserves the immutable Release Candidate 3 schema digest and metadata', ( schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json', schemaSha256: rc3SchemaSha256 }); +}); + +test('preserves the immutable Release Candidate 4 schema digest and metadata', () => { + const embedded = fs.readFileSync(new URL('../src/snapshots/0.8.0-rc.4/schema.json', import.meta.url)); + const rc4SchemaSha256 = 'd38e54db859813b63be2a5c91dde91250035f18bcb5910208cf71fa6875d6eef'; + const digest = createHash('sha256').update(embedded).digest('hex'); + + assert.equal(digest, rc4SchemaSha256); + assert.deepEqual(specificationProvenance['0.8.0-rc.4'], { + snapshotTag: 'v0.8.0-rc.4', + schemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json', + schemaSha256: rc4SchemaSha256 + }); }); \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/README.md b/packages/validator/test/snapshots/0.8.0-rc.4/README.md new file mode 100644 index 0000000..d5d2f1d --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/README.md @@ -0,0 +1,3 @@ +# Validator fixture snapshot: 0.8.0-rc.4 + +The `fixtures/` tree is frozen for the immutable `0.8.0-rc.4` validator selector. diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/closed-protocol-enum.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/closed-protocol-enum.json new file mode 100644 index 0000000..b93a14c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/closed-protocol-enum.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "future-version", + "version": "1.0.0" + }, + "protocolVersions": [ + "2027-01-01" + ], + "transports": [ + { + "type": "stdio", + "command": "future-version" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-examples.json new file mode 100644 index 0000000..3ad4955 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-examples.json @@ -0,0 +1,64 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-examples", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "Input": { + "type": "object", + "properties": { "query": { "type": "string" } }, + "required": ["query"] + }, + "Output": { + "type": "object", + "properties": { "count": { "type": "integer" } }, + "required": ["count"] + } + }, + "toolExamples": { + "bad-input": { + "input": { "query": 42 }, + "result": { + "resultType": "complete", + "content": [], + "structuredContent": { "count": "one" } + } + } + }, + "resourceTemplateExamples": { + "bad-uri": { + "uri": "data://other/1", + "result": { + "resultType": "complete", + "ttlMs": 1, + "cacheScope": "private", + "contents": [{ "uri": "data://other/1", "text": "wrong" }] + } + } + }, + "promptExamples": { + "bad-arguments": { + "arguments": { "rogue": "oops" }, + "result": { + "resultType": "complete", + "messages": [{ "role": "user", "content": { "type": "text", "text": "Hello." } }] + } + } + } + }, + "tools": [{ + "name": "search", + "inputSchema": { "$componentRef": "#/components/schemas/Input" }, + "outputSchema": { "$componentRef": "#/components/schemas/Output" }, + "examples": { "bad": { "$componentRef": "#/components/toolExamples/bad-input" } } + }], + "resourceTemplates": [{ + "uriTemplate": "data://items/{id}", + "name": "item", + "examples": { "bad": { "$componentRef": "#/components/resourceTemplateExamples/bad-uri" } } + }], + "prompts": [{ + "name": "greeting", + "examples": { "bad": { "$componentRef": "#/components/promptExamples/bad-arguments" } } + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-schemas.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-schemas.json new file mode 100644 index 0000000..8bc818a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-contextual-schemas.json @@ -0,0 +1,29 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-context", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "NonObjectInput": { "type": "string" }, + "NestedForm": { + "type": "object", + "properties": { + "profile": { + "type": "object", + "properties": { "name": { "type": "string" } } + } + } + } + } + }, + "tools": [{ + "name": "invalid", + "inputSchema": { "$componentRef": "#/components/schemas/NonObjectInput" }, + "elicitations": [{ + "name": "profile", + "mode": "form", + "message": "Provide a profile", + "requestedSchema": { "$componentRef": "#/components/schemas/NestedForm" } + }] + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-extension-boundaries.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-extension-boundaries.json new file mode 100644 index 0000000..65ecfe5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-extension-boundaries.json @@ -0,0 +1,10 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-extensions", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "toolExamples": { + "x-map-extension": true + } + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-protocol-scope.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-protocol-scope.json new file mode 100644 index 0000000..852c765 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-protocol-scope.json @@ -0,0 +1,31 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-protocol-scope", "version": "1.0.0" }, + "protocolVersions": ["2025-11-25", "2026-07-28"], + "components": { + "resourceExamples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "private", + "contents": [{ "uri": "data://status", "text": "ready" }] + } + } + } + }, + "resources": [ + { + "protocolVersions": ["2025-11-25"], + "uri": "data://status", + "name": "status", + "examples": { "current": { "$componentRef": "#/components/resourceExamples/current" } } + }, + { + "protocolVersions": ["2026-07-28"], + "uri": "data://status", + "name": "status", + "examples": { "current": { "$componentRef": "#/components/resourceExamples/current" } } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-reference-resolution.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-reference-resolution.json new file mode 100644 index 0000000..9c980ff --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/component-reference-resolution.json @@ -0,0 +1,21 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-resolution", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "CycleA": { "$componentRef": "#/components/schemas/CycleB" }, + "CycleB": { "$componentRef": "#/components/schemas/CycleA" } + }, + "toolExamples": { + "sample": { + "input": {}, + "result": { "resultType": "complete", "content": [] } + } + } + }, + "tools": [ + { "name": "missing", "inputSchema": { "$componentRef": "#/components/schemas/Missing" } }, + { "name": "wrong", "inputSchema": { "$componentRef": "#/components/toolExamples/sample" } } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/components-empty-and-reference-shapes.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/components-empty-and-reference-shapes.json new file mode 100644 index 0000000..a6083d7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/components-empty-and-reference-shapes.json @@ -0,0 +1,15 @@ +{ + "mcpdesc": "0.8.0", + "info": { "name": "invalid-component-shapes", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": {} + }, + "tools": [{ + "name": "search", + "inputSchema": { + "$componentRef": "https://example.com/components.json#/schemas/Input", + "x-forbidden-sibling": true + } + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-mcp-header.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-mcp-header.json new file mode 100644 index 0000000..bcf77bf --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-mcp-header.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "duplicate-mcp-header", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "duplicate-mcp-header" + } + ], + "tools": [ + { + "name": "duplicate_headers", + "inputSchema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "x-mcp-header": "X-Region" + }, + "fallbackRegion": { + "type": "string", + "x-mcp-header": "x-region" + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-security-scope.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-security-scope.json new file mode 100644 index 0000000..a0e3f67 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-security-scope.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "duplicate-security-scope", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "duplicate-security-scope" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "records:read": "Read records" + } + } + } + } + }, + "security": [ + { + "oauth": [ + "records:read", + "records:read" + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-tag-reference.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-tag-reference.json new file mode 100644 index 0000000..9cc82da --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/duplicate-tag-reference.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "bad-tags", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "stdio", + "command": "bad-tags" + } + ], + "tags": [ + { + "name": "reference" + } + ], + "tools": [ + { + "name": "search", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "tags": [ + "unknown" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-branch-mixing.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-branch-mixing.json new file mode 100644 index 0000000..28c6bd0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-branch-mixing.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-branch", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-branch" + } + ], + "resources": [ + { + "uri": "example:///account", + "name": "account", + "elicitations": [ + { + "name": "mixed", + "mode": "form", + "message": "Supply account details.", + "url": "not a valid URI", + "requestedSchema": { + "type": "object", + "properties": {} + } + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-form-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-form-semantics.json new file mode 100644 index 0000000..974e8ac --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-form-semantics.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-form", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-form" + } + ], + "prompts": [ + { + "name": "prepare_release", + "elicitations": [ + { + "name": "release_channel", + "mode": "form", + "message": "Choose a release channel.", + "requestedSchema": { + "type": "object", + "properties": { + "channel": { + "type": "string", + "enum": [ + "stable", + "preview" + ], + "enumNames": [ + "Stable" + ], + "default": "nightly" + } + }, + "required": [ + "missing" + ] + } + }, + { + "name": "release_channel", + "mode": "form", + "message": "Choose it again.", + "requestedSchema": { + "type": "object", + "properties": {} + } + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-scope-outside-parent.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-scope-outside-parent.json new file mode 100644 index 0000000..7498413 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-scope-outside-parent.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-scope", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-scope" + } + ], + "resourceTemplates": [ + { + "uriTemplate": "example:///items/{id}", + "name": "item", + "protocolVersions": [ + "2025-11-25" + ], + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize item access.", + "protocolVersions": [ + "2026-07-28" + ] + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-version-mismatch.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-version-mismatch.json new file mode 100644 index 0000000..e8687b9 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/elicitation-version-mismatch.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-elicitation-version", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-elicitation-version" + } + ], + "tools": [ + { + "name": "authorize", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize access.", + "url": "https://auth.example.com/authorize" + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-client-capability-requirements.json new file mode 100644 index 0000000..4391dd7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-client-capability-requirements.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "prompts": [ + { + "name": "empty_requirement", + "clientRequirements": {} + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-nested-collections.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-nested-collections.json new file mode 100644 index 0000000..2de127f --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-nested-collections.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-nested-collections", + "version": "1.0.0", + "icons": [] + }, + "protocolVersions": [ + "2026-07-28" + ], + "capabilities": [ + { + "extensions": {} + } + ], + "tools": [ + { + "name": "empty_tool_collections", + "inputSchema": { + "type": "object" + }, + "icons": [], + "tags": [], + "elicitations": [] + } + ], + "prompts": [ + { + "name": "empty_prompt_collections", + "arguments": [] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-root-collections.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-root-collections.json new file mode 100644 index 0000000..b364e88 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-ordinary-root-collections.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-ordinary-collections", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [], + "securitySchemes": {}, + "capabilities": [], + "tools": [], + "resources": [], + "resourceTemplates": [], + "prompts": [], + "tags": [] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-tag-catalog-reference.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-tag-catalog-reference.json new file mode 100644 index 0000000..68f021a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/empty-tag-catalog-reference.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-tag-catalog", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "empty-tag-catalog" + } + ], + "tools": [ + { + "name": "categorized", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "tags": [ + "missing" + ] + } + ], + "tags": [] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-completion-example-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-completion-example-semantics.json new file mode 100644 index 0000000..a5967f1 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-completion-example-semantics.json @@ -0,0 +1,213 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-completion-example-semantics", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05", + "2025-03-26", + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-completion-example-semantics" + } + ], + "prompts": [ + { + "protocolVersions": [ + "2024-11-05" + ], + "name": "legacy_prompt", + "arguments": [ + { + "name": "topic" + } + ], + "completionExamples": { + "unsupported-version": { + "argument": { + "name": "topic", + "value": "ch" + }, + "result": { + "completion": { + "values": [ + "chess" + ] + } + } + } + } + }, + { + "protocolVersions": [ + "2025-03-26" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "context-too-early": { + "argument": { + "name": "name", + "value": "a" + }, + "context": { + "arguments": { + "department": "engineering" + } + }, + "result": { + "completion": { + "values": [ + "Ada" + ] + }, + "_meta": { + "captured": true + } + } + } + } + }, + { + "protocolVersions": [ + "2025-11-25" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "bad-membership": { + "argument": { + "name": "nickname", + "value": "a" + }, + "context": { + "arguments": { + "nickname": "Ada", + "region": "emea" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "Ada" + ] + }, + "jsonrpc": "2.0" + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "missing-result-type": { + "argument": { + "name": "name", + "value": "a" + }, + "result": { + "completion": { + "values": [ + "Ada" + ], + "hasMore": false + } + } + } + } + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "repo://{owner/{repository}/issues/{issue}", + "name": "broken_template", + "completionExamples": { + "bad-template": { + "argument": { + "name": "issue", + "value": "12" + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "120" + ] + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "bad-variables": { + "argument": { + "name": "ticket", + "value": "12" + }, + "context": { + "arguments": { + "issue": "12", + "workspace": "docs" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "120" + ] + }, + "requestState": "input-required" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-placement.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-placement.json new file mode 100644 index 0000000..a135b06 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-placement.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-mcp-header-placement", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-mcp-header-placement" + } + ], + "tools": [ + { + "name": "nested_composition_header", + "inputSchema": { + "type": "object", + "allOf": [ + { + "properties": { + "region": { + "type": "string", + "x-mcp-header": "Region" + } + } + } + ] + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-value.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-value.json new file mode 100644 index 0000000..6eec155 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-mcp-header-value.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-mcp-header-value", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-mcp-header-value" + } + ], + "tools": [ + { + "name": "invalid_header", + "inputSchema": { + "type": "object", + "properties": { + "region": { + "type": "number", + "x-mcp-header": "Invalid Header" + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-prompt-example-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-prompt-example-semantics.json new file mode 100644 index 0000000..83b214e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-prompt-example-semantics.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "invalid-prompt-example-semantics", "version": "1.0.0" }, + "protocolVersions": ["2025-03-26", "2025-11-25", "2026-07-28"], + "prompts": [ + { + "name": "city_briefing", + "protocolVersions": ["2026-07-28"], + "arguments": [ + { "name": "city", "required": true }, + { "name": "audience" } + ], + "examples": { + "unknown-and-missing": { + "arguments": { + "audience": "engineering", + "rogue": "oops" + }, + "result": { + "messages": [ + { + "role": "user", + "content": { "type": "text", "text": "Summarize Paris." } + } + ] + } + } + } + }, + { + "name": "legacy-result-type", + "protocolVersions": ["2025-11-25"], + "examples": { + "bad-version": { + "result": { + "resultType": "complete", + "messages": [ + { + "role": "assistant", + "content": { "type": "text", "text": "Hello." } + } + ] + } + } + } + }, + { + "name": "json-rpc-envelope", + "protocolVersions": ["2026-07-28"], + "examples": { + "bad-envelope": { + "result": { + "jsonrpc": "2.0", + "id": 1, + "resultType": "complete", + "messages": [] + } + } + } + }, + { + "name": "incomplete-workflow", + "protocolVersions": ["2026-07-28"], + "examples": { + "task-state": { + "result": { + "resultType": "complete", + "messages": [], + "task": { "taskId": "task-example" } + } + } + } + }, + { + "name": "legacy-content-shape", + "protocolVersions": ["2025-03-26"], + "examples": { + "resource-link-too-new": { + "result": { + "messages": [ + { + "role": "assistant", + "content": { + "type": "resource_link", + "uri": "briefing://example", + "name": "Example" + } + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-resource-annotations.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-resource-annotations.json new file mode 100644 index 0000000..3b8dcc4 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-resource-annotations.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-resource-annotations", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-resource-annotations" + } + ], + "resources": [ + { + "uri": "test://resource", + "name": "resource", + "annotations": { + "lastModified": "2026-08-24T10:00:00Z" + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://resource/{id}", + "name": "resource_by_id", + "annotations": { + "audience": [ + "operator" + ], + "priority": 2 + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-security-scheme-name.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-security-scheme-name.json new file mode 100644 index 0000000..cc09e26 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-security-scheme-name.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-security-name", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-security-name" + } + ], + "securitySchemes": { + "invalid name": { + "type": "http", + "scheme": "bearer" + } + } +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-example-result-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-example-result-semantics.json new file mode 100644 index 0000000..db16234 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-example-result-semantics.json @@ -0,0 +1,67 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "invalid-tool-example-results", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "missing_structured_success", + "inputSchema": { "type": "object" }, + "outputSchema": { "type": "object" }, + "examples": { + "missing": { + "input": {}, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "Missing structured value" }] + } + } + } + }, + { + "name": "structured_error", + "inputSchema": { "type": "object" }, + "examples": { + "business-error": { + "input": {}, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "Rejected" }], + "structuredContent": { "code": "rejected" }, + "isError": true + } + } + } + }, + { + "name": "json_rpc_envelope", + "inputSchema": { "type": "object" }, + "examples": { + "enveloped": { + "input": {}, + "result": { + "jsonrpc": "2.0", + "id": 1, + "resultType": "complete", + "content": [] + } + } + } + }, + { + "name": "incomplete_workflow", + "inputSchema": { "type": "object" }, + "examples": { + "task-result": { + "input": {}, + "result": { + "resultType": "complete", + "content": [], + "task": { "taskId": "task-example" } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json new file mode 100644 index 0000000..238a956 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/invalid-tool-interaction-example-semantics.json @@ -0,0 +1,140 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-tool-interaction-example-semantics", + "version": "1.0.0" + }, + "protocolVersions": ["2025-06-18"], + "tools": [ + { + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "confirm", + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "boolean" } + }, + "required": ["approved"] + } + } + ], + "interactionExamples": { + "broken": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "elicitation", + "declaration": "missing", + "request": { + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + }, + "response": { + "action": "accept", + "content": { + "approved": true + } + } + }, + { + "type": "elicitation", + "declaration": "confirm", + "request": { + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "string" } + }, + "required": ["approved"] + } + }, + "response": { + "action": "accept", + "content": { + "approved": true + } + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Summarize the release plan." + } + } + ], + "tools": [ + { + "name": "diff_summary", + "inputSchema": { + "type": "object" + } + } + ], + "maxTokens": 120 + }, + "response": { + "role": "assistant", + "content": { + "type": "text", + "text": "Check the changelog first." + }, + "model": "claude-3-sonnet-20240229", + "stopReason": "endTurn" + } + }, + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "https://example.com/not-a-file-root" + } + ] + } + } + ], + "result": { + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-completion-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-completion-examples.json new file mode 100644 index 0000000..59f2350 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-completion-examples.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-completion-examples", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "prompts": [ + { + "name": "team_lead", + "completionExamples": {} + } + ], + "resourceTemplates": [ + { + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "bad": { + "argument": { + "name": "issue" + }, + "context": {}, + "result": { + "completion": { + "values": [ + 12 + ] + } + }, + "$componentRef": "#/components/completionExamples/bad" + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-extension-identifier.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-extension-identifier.json new file mode 100644 index 0000000..f70855b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-extension-identifier.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-extension-identifier", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-extension-identifier" + } + ], + "capabilities": [ + { + "extensions": { + "missing-prefix": {} + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json new file mode 100644 index 0000000..440cc94 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-pre-dialect-tool-schema-shape.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-pre-dialect-tool-schema-shape", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-pre-dialect-tool-schema-shape" + } + ], + "tools": [ + { + "name": "malformed_legacy_schema", + "inputSchema": { + "type": "object", + "required": "value" + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-prompt-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-prompt-examples.json new file mode 100644 index 0000000..732be0a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-prompt-examples.json @@ -0,0 +1,53 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "malformed-prompt-examples", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "prompts": [ + { + "name": "empty_map", + "examples": {} + }, + { + "name": "invalid_name", + "examples": { + "contains spaces": { + "result": { + "resultType": "complete", + "messages": [] + } + } + } + }, + { + "name": "bad_arguments_shape", + "examples": { + "array": { + "arguments": [], + "result": { + "resultType": "complete", + "messages": [] + } + } + } + }, + { + "name": "missing_result", + "examples": { + "missing": { "arguments": {} } + } + }, + { + "name": "non_string_argument", + "examples": { + "number": { + "arguments": { "count": 1 }, + "result": { + "resultType": "complete", + "messages": [] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-examples.json new file mode 100644 index 0000000..d4986da --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-examples.json @@ -0,0 +1,81 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-resource-examples", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-resource-examples" + } + ], + "resources": [ + { + "uri": "test://empty", + "name": "empty", + "examples": {} + }, + { + "uri": "test://missing-result", + "name": "missing_result", + "examples": { + "invalid name": {} + } + }, + { + "uri": "test://ambiguous-content", + "name": "ambiguous_content", + "examples": { + "both-text-and-blob": { + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "test://ambiguous-content", + "text": "text", + "blob": "dGV4dA==" + } + ] + } + } + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://items/{id}", + "name": "item", + "examples": { + "missing-uri": { + "result": { + "resultType": "complete", + "contents": [] + } + } + } + }, + { + "uriTemplate": "test://items/{id", + "name": "malformed_template", + "examples": { + "concrete": { + "uri": "test://items/123", + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "test://items/123", + "text": "item" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-template-example.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-template-example.json new file mode 100644 index 0000000..bf8c037 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-resource-template-example.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-resource-template-example", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-resource-template-example" + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://items/{id", + "name": "malformed_template", + "examples": { + "concrete": { + "uri": "test://items/123", + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "test://items/123", + "text": "item" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-examples.json new file mode 100644 index 0000000..12a76bd --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-examples.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "malformed-tool-examples", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "empty_map", + "inputSchema": { "type": "object" }, + "examples": {} + }, + { + "name": "invalid_name", + "inputSchema": { "type": "object" }, + "examples": { + "contains spaces": { + "input": {}, + "result": { "resultType": "complete", "content": [] } + } + } + }, + { + "name": "missing_input", + "inputSchema": { "type": "object" }, + "examples": { + "missing": { + "result": { "resultType": "complete", "content": [] } + } + } + }, + { + "name": "non_object_input", + "inputSchema": { "type": "object" }, + "examples": { + "array": { + "input": [], + "result": { "resultType": "complete", "content": [] } + } + } + }, + { + "name": "missing_result", + "inputSchema": { "type": "object" }, + "examples": { + "missing": { "input": {} } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-interaction-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-interaction-examples.json new file mode 100644 index 0000000..1ac86e3 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-interaction-examples.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-tool-interaction-examples", + "version": "1.0.0" + }, + "protocolVersions": ["2025-11-25"], + "tools": [ + { + "name": "prepare_release", + "inputSchema": { + "type": "object" + }, + "interactionExamples": { + "broken": { + "input": [], + "steps": [], + "result": { + "content": [] + }, + "description": "not allowed" + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-schema.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-schema.json new file mode 100644 index 0000000..10ecd5e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/malformed-tool-schema.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "malformed-tool-schema", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "malformed-tool-schema" + } + ], + "tools": [ + { + "name": "malformed_schema", + "inputSchema": { + "type": "object", + "required": "query" + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-invalid-key.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-invalid-key.json new file mode 100644 index 0000000..412790b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-invalid-key.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "meta-invalid-key", "version": "1.0.0" }, + "protocolVersions": ["2025-11-25"], + "transports": [{ "type": "stdio", "command": "meta-invalid-key" }], + "tools": [ + { + "name": "invalid", + "inputSchema": { "type": "object" }, + "_meta": { + "bad key": true + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-reserved-key-misuse.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-reserved-key-misuse.json new file mode 100644 index 0000000..3f79369 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/meta-reserved-key-misuse.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "meta-reserved-key-misuse", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "meta-reserved-key-misuse" }], + "tools": [ + { + "name": "invalid-context", + "inputSchema": { "type": "object" }, + "_meta": { + "progressToken": "request-only" + }, + "examples": { + "invalid-server-info": { + "input": {}, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "invalid" }], + "_meta": { + "io.modelcontextprotocol/serverInfo": "not-an-implementation" + } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/missing-tool-input-schema.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/missing-tool-input-schema.json new file mode 100644 index 0000000..72fdc18 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/missing-tool-input-schema.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "missing-tool-schema", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "missing-tool-schema" + } + ], + "tools": [ + { + "name": "missing_schema" + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-oauth-scopes.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-oauth-scopes.json new file mode 100644 index 0000000..decaee5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-oauth-scopes.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "scope-misuse", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://scope-misuse.example.com/mcp" + } + ], + "securitySchemes": { + "bearer": { + "type": "http", + "scheme": "bearer" + } + }, + "security": [ + { + "bearer": [ + "admin" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-object-output-schema-before-2026.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-object-output-schema-before-2026.json new file mode 100644 index 0000000..eb7b0c2 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/non-object-output-schema-before-2026.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "non-object-output-before-2026", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "non-object-output-before-2026" + } + ], + "tools": [ + { + "name": "array_output", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "outputSchema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/oauth-flow-missing-required-url.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/oauth-flow-missing-required-url.json new file mode 100644 index 0000000..683c102 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/oauth-flow-missing-required-url.json @@ -0,0 +1,28 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "oauth-flow-missing-required-url", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "oauth-flow-missing-required-url" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "scopes": {} + } + } + } + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json new file mode 100644 index 0000000..69149d0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-cannot-weaken-core.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-cannot-weaken-core", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "tools": [ + { + "name": "search", + "x-example-relaxed-validation": { + "inputSchemaOptional": true + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-capability-map.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-capability-map.json new file mode 100644 index 0000000..4b179ac --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-capability-map.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-capability-map", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "capabilities": [ + { + "extensions": { + "x-example-policy": { + "enabled": true + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-domain-map.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-domain-map.json new file mode 100644 index 0000000..c54072e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-domain-map.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-domain-map", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "securitySchemes": { + "x-example-policy": { + "owner": "identity" + } + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-native-content.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-native-content.json new file mode 100644 index 0000000..3834300 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-native-content.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-native-content", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "tools": [ + { + "name": "search", + "inputSchema": { + "type": "object" + }, + "examples": { + "default": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Example", + "x-example-style": "brief" + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-security-requirement.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-security-requirement.json new file mode 100644 index 0000000..5384c1a --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-extension-in-security-requirement.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-extension-in-security-requirement", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "security": [ + { + "x-example-policy": { + "owner": "identity" + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-unknown-property.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-unknown-property.json new file mode 100644 index 0000000..1827938 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/object-level-unknown-property.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-unknown-property", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "tools": [ + { + "name": "search", + "inputSchema": { + "type": "object" + }, + "acmeRisk": "high" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-capabilities.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-capabilities.json new file mode 100644 index 0000000..1e5a52f --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-capabilities.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "overlap-caps", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "overlap-caps" + } + ], + "capabilities": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "tools": { + "listChanged": true + } + }, + { + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "resources": { + "subscribe": true + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-tool-scope.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-tool-scope.json new file mode 100644 index 0000000..02a31bf --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/overlapping-tool-scope.json @@ -0,0 +1,37 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "dup-tool", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "dup-tool" + } + ], + "tools": [ + { + "name": "run_job", + "inputSchema": { + "type": "object", + "additionalProperties": false + } + }, + { + "name": "run_job", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-cache-fields.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-cache-fields.json new file mode 100644 index 0000000..c4e3f5c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-cache-fields.json @@ -0,0 +1,83 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-resource-example-cache-fields", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-resource-example-cache-fields" + } + ], + "resources": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "example:///missing-cache-fields", + "name": "missing_cache_fields", + "examples": { + "missing": { + "result": { + "resultType": "complete", + "contents": [ + { + "uri": "example:///missing-cache-fields", + "text": "missing required cache hints" + } + ] + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "example:///invalid-cache-fields", + "name": "invalid_cache_fields", + "examples": { + "invalid": { + "result": { + "resultType": "complete", + "ttlMs": -1, + "cacheScope": "shared", + "contents": [ + { + "uri": "example:///invalid-cache-fields", + "text": "invalid cache hints" + } + ] + } + } + } + }, + { + "protocolVersions": [ + "2025-11-25" + ], + "uri": "example:///premature-cache-fields", + "name": "premature_cache_fields", + "examples": { + "premature": { + "result": { + "ttlMs": 60000, + "cacheScope": "private", + "contents": [ + { + "uri": "example:///premature-cache-fields", + "text": "fields are not defined by this revision" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-result-semantics.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-result-semantics.json new file mode 100644 index 0000000..39861eb --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/resource-example-result-semantics.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-resource-example-semantics", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05", + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-resource-example-semantics" + } + ], + "resources": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uri": "asset:///invalid.bin", + "name": "invalid_binary", + "examples": { + "invalid-result": { + "result": { + "resultType": "complete", + "jsonrpc": "2.0", + "task": {}, + "contents": [ + { + "uri": "asset:///invalid.bin", + "blob": "not base64" + } + ] + } + } + } + }, + { + "protocolVersions": [ + "2024-11-05" + ], + "uri": "test://legacy", + "name": "legacy", + "examples": { + "unsupported-metadata": { + "result": { + "contents": [ + { + "uri": "test://legacy", + "text": "legacy", + "_meta": { + "unsupported": true + } + } + ], + "_meta": { + "unsupported": true + } + } + } + } + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uriTemplate": "chess://games/{game_id}", + "name": "game", + "examples": { + "not-an-expansion": { + "uri": "chess://players/example-1234", + "result": { + "contents": [ + { + "uri": "chess://players/example-1234", + "text": "wrong route" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-execution.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-execution.json new file mode 100644 index 0000000..7b6ccd1 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-execution.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "invalid-execution-revision", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "invalid-execution-revision" + } + ], + "tools": [ + { + "name": "run_job", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "execution": { + "taskSupport": "optional" + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-mcp-header.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-mcp-header.json new file mode 100644 index 0000000..736fce3 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-mcp-header.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-inapplicable-mcp-header", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "revision-inapplicable-mcp-header" + } + ], + "tools": [ + { + "name": "early_header", + "inputSchema": { + "type": "object", + "properties": { + "region": { + "type": "string", + "x-mcp-header": "Region" + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-streamable-http.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-streamable-http.json new file mode 100644 index 0000000..9a5ce45 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-streamable-http.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-inapplicable-streamable-http", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://example.com/mcp" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json new file mode 100644 index 0000000..528d7eb --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-inapplicable-tool-schema-dialect.json @@ -0,0 +1,27 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-inapplicable-tool-schema-dialect", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "stdio", + "command": "revision-inapplicable-tool-schema-dialect" + } + ], + "tools": [ + { + "name": "early_dialect_declaration", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "additionalProperties": false + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json new file mode 100644 index 0000000..aca7edf --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-client-capability-requirements.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "revision-incompatible-client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "tools": [ + { + "name": "unsplit_task_requirement", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "clientRequirements": { + "tasks": { + "list": {} + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-tool-example.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-tool-example.json new file mode 100644 index 0000000..65d01e9 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/revision-incompatible-tool-example.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "revision-incompatible-tool-example", "version": "1.0.0" }, + "protocolVersions": ["2025-03-26"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "old_tool", + "inputSchema": { "type": "object" }, + "examples": { + "future-result": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { + "type": "resource_link", + "uri": "resource://example/item", + "name": "Future resource link" + } + ], + "structuredContent": { "future": true } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/root-version-without-transport.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/root-version-without-transport.json new file mode 100644 index 0000000..d37cbec --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/root-version-without-transport.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "coverage-gap", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "coverage-gap", + "protocolVersions": [ + "2025-11-25" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/scoped-version-not-in-root.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/scoped-version-not-in-root.json new file mode 100644 index 0000000..a08a6d5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/scoped-version-not-in-root.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "bad-scope", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "bad-scope", + "protocolVersions": [ + "2026-07-28" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/tool-example-schema-mismatches.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/tool-example-schema-mismatches.json new file mode 100644 index 0000000..8dd4cdd --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/tool-example-schema-mismatches.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "tool-example-schema-mismatches", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "fixture" }], + "tools": [ + { + "name": "mismatched_values", + "inputSchema": { + "type": "object", + "properties": { "count": { "type": "integer" } }, + "required": ["count"] + }, + "outputSchema": { + "type": "object", + "properties": { "total": { "type": "integer" } }, + "required": ["total"] + }, + "examples": { + "wrong-types": { + "input": { "count": "one" }, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "one" }], + "structuredContent": { "total": "one" } + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unknown-security-reference.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unknown-security-reference.json new file mode 100644 index 0000000..f976c5e --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unknown-security-reference.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "bad-security", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://bad-security.example.com/mcp" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "issues:read": "Read issues" + } + } + } + } + }, + "security": [ + { + "missing": [] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unresolved-local-tool-ref.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unresolved-local-tool-ref.json new file mode 100644 index 0000000..fb5ae86 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-invalid/unresolved-local-tool-ref.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unresolved-local-tool-ref", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unresolved-local-tool-ref" + } + ], + "tools": [ + { + "name": "missing_local_definition", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "identifier": { + "$ref": "#/$defs/identifier" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/client-capability-requirements.json new file mode 100644 index 0000000..e0cdab0 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/client-capability-requirements.json @@ -0,0 +1,109 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18", + "2025-11-25", + "2026-07-28" + ], + "capabilities": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "extensions": { + "io.modelcontextprotocol/ui": {} + } + } + ], + "tools": [ + { + "name": "rebuild", + "protocolVersions": [ + "2025-11-25" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "clientRequirements": { + "tasks": { + "requests": { + "sampling": { + "createMessage": {} + } + } + } + } + }, + { + "name": "rebuild", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "clientRequirements": { + "extensions": { + "io.modelcontextprotocol/tasks": {}, + "io.modelcontextprotocol/ui": { + "mimeTypes": [ + "text/html;profile=mcp-app" + ] + } + } + } + } + ], + "resources": [ + { + "uri": "workspace://current", + "name": "current_workspace", + "protocolVersions": [ + "2025-06-18" + ], + "clientRequirements": { + "roots": { + "listChanged": true + } + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "workspace://{path}", + "name": "workspace_file", + "protocolVersions": [ + "2026-07-28" + ], + "clientRequirements": { + "elicitation": { + "form": {} + } + } + } + ], + "prompts": [ + { + "name": "review_with_model", + "protocolVersions": [ + "2025-11-25" + ], + "clientRequirements": { + "sampling": { + "tools": {} + }, + "experimental": { + "com.example/review": {} + }, + "futureCapability": {} + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/distinct-tool-and-resource-annotations.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/distinct-tool-and-resource-annotations.json new file mode 100644 index 0000000..f479df7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/distinct-tool-and-resource-annotations.json @@ -0,0 +1,61 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "annotation-types", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "annotation-types" + } + ], + "tools": [ + { + "name": "inspect", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "annotations": { + "title": "Inspect", + "readOnlyHint": true, + "destructiveHint": false, + "idempotentHint": true, + "openWorldHint": false, + "futureToolHint": "preserved" + } + } + ], + "resources": [ + { + "uri": "test://resource", + "name": "resource", + "annotations": { + "audience": [ + "user", + "assistant" + ], + "priority": 0.8, + "lastModified": "2026-08-24T10:00:00Z", + "futureResourceHint": "preserved" + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://resource/{id}", + "name": "resource_by_id", + "annotations": { + "audience": [ + "assistant" + ], + "priority": 0.5 + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/elicitation-declarations.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/elicitation-declarations.json new file mode 100644 index 0000000..0617ce8 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/elicitation-declarations.json @@ -0,0 +1,96 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "elicitation-example", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18", + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "elicitation-example" + } + ], + "tools": [ + { + "name": "assign_issue", + "inputSchema": { + "type": "object", + "properties": { + "issue": { + "type": "integer" + } + }, + "required": [ + "issue" + ], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "choose_assignee", + "mode": "form", + "message": "Who should own this issue?", + "requestedSchema": { + "type": "object", + "properties": { + "assignee": { + "type": "string", + "title": "Assignee", + "minLength": 1 + } + }, + "required": [ + "assignee" + ] + } + }, + { + "name": "authorize_tracker", + "mode": "url", + "message": "Authorize access to the issue tracker.", + "when": "The current authorization grant is insufficient.", + "url": "https://auth.example.com/authorize", + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ] + }, + { + "name": "choose_labels", + "mode": "form", + "message": "Choose labels for this issue.", + "requestedSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "labels": { + "type": "array", + "title": "Labels", + "items": { + "type": "string", + "enum": [ + "bug", + "feature" + ] + }, + "default": [ + "bug" + ] + } + } + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ] + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/integrated-draft2-features.yaml b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/integrated-draft2-features.yaml new file mode 100644 index 0000000..b39bb05 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/integrated-draft2-features.yaml @@ -0,0 +1,56 @@ +$schema: https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json +mcpdesc: 0.8.0 +info: + name: integrated-draft2-features + version: 1.0.0 + x-example-owner: platform +protocolVersions: [2026-07-28] +securitySchemes: + api-key: + type: apiKey + in: header + name: X-API-Key + x-example-rotation: managed +security: + - api-key: [] +components: + schemas: + Input: + type: object + properties: + query: + type: string + required: [query] + additionalProperties: false + Unused: + type: object + x-named-schema: + type: object + toolExamples: + basic: + input: + query: mcp + result: + resultType: complete + content: + - type: text + text: One result + x-example-source: documentation + x-example-registry: shared +tools: + - name: search + inputSchema: + $componentRef: "#/components/schemas/Input" + examples: + basic: + $componentRef: "#/components/toolExamples/basic" + clientRequirements: + elicitation: + form: {} + security: [] + x-example-stability: stable + - name: status + inputSchema: + type: object + additionalProperties: false +x-example-document: integrated \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/meta-literal-values.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/meta-literal-values.json new file mode 100644 index 0000000..a905105 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/meta-literal-values.json @@ -0,0 +1,102 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "meta-literal-values", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "transports": [ + { + "type": "stdio", + "command": "meta-literal-values" + } + ], + "tools": [ + { + "name": "status", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "_meta": { + "com.example/status": "stable", + "display_hint": "compact" + }, + "examples": { + "complete": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Ready", + "_meta": { + "com.example/render-mode": "badge" + } + } + ], + "_meta": { + "io.modelcontextprotocol/serverInfo": { + "name": "example-server", + "version": "1.0.0" + }, + "traceparent": "00-00000000000000000000000000000001-0000000000000001-01" + } + } + } + } + } + ], + "resources": [ + { + "uri": "example:///status", + "name": "status", + "_meta": { + "com.example/classification": "public" + }, + "examples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 0, + "cacheScope": "private", + "contents": [ + { + "uri": "example:///status", + "text": "Ready", + "_meta": { + "captured_at": "redacted" + } + } + ], + "_meta": { + "io.modelcontextprotocol/serverInfo": { + "name": "example-server", + "version": "1.0.0" + } + } + } + } + } + } + ], + "resourceTemplates": [ + { + "uriTemplate": "example:///items/{id}", + "name": "item", + "_meta": { + "com.example/stability": "experimental" + } + } + ], + "prompts": [ + { + "name": "summarize", + "_meta": { + "com.example/category": "summary" + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/minimal-zero-primitives.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/minimal-zero-primitives.json new file mode 100644 index 0000000..dfc6a69 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/minimal-zero-primitives.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "empty-server", + "version": "0.1.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "instructions": "This server is under construction. Connection details and primitives are not declared." +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-completion-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-completion-examples.json new file mode 100644 index 0000000..99eb4c1 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-completion-examples.json @@ -0,0 +1,172 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "completion-example-catalogue", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "completion-example-catalogue" + } + ], + "capabilities": [ + { + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "completions": {} + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "issue-prefix": { + "argument": { + "name": "issue", + "value": "12" + }, + "result": { + "completion": { + "values": [ + "120", + "121", + "129" + ], + "hasMore": true, + "total": 14 + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "issue-prefix": { + "argument": { + "name": "issue", + "value": "12" + }, + "context": { + "arguments": { + "owner": "example", + "repository": "widgets" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "120", + "121", + "129" + ], + "hasMore": true, + "total": 14 + }, + "_meta": { + "captured": "inspector" + } + } + } + } + } + ], + "prompts": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "engineering-a": { + "argument": { + "name": "name", + "value": "a" + }, + "context": { + "arguments": { + "department": "engineering" + } + }, + "result": { + "completion": { + "values": [ + "Ada", + "Alan" + ], + "total": 2, + "hasMore": false + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "name": "team_lead", + "arguments": [ + { + "name": "department", + "required": true + }, + { + "name": "name", + "required": true + } + ], + "completionExamples": { + "engineering-a": { + "argument": { + "name": "name", + "value": "a" + }, + "context": { + "arguments": { + "department": "engineering" + } + }, + "result": { + "resultType": "complete", + "completion": { + "values": [ + "Ada", + "Alan" + ], + "total": 2, + "hasMore": false + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-prompt-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-prompt-examples.json new file mode 100644 index 0000000..3d871ed --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-prompt-examples.json @@ -0,0 +1,90 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "prompt-example-fixture", + "version": "1.0.0" + }, + "protocolVersions": ["2025-11-25", "2026-07-28"], + "components": { + "promptExamples": { + "default-greeting": { + "arguments": {}, + "result": { + "resultType": "complete", + "messages": [ + { + "role": "assistant", + "content": { "type": "text", "text": "Hello." } + } + ] + } + } + } + }, + "prompts": [ + { + "name": "greeting", + "protocolVersions": ["2026-07-28"], + "examples": { + "default": { + "$componentRef": "#/components/promptExamples/default-greeting" + } + } + }, + { + "name": "greeting", + "protocolVersions": ["2025-11-25"], + "examples": { + "default": { + "result": { + "messages": [ + { + "role": "assistant", + "content": { "type": "text", "text": "Hello." } + } + ] + } + } + } + }, + { + "name": "city_briefing", + "protocolVersions": ["2026-07-28"], + "arguments": [ + { "name": "city", "required": true }, + { "name": "audience" } + ], + "examples": { + "paris-engineering": { + "arguments": { + "city": "Paris", + "audience": "engineering" + }, + "result": { + "resultType": "complete", + "description": "Engineering briefing for Paris", + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Summarize current engineering considerations for Paris." + } + }, + { + "role": "assistant", + "content": { + "type": "resource_link", + "uri": "briefing://paris/engineering", + "name": "Paris engineering briefing", + "mimeType": "text/markdown" + } + } + ] + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-resource-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-resource-examples.json new file mode 100644 index 0000000..fce9ac3 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-resource-examples.json @@ -0,0 +1,140 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "resource-example-catalogue", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "resource-example-catalogue" + } + ], + "resources": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "uri": "file:///project/src/", + "name": "source_directory", + "mimeType": "inode/directory", + "examples": { + "two-files": { + "result": { + "contents": [ + { + "uri": "file:///project/src/", + "mimeType": "inode/directory", + "text": "main.rs\nlib.rs\n" + }, + { + "uri": "file:///project/src/main.rs", + "mimeType": "text/x-rust", + "text": "fn main() {}\n", + "_meta": { + "captured": true + } + }, + { + "uri": "file:///project/src/lib.rs", + "mimeType": "text/x-rust", + "text": "pub fn answer() -> u8 { 42 }\n" + } + ], + "_meta": { + "snapshot": "example" + } + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "file:///project/src/", + "name": "source_directory", + "mimeType": "inode/directory", + "examples": { + "two-files": { + "result": { + "resultType": "complete", + "ttlMs": 60000, + "cacheScope": "private", + "contents": [ + { + "uri": "file:///project/src/", + "mimeType": "inode/directory", + "text": "main.rs\nlib.rs\n" + }, + { + "uri": "file:///project/src/main.rs", + "mimeType": "text/x-rust", + "text": "fn main() {}\n" + }, + { + "uri": "file:///project/src/lib.rs", + "mimeType": "text/x-rust", + "text": "pub fn answer() -> u8 { 42 }\n" + } + ] + } + } + } + }, + { + "uri": "asset:///pixel.bin", + "name": "pixel", + "mimeType": "application/octet-stream", + "size": 3, + "examples": { + "three-bytes": { + "result": { + "contents": [ + { + "uri": "asset:///pixel.bin", + "mimeType": "application/octet-stream", + "blob": "AAEC" + } + ] + } + } + }, + "protocolVersions": [ + "2025-11-25" + ] + } + ], + "resourceTemplates": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uriTemplate": "chess://games/{game_id}", + "name": "game_detail", + "mimeType": "application/json", + "examples": { + "sample-game": { + "uri": "chess://games/example-1234", + "result": { + "resultType": "complete", + "ttlMs": 300000, + "cacheScope": "public", + "contents": [ + { + "uri": "chess://games/example-1234", + "mimeType": "application/json", + "text": "{\"id\":\"example-1234\",\"result\":\"1-0\"}" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-examples.json new file mode 100644 index 0000000..c1293d5 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-examples.json @@ -0,0 +1,105 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "tool-example-fixture", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "transports": [ + { + "type": "stdio", + "command": "tool-example-fixture" + } + ], + "tools": [ + { + "name": "weather", + "inputSchema": { + "type": "object", + "properties": { + "city": { "type": "string" } + }, + "required": ["city"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "temperature": { "type": "number" } + }, + "required": ["temperature"], + "additionalProperties": false + }, + "examples": { + "paris.complete": { + "input": { "city": "Paris" }, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "Paris: 21.5 C" }, + { "type": "image", "data": "aW1hZ2U=", "mimeType": "image/png" }, + { "type": "audio", "data": "YXVkaW8=", "mimeType": "audio/wav" }, + { + "type": "resource", + "resource": { + "uri": "weather://paris/report", + "mimeType": "text/plain", + "text": "Clear" + } + }, + { + "type": "resource_link", + "uri": "weather://paris/map", + "name": "Paris map", + "mimeType": "image/png" + } + ], + "structuredContent": { "temperature": 21.5 }, + "isError": false + } + } + } + }, + { + "name": "current_time", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "examples": { + "utc": { + "input": {}, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "2026-08-24T12:00:00Z" } + ] + } + } + } + }, + { + "name": "quota_limited_search", + "inputSchema": { + "type": "object", + "properties": { + "query": { "type": "string" } + }, + "required": ["query"] + }, + "examples": { + "tool-rate-limit": { + "input": { "query": "example" }, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "Tool quota exhausted; retry later." } + ], + "isError": true + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-interaction-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-interaction-examples.json new file mode 100644 index 0000000..f16f630 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/named-tool-interaction-examples.json @@ -0,0 +1,258 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "tool-interaction-examples", + "version": "1.0.0" + }, + "protocolVersions": ["2025-11-25", "2026-07-28"], + "tools": [ + { + "protocolVersions": ["2025-11-25"], + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "confirm", + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "boolean" } + }, + "required": ["approved"] + } + } + ], + "interactionExamples": { + "approved-release": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "file:///workspace/example", + "name": "Example workspace" + } + ] + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Summarize the release plan." + } + } + ], + "tools": [ + { + "name": "diff_summary", + "description": "Summarize pending release changes.", + "inputSchema": { + "type": "object", + "properties": { + "branch": { "type": "string" } + }, + "required": ["branch"] + } + } + ], + "toolChoice": { + "mode": "auto" + }, + "maxTokens": 180 + }, + "response": { + "role": "assistant", + "content": { + "type": "text", + "text": "Run smoke tests and confirm the changelog before publishing version 2.0.0." + }, + "model": "claude-3-sonnet-20240229", + "stopReason": "endTurn" + } + }, + { + "type": "elicitation", + "declaration": "confirm", + "request": { + "mode": "form", + "message": "Approve this release?", + "requestedSchema": { + "type": "object", + "properties": { + "approved": { "type": "boolean" } + }, + "required": ["approved"] + } + }, + "response": { + "action": "accept", + "content": { + "approved": true + } + } + } + ], + "result": { + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ], + "structuredContent": { + "status": "prepared" + } + } + } + } + }, + { + "protocolVersions": ["2026-07-28"], + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + } + ], + "interactionExamples": { + "authorized-release": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "file:///workspace/example", + "name": "Example workspace" + } + ] + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Check whether the release note wording is ready to publish." + } + } + ], + "includeContext": "thisServer", + "tools": [ + { + "name": "inspect_notes", + "description": "Inspect the draft release notes.", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"] + } + } + ], + "toolChoice": { + "mode": "required" + }, + "maxTokens": 220 + }, + "response": { + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "call_notes_1", + "name": "inspect_notes", + "input": { + "version": "2.0.0" + } + } + ], + "model": "claude-3-sonnet-20240229", + "stopReason": "toolUse" + } + }, + { + "type": "elicitation", + "declaration": "authorize", + "request": { + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + }, + "response": { + "action": "accept" + } + } + ], + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ], + "structuredContent": { + "status": "prepared" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/object-level-specification-extensions.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/object-level-specification-extensions.json new file mode 100644 index 0000000..bcad525 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/object-level-specification-extensions.json @@ -0,0 +1,203 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "object-level-specification-extensions", + "version": "1.0.0", + "icons": [ + { + "src": "https://example.com/icon.png", + "x-example-display": "compact" + } + ], + "contact": { + "name": "Platform Team", + "x-example-directory-id": 42 + }, + "license": { + "name": "Apache-2.0", + "x-example-reviewed": true + }, + "x-example-owner": { + "team": "platform", + "protocolVersions": [ + "extension-private-version" + ] + } + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "extension-server", + "x-example-runtime": "local" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://example.com/authorize", + "tokenUrl": "https://example.com/token", + "scopes": { + "tools:read": "Use read-only tools" + }, + "x-example-token-profile": null + }, + "x-example-flow-policy": [ + "interactive" + ] + }, + "x-example-security-owner": "identity" + } + }, + "capabilities": [ + { + "tools": { + "listChanged": true, + "x-example-refresh-budget": 5 + }, + "resources": { + "subscribe": true, + "x-example-subscription-tier": "standard" + }, + "prompts": { + "listChanged": false, + "x-example-curated": true + }, + "x-example-capability-source": "curated" + } + ], + "tools": [ + { + "name": "search", + "protocolVersions": [ + "2025-11-25" + ], + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": [ + "query" + ] + }, + "examples": { + "default": { + "input": { + "query": "example" + }, + "result": { + "content": [ + { + "type": "text", + "text": "Example result" + } + ] + }, + "x-example-confidence": 0.9 + } + }, + "elicitations": [ + { + "name": "confirm_search", + "mode": "form", + "message": "Continue?", + "requestedSchema": { + "type": "object", + "properties": { + "continue": { + "type": "boolean" + } + } + }, + "x-example-review-class": "routine" + } + ], + "x-example-lifecycle": { + "status": "legacy" + } + }, + { + "name": "search", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": [ + "query" + ] + }, + "x-example-lifecycle": { + "status": "current" + } + } + ], + "resources": [ + { + "protocolVersions": [ + "2026-07-28" + ], + "uri": "test://resource", + "name": "resource", + "examples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "private", + "contents": [ + { + "uri": "test://resource", + "text": "Example resource" + } + ] + }, + "x-example-origin": "curated" + } + }, + "x-example-owner": "docs" + } + ], + "resourceTemplates": [ + { + "uriTemplate": "test://resource/{id}", + "name": "resource-template", + "x-example-owner": "docs" + } + ], + "prompts": [ + { + "name": "summarize", + "arguments": [ + { + "name": "style", + "x-example-default-source": "profile" + } + ], + "x-example-owner": "prompts" + } + ], + "tags": [ + { + "name": "search", + "x-example-color": "blue" + } + ], + "x-example-document-profile": { + "name": "governed" + } +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json new file mode 100644 index 0000000..d5d02b7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-coverage-and-tool-schemas.json @@ -0,0 +1,173 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "schema-laboratory", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "schema-laboratory" + }, + { + "type": "streamable-http", + "url": "https://schema-laboratory.example.com/mcp", + "protocolVersions": [ + "2026-07-28" + ] + } + ], + "capabilities": [ + { + "tools": { + "listChanged": true + } + } + ], + "tools": [ + { + "name": "closed_no_parameters", + "inputSchema": { + "type": "object", + "additionalProperties": false + } + }, + { + "name": "open_unspecified_parameters", + "inputSchema": { + "type": "object" + } + }, + { + "name": "declared_parameters", + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "query" + ], + "additionalProperties": false + } + }, + { + "name": "full_2020_12_schema", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "$defs": { + "target": { + "oneOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "object", + "properties": { + "id": { + "type": "integer" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + } + ] + } + }, + "properties": { + "mode": { + "type": "string", + "enum": [ + "lookup", + "search" + ] + }, + "region": { + "type": "string", + "x-mcp-header": "Region" + }, + "target": { + "$ref": "#/$defs/target" + }, + "limit": { + "anyOf": [ + { + "type": "integer", + "minimum": 1 + }, + { + "type": "null" + } + ] + } + }, + "allOf": [ + { + "if": { + "properties": { + "mode": { + "const": "lookup" + } + }, + "required": [ + "mode" + ] + }, + "then": { + "required": [ + "target" + ] + }, + "else": { + "required": [ + "region" + ] + } + } + ], + "required": [ + "mode" + ], + "additionalProperties": false + }, + "outputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "oneOf": [ + { + "type": "object", + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ], + "additionalProperties": false + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-independent-info-metadata.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-independent-info-metadata.json new file mode 100644 index 0000000..fcca2dc --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-independent-info-metadata.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "chess-coach", + "title": "Chess Coach Cloud", + "version": "2.1.0", + "description": "Cloud-hosted chess analysis, ratings, and game history service", + "icons": [ + { + "src": "https://chess-coach.example.com/icon.png", + "mimeType": "image/png", + "sizes": [ + "48x48" + ] + } + ], + "websiteUrl": "https://chess-coach.example.com" + }, + "protocolVersions": [ + "2025-06-18" + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-scoped-primitives.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-scoped-primitives.json new file mode 100644 index 0000000..b0e0934 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/protocol-scoped-primitives.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "jobs", + "version": "2.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "jobs" + } + ], + "tools": [ + { + "name": "run_job", + "protocolVersions": [ + "2025-11-25" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "execution": { + "taskSupport": "optional" + }, + "tags": [ + "queued" + ] + }, + { + "name": "run_job", + "protocolVersions": [ + "2026-07-28" + ], + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "tags": [ + "stateless" + ] + } + ], + "tags": [ + { + "name": "queued", + "description": "Operations using the 2025 task model." + }, + { + "name": "stateless", + "description": "Operations using the 2026 stateless model." + }, + { + "name": "reserved", + "description": "A document-wide category not used in either projected view." + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/reusable-components.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/reusable-components.json new file mode 100644 index 0000000..07ba3c6 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/reusable-components.json @@ -0,0 +1,100 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "reusable-components", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "components": { + "schemas": { + "Input": { + "type": "object", + "properties": { "query": { "type": "string" } }, + "required": ["query"], + "additionalProperties": false + }, + "InputAlias": { + "$componentRef": "#/components/schemas/Input" + }, + "Output": { + "type": "object", + "properties": { "count": { "type": "integer" } }, + "required": ["count"] + }, + "Form": { + "type": "object", + "properties": { "approval": { "type": "boolean" } }, + "required": ["approval"] + } + }, + "toolExamples": { + "basic": { + "input": { "query": "mcp" }, + "result": { + "resultType": "complete", + "content": [{ "type": "text", "text": "One result" }], + "structuredContent": { "count": 1 } + }, + "x-example-source": "documentation" + } + }, + "resourceExamples": { + "current": { + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "private", + "contents": [{ "uri": "data://status", "text": "ready" }] + } + } + }, + "resourceTemplateExamples": { + "item": { + "uri": "data://items/1", + "result": { + "resultType": "complete", + "ttlMs": 60, + "cacheScope": "public", + "contents": [{ "uri": "data://items/1", "text": "item 1" }] + } + } + }, + "promptExamples": { + "default": { + "arguments": {}, + "result": { + "resultType": "complete", + "messages": [{ "role": "assistant", "content": { "type": "text", "text": "Hello." } }] + } + } + }, + "x-example-owner": "documentation" + }, + "tools": [{ + "name": "search", + "inputSchema": { "$componentRef": "#/components/schemas/InputAlias" }, + "outputSchema": { "$componentRef": "#/components/schemas/Output" }, + "examples": { "basic": { "$componentRef": "#/components/toolExamples/basic" } }, + "elicitations": [{ + "name": "approve", + "mode": "form", + "message": "Approve this search?", + "requestedSchema": { "$componentRef": "#/components/schemas/Form" } + }] + }], + "resources": [{ + "uri": "data://status", + "name": "status", + "examples": { "current": { "$componentRef": "#/components/resourceExamples/current" } } + }], + "resourceTemplates": [{ + "uriTemplate": "data://items/{id}", + "name": "item", + "examples": { "item": { "$componentRef": "#/components/resourceTemplateExamples/item" } } + }], + "prompts": [{ + "name": "greeting", + "examples": { "default": { "$componentRef": "#/components/promptExamples/default" } } + }] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-composition-and-inheritance.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-composition-and-inheritance.json new file mode 100644 index 0000000..79a10e4 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-composition-and-inheritance.json @@ -0,0 +1,112 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "security-composition", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://security-composition.example.com/mcp", + "security": [ + { + "oauth": [ + "records:read" + ], + "api-key": [] + } + ] + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "records:read": "Read records", + "records:write": "Modify records" + } + } + } + }, + "api-key": { + "type": "apiKey", + "in": "header", + "name": "X-API-Key" + }, + "oidc": { + "type": "openIdConnect", + "openIdConnectUrl": "https://id.example.com/.well-known/openid-configuration" + } + }, + "security": [ + {}, + { + "oauth": [ + "records:read" + ] + } + ], + "tools": [ + { + "name": "inherited_transport_requirement", + "inputSchema": { + "type": "object", + "additionalProperties": false + } + }, + { + "name": "combined_primitive_override", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + { + "oauth": [ + "records:write" + ], + "api-key": [] + } + ] + }, + { + "name": "cleared_requirement", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [] + }, + { + "name": "anonymous_only", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + {} + ] + }, + { + "name": "anonymous_or_openid", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + {}, + { + "oidc": [] + } + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-root-and-override.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-root-and-override.json new file mode 100644 index 0000000..12a1e0b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/security-root-and-override.json @@ -0,0 +1,135 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "issue-manager", + "version": "2.0.0" + }, + "protocolVersions": [ + "2025-11-25", + "2026-07-28" + ], + "instructions": "Search before modifying issues.", + "transports": [ + { + "type": "streamable-http", + "url": "https://issues.example.com/mcp" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "issues:read": "Read issues", + "issues:write": "Modify issues" + } + } + } + }, + "api-key": { + "type": "apiKey", + "in": "header", + "name": "X-API-Key" + } + }, + "security": [ + { + "oauth": [ + "issues:read" + ] + }, + { + "api-key": [] + } + ], + "capabilities": [ + { + "protocolVersions": [ + "2025-11-25" + ], + "tools": { + "listChanged": true + }, + "resources": { + "listChanged": true, + "subscribe": true + }, + "tasks": { + "requests": { + "tools": { + "call": {} + } + } + } + }, + { + "protocolVersions": [ + "2026-07-28" + ], + "tools": { + "listChanged": true + }, + "resources": { + "listChanged": true, + "subscribe": true + }, + "extensions": { + "io.modelcontextprotocol/tasks": {} + } + } + ], + "tools": [ + { + "name": "get_issue", + "inputSchema": { + "type": "object", + "properties": { + "number": { + "type": "integer" + } + }, + "required": [ + "number" + ], + "additionalProperties": false + } + }, + { + "name": "update_issue", + "inputSchema": { + "type": "object", + "properties": { + "number": { + "type": "integer" + }, + "title": { + "type": "string" + } + }, + "required": [ + "number" + ], + "additionalProperties": false + }, + "security": [ + { + "oauth": [ + "issues:write" + ] + } + ] + }, + { + "name": "health", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/tagged-surface.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/tagged-surface.json new file mode 100644 index 0000000..79fcadf --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/tagged-surface.json @@ -0,0 +1,56 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "catalog", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-06-18" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://catalog.example.com/mcp" + } + ], + "tags": [ + { + "name": "reference", + "description": "Reference material" + }, + { + "name": "search", + "description": "Search operations" + } + ], + "tools": [ + { + "name": "search_docs", + "inputSchema": { + "type": "object", + "properties": { + "query": { + "type": "string" + } + }, + "required": [ + "query" + ], + "additionalProperties": false + }, + "tags": [ + "search" + ] + } + ], + "resources": [ + { + "uri": "docs://home", + "name": "home", + "tags": [ + "reference" + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/unknown-extension-identifier.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/unknown-extension-identifier.json new file mode 100644 index 0000000..7968f9b --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-valid/unknown-extension-identifier.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unknown-extension-identifier", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unknown-extension-identifier" + } + ], + "capabilities": [ + { + "extensions": { + "com.example/custom-feature": { + "enabled": true + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/deprecated-client-capability-requirements.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/deprecated-client-capability-requirements.json new file mode 100644 index 0000000..70ba3ef --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/deprecated-client-capability-requirements.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "deprecated-client-capability-requirements", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "resources": [ + { + "uri": "workspace://current", + "name": "current_workspace", + "clientRequirements": { + "roots": {} + } + } + ], + "prompts": [ + { + "name": "legacy_sampling", + "clientRequirements": { + "sampling": { + "context": {} + }, + "extensions": { + "io.modelcontextprotocol/future-capability": {} + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-completion-examples.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-completion-examples.json new file mode 100644 index 0000000..01d5ae7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-completion-examples.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "legacy-completion-examples", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-03-26" + ], + "transports": [ + { + "type": "stdio", + "command": "legacy-completion-examples" + } + ], + "capabilities": [ + { + "completions": {} + } + ], + "resourceTemplates": [ + { + "uriTemplate": "repo://{owner}/{repository}/issues/{issue}", + "name": "repository_issue", + "completionExamples": { + "issue-prefix": { + "argument": { + "name": "issue", + "value": "12" + }, + "result": { + "completion": { + "values": [ + "120", + "121", + "129" + ], + "hasMore": true, + "total": 14 + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-sse-modern-revision.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-sse-modern-revision.json new file mode 100644 index 0000000..5cd7612 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/legacy-sse-modern-revision.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "legacy-sse-modern-revision", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-03-26" + ], + "transports": [ + { + "type": "sse", + "url": "https://example.com/sse" + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/logging-deprecated-2026.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/logging-deprecated-2026.json new file mode 100644 index 0000000..0eca3ab --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/logging-deprecated-2026.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "logging-warning", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://logging-warning.example.com/mcp" + } + ], + "capabilities": [ + { + "logging": {} + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-example.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-example.json new file mode 100644 index 0000000..d2baea2 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-example.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "pre-dialect-example", + "version": "1.0.0" + }, + "protocolVersions": ["2024-11-05"], + "transports": [ + { + "type": "stdio", + "command": "pre-dialect-example" + } + ], + "tools": [ + { + "name": "greet", + "inputSchema": { + "type": "object", + "properties": { + "name": { "type": "string" } + }, + "required": ["name"], + "additionalProperties": false + }, + "examples": { + "friendly": { + "input": { "name": "Example User" }, + "result": { + "content": [ + { "type": "text", "text": "Hello, Example User." } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-schema-shape.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-schema-shape.json new file mode 100644 index 0000000..bc984df --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-dialect-tool-schema-shape.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "pre-dialect-tool-schema-shape", + "version": "1.0.0" + }, + "protocolVersions": [ + "2024-11-05" + ], + "transports": [ + { + "type": "stdio", + "command": "pre-dialect-tool-schema-shape" + } + ], + "tools": [ + { + "name": "legacy_numeric_input", + "inputSchema": { + "type": "object", + "properties": { + "value": { + "type": "number", + "exclusiveMinimum": true + } + }, + "required": [ + "value" + ] + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-standard-extension-capabilities.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-standard-extension-capabilities.json new file mode 100644 index 0000000..0a5ab19 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/pre-standard-extension-capabilities.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "pre-standard-extension-capabilities", + "version": "3.4.6" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://mcp.example.com" + } + ], + "capabilities": [ + { + "extensions": { + "io.modelcontextprotocol/ui": {} + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/resource-example-consistency.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/resource-example-consistency.json new file mode 100644 index 0000000..bf798ff --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/resource-example-consistency.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "resource-example-consistency-warnings", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "stdio", + "command": "resource-example-consistency-warnings" + } + ], + "resources": [ + { + "uri": "collection:///items", + "name": "items", + "mimeType": "application/json", + "size": 100, + "examples": { + "collection-snapshot": { + "result": { + "contents": [ + { + "uri": "collection:///items/one", + "mimeType": "application/vnd.example.item+json", + "text": "{\"id\":1}" + } + ] + } + } + } + }, + { + "uri": "test://single", + "name": "single", + "mimeType": "application/json", + "size": 100, + "examples": { + "different-observation": { + "result": { + "contents": [ + { + "uri": "test://single", + "mimeType": "text/plain", + "text": "short" + } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json new file mode 100644 index 0000000..458ba37 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/tool-interaction-client-requirements-contradictions.json @@ -0,0 +1,124 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "tool-interaction-client-requirements-contradictions", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "tools": [ + { + "name": "prepare_release", + "inputSchema": { + "type": "object", + "properties": { + "version": { "type": "string" } + }, + "required": ["version"], + "additionalProperties": false + }, + "outputSchema": { + "type": "object", + "properties": { + "status": { "type": "string" } + }, + "required": ["status"], + "additionalProperties": false + }, + "clientRequirements": { + "elicitation": { + "form": {} + }, + "sampling": {} + }, + "elicitations": [ + { + "name": "authorize", + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + } + ], + "interactionExamples": { + "contradictory": { + "input": { + "version": "2.0.0" + }, + "steps": [ + { + "type": "roots", + "request": {}, + "response": { + "roots": [ + { + "uri": "file:///workspace/example" + } + ] + } + }, + { + "type": "sampling", + "request": { + "messages": [ + { + "role": "user", + "content": { + "type": "text", + "text": "Inspect the release notes." + } + } + ], + "includeContext": "thisServer", + "tools": [ + { + "name": "inspect_notes", + "inputSchema": { + "type": "object" + } + } + ], + "toolChoice": { + "mode": "required" + }, + "maxTokens": 160 + }, + "response": { + "role": "assistant", + "content": { + "type": "text", + "text": "The release note summary is ready." + }, + "model": "claude-3-sonnet-20240229", + "stopReason": "endTurn" + } + }, + { + "type": "elicitation", + "declaration": "authorize", + "request": { + "mode": "url", + "message": "Authorize publication.", + "url": "https://mcp.example.com/release/connect" + }, + "response": { + "action": "accept" + } + } + ], + "result": { + "resultType": "complete", + "content": [ + { + "type": "text", + "text": "Release preparation completed." + } + ], + "structuredContent": { + "status": "prepared" + } + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-oauth-scope.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-oauth-scope.json new file mode 100644 index 0000000..4418568 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-oauth-scope.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "scope-warning", + "version": "1.0.0" + }, + "protocolVersions": [ + "2025-11-25" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://scope-warning.example.com/mcp" + } + ], + "securitySchemes": { + "oauth": { + "type": "oauth2", + "flows": { + "authorizationCode": { + "authorizationUrl": "https://auth.example.com/authorize", + "tokenUrl": "https://auth.example.com/token", + "scopes": { + "issues:read": "Read issues" + } + } + } + } + }, + "tools": [ + { + "name": "admin_report", + "inputSchema": { + "type": "object", + "additionalProperties": false + }, + "security": [ + { + "oauth": [ + "issues:admin" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-openid-scope.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-openid-scope.json new file mode 100644 index 0000000..c52d861 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/uncatalogued-openid-scope.json @@ -0,0 +1,30 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "openid-scope-warning", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "streamable-http", + "url": "https://openid-scope-warning.example.com/mcp" + } + ], + "securitySchemes": { + "oidc": { + "type": "openIdConnect", + "openIdConnectUrl": "https://id.example.com/.well-known/openid-configuration" + } + }, + "security": [ + { + "oidc": [ + "profile:read" + ] + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-extension-identifier.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-extension-identifier.json new file mode 100644 index 0000000..19d9f7c --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-extension-identifier.json @@ -0,0 +1,26 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unknown-reserved-extension-identifier", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unknown-reserved-extension-identifier" + } + ], + "capabilities": [ + { + "extensions": { + "io.modelcontextprotocol/future-capability": { + "enabled": true + } + } + } + ] +} \ No newline at end of file diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-meta-key.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-meta-key.json new file mode 100644 index 0000000..5dc0821 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unknown-reserved-meta-key.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { "name": "unknown-reserved-meta-key", "version": "1.0.0" }, + "protocolVersions": ["2026-07-28"], + "transports": [{ "type": "stdio", "command": "unknown-reserved-meta-key" }], + "prompts": [ + { + "name": "future-metadata", + "_meta": { + "io.modelcontextprotocol/future-key": { + "preserved": true + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-example-ref.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-example-ref.json new file mode 100644 index 0000000..75cf8e4 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-example-ref.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "external-example-ref", + "version": "1.0.0" + }, + "protocolVersions": ["2026-07-28"], + "transports": [ + { + "type": "stdio", + "command": "external-example-ref" + } + ], + "tools": [ + { + "name": "lookup", + "inputSchema": { + "type": "object", + "properties": { + "identifier": { "$ref": "https://schemas.example.invalid/identifier.json" } + }, + "required": ["identifier"] + }, + "examples": { + "external-identifier": { + "input": { "identifier": "example-123" }, + "result": { + "resultType": "complete", + "content": [ + { "type": "text", "text": "Found example-123." } + ] + } + } + } + } + ] +} diff --git a/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-ref.json b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-ref.json new file mode 100644 index 0000000..5b69af7 --- /dev/null +++ b/packages/validator/test/snapshots/0.8.0-rc.4/fixtures/expected-warning/unresolved-external-tool-ref.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json", + "mcpdesc": "0.8.0", + "info": { + "name": "unresolved-external-tool-ref", + "version": "1.0.0" + }, + "protocolVersions": [ + "2026-07-28" + ], + "transports": [ + { + "type": "stdio", + "command": "unresolved-external-tool-ref" + } + ], + "tools": [ + { + "name": "lookup", + "inputSchema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "object", + "properties": { + "identifier": { + "$ref": "https://schemas.example.com/common.json#/$defs/identifier" + } + }, + "required": [ + "identifier" + ], + "additionalProperties": false + } + } + ] +} diff --git a/packages/validator/test/standalone.test.js b/packages/validator/test/standalone.test.js index 099d647..c631376 100644 --- a/packages/validator/test/standalone.test.js +++ b/packages/validator/test/standalone.test.js @@ -49,7 +49,7 @@ test('standalone bundle contains no dynamic code generation', () => { assert.doesNotMatch(source, /\beval\s*\(|\bnew\s+Function\b/); }); -for (const specification of ['0.8.0-rc.2', '0.8.0-rc.3']) { +for (const specification of ['0.8.0-rc.3', '0.8.0-rc.4']) { const fixtureRoot = fileURLToPath(new URL(`./snapshots/${specification}/fixtures/`, import.meta.url)); test(`standalone ${specification} matches standard fixture outcomes`, () => { for (const filename of fixtureFiles(fixtureRoot)) { diff --git a/packages/validator/test/types/api.test.ts b/packages/validator/test/types/api.test.ts index 6d0f7c3..6a8deb8 100644 --- a/packages/validator/test/types/api.test.ts +++ b/packages/validator/test/types/api.test.ts @@ -17,16 +17,15 @@ import { validateMcpDescription as validateStandalone } from '@mcpdesc/validator declare const document: unknown; const result: McpDescriptionValidationResult = validateMcpDescription(document, { - specification: '0.8.0-rc.2' + specification: '0.8.0-rc.4' }); const componentResolution = resolveMcpDescriptionComponentReferences(document, { - specification: '0.8.0-rc.2' + specification: '0.8.0-rc.3' }); -resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.2' }); resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.3' }); const referencePath: readonly (string | number)[] | undefined = componentResolution.provenance[0]?.referencePath; -validateMcpDescription(document, { specification: '0.8.0-rc.2' }); validateMcpDescription(document, { specification: '0.8.0-rc.3' }); +validateMcpDescription(document, { specification: '0.8.0-rc.4' }); const standaloneResult: McpDescriptionValidationResult = validateStandalone(document, { specification: '0.8.0-rc.3' }); @@ -35,15 +34,15 @@ const browserResult: McpDescriptionValidationResult = validateBrowser(document, }); const diagnostic: McpDescriptionDiagnostic | undefined = result.diagnostics[0]; const pathSegment: string | number | undefined = diagnostic?.path[0]; -const rc2: '0.8.0-rc.2' = supportedSpecifications[0]; -const rc3: '0.8.0-rc.3' = supportedSpecifications[1]; -const deprecatedRc2: '0.8.0-rc.2' = deprecatedSpecifications[0]; +const rc3: '0.8.0-rc.3' = supportedSpecifications[0]; +const rc4: '0.8.0-rc.4' = supportedSpecifications[1]; +const deprecatedRc3: '0.8.0-rc.3' = deprecatedSpecifications[0]; const catalogueDate: '2026-09-04' = mcpExtensionCatalogue.effectiveDate; const extensionMaturity: 'official' | 'experimental' | 'uncatalogued' = mcpExtensionMaturity('io.modelcontextprotocol/ui'); const protocolVersion: string = supportedProtocolVersions[0]; -const rc2Tag: 'v0.8.0-rc.2' = specificationProvenance[rc2].snapshotTag; -const rc3SchemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.3.json' = specificationProvenance[rc3].schemaUri; -const resolution = resolveMcpDescriptionSpecification(document, { specification: rc3 }); +const rc3Tag: 'v0.8.0-rc.3' = specificationProvenance[rc3].snapshotTag; +const rc4SchemaUri: 'https://mcpdesc.org/schema/mcp-description/0.8.0-rc.4.json' = specificationProvenance[rc4].schemaUri; +const resolution = resolveMcpDescriptionSpecification(document, { specification: rc4 }); if (resolution.status === 'resolved') { const resolvedSelector: string = resolution.specification; const resolvedSchemaUri: string = resolution.schemaUri; @@ -53,11 +52,11 @@ if (resolution.status === 'resolved') { void pathSegment; void protocolVersion; -void rc2Tag; -void rc3SchemaUri; -void rc2; +void rc3Tag; +void rc4SchemaUri; void rc3; -void deprecatedRc2; +void rc4; +void deprecatedRc3; void catalogueDate; void extensionMaturity; void browserResult; @@ -71,8 +70,10 @@ validateMcpDescription(document, { specification: '0.8.0' }); // @ts-expect-error Later drafts are not supported by this package version. validateMcpDescription(document, { specification: '0.8.0-draft.5' }); // @ts-expect-error Supported specification exports are readonly. -supportedSpecifications.push('0.8.0-rc.2'); +supportedSpecifications.push('0.8.0-rc.3'); // @ts-expect-error Provenance is only available for supported selectors. specificationProvenance['0.8.0-draft.5']; // @ts-expect-error Draft 4 component resolution is not supported. -resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-draft.4' }); \ No newline at end of file +resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-draft.4' }); +// @ts-expect-error RC.4 does not expose the required terminal-target provenance. +resolveMcpDescriptionComponentReferences(document, { specification: '0.8.0-rc.4' }); \ No newline at end of file