@mcp-layer/schema
Advanced tools
| /** | ||
| * Extract MCP tool/resource/prompt schemas into a unified Zod-backed format. | ||
| * @param {import('@mcp-layer/session').Session} link - Active session with a connected MCP server. | ||
| * @returns {Promise<{ server: { info: Record<string, unknown> | undefined, capabilities: Record<string, unknown> | undefined, instructions: string | undefined }, items: Array<Record<string, unknown>> }>} | ||
| */ | ||
| export function extract(link: any): Promise<{ | ||
| server: { | ||
| info: Record<string, unknown> | undefined; | ||
| capabilities: Record<string, unknown> | undefined; | ||
| instructions: string | undefined; | ||
| }; | ||
| items: Array<Record<string, unknown>>; | ||
| }>; |
+11
-7
| { | ||
| "name": "@mcp-layer/schema", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "Extract and normalize MCP schemas into a unified Zod-based format.", | ||
@@ -19,4 +19,6 @@ "repository": { | ||
| "main": "src/index.js", | ||
| "types": "./types/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./types/index.d.ts", | ||
| "import": "./src/index.js", | ||
@@ -29,2 +31,3 @@ "default": "./src/index.js" | ||
| "src", | ||
| "types", | ||
| "LICENSE" | ||
@@ -38,13 +41,14 @@ ], | ||
| "zod": "^3.25.76", | ||
| "@mcp-layer/error": "0.2.0" | ||
| "@mcp-layer/error": "0.2.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@mcp-layer/attach": "1.1.1", | ||
| "@mcp-layer/config": "1.0.1", | ||
| "@mcp-layer/connect": "1.0.1", | ||
| "@mcp-layer/test-server": "1.0.1" | ||
| "@mcp-layer/attach": "1.1.2", | ||
| "@mcp-layer/config": "1.0.2", | ||
| "@mcp-layer/connect": "1.2.1", | ||
| "@mcp-layer/test-server": "1.0.4" | ||
| }, | ||
| "scripts": { | ||
| "test": "node --test --experimental-test-coverage ./test/**/*.js" | ||
| "build:types": "tsc -p tsconfig.json", | ||
| "test": "node --test --experimental-test-coverage \"./test/**/*.js\"" | ||
| } | ||
| } |
23597
3.45%5
25%426
3.15%+ Added
- Removed
Updated