feat: generate schemas from types, improve type definitions #2850
main.yml
on: pull_request
Matrix: test
build
14s
publish
0s
Annotations
30 errors
|
build:
test/shared/protocol.test.ts#L3684
Expected 2-3 arguments, but got 1.
|
|
build:
test/shared/protocol.test.ts#L2304
Expected 2-3 arguments, but got 1.
|
|
build:
test/shared/protocol.test.ts#L2089
Expected 2-3 arguments, but got 1.
|
|
build:
test/server/index.test.ts#L1956
Property 'text' does not exist on type '({ type: "text"; text: string; annotations?: { audience?: ("assistant" | "user")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { ...; } | undefined; } | ... 4 more ... | { ...; })[] | ... 5 more ... | { ...; }'.
|
|
build:
test/server/index.test.ts#L1955
Property 'type' does not exist on type '({ type: "text"; text: string; annotations?: { audience?: ("assistant" | "user")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { ...; } | undefined; } | ... 4 more ... | { ...; })[] | ... 5 more ... | { ...; }'.
|
|
build:
test/server/index.test.ts#L1954
Property 'type' does not exist on type '({ type: "text"; text: string; annotations?: { audience?: ("assistant" | "user")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { ...; } | undefined; } | ... 4 more ... | { ...; })[] | ... 5 more ... | { ...; }'.
|
|
build:
test/integration-tests/taskLifecycle.test.ts#L1043
Expected 2-3 arguments, but got 1.
|
|
build:
src/shared/protocol.ts#L469
Conversion of type '{ _meta: { "io.modelcontextprotocol/related-task": { taskId: string; }; }; }' to type 'SendResultT' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
|
|
build:
src/examples/server/toolWithSampleServer.ts#L41
Property 'text' does not exist on type '({ type: "text"; text: string; annotations?: { audience?: ("assistant" | "user")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { ...; } | undefined; } | ... 4 more ... | { ...; })[] | ... 5 more ... | { ...; }'.
|
|
build:
src/examples/server/toolWithSampleServer.ts#L41
Property 'type' does not exist on type '({ type: "text"; text: string; annotations?: { audience?: ("assistant" | "user")[] | undefined; priority?: number | undefined; lastModified?: string | undefined; } | undefined; _meta?: { ...; } | undefined; } | ... 4 more ... | { ...; })[] | ... 5 more ... | { ...; }'.
|
|
test/client/index.test.ts > outputSchema validation > should handle complex JSON schema validation:
src/types.ts#L926
McpError: MCP error -32602: MCP error -32602: Invalid tools/call result: [
{
"expected": "array",
"code": "invalid_type",
"path": [
"content"
],
"message": "Invalid input: expected array, received undefined"
}
]
❯ McpError.fromError src/types.ts:926:16
❯ Client._onresponse src/shared/protocol.ts:905:36
❯ InMemoryTransport._transport.onmessage src/shared/protocol.ts:625:22
❯ InMemoryTransport.send src/inMemory.ts:58:34
❯ src/shared/protocol.ts:821:50
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: -32602, data: undefined }
|
|
test/client/index.test.ts > outputSchema validation > should throw error when structuredContent does not match schema:
test/client/index.test.ts#L1963
AssertionError: expected [Function] to throw error matching /Structured content does not match the…/ but got 'MCP error -32602: MCP error -32602: I…'
- Expected:
/Structured content does not match the tool's output schema/
+ Received:
"MCP error -32602: MCP error -32602: Invalid tools/call result: [
{
\"expected\": \"array\",
\"code\": \"invalid_type\",
\"path\": [
\"content\"
],
\"message\": \"Invalid input: expected array, received undefined\"
}
]"
❯ test/client/index.test.ts:1963:9
|
|
test/client/index.test.ts > outputSchema validation > should validate structuredContent against outputSchema:
src/types.ts#L926
McpError: MCP error -32602: MCP error -32602: Invalid tools/call result: [
{
"expected": "array",
"code": "invalid_type",
"path": [
"content"
],
"message": "Invalid input: expected array, received undefined"
}
]
❯ McpError.fromError src/types.ts:926:16
❯ Client._onresponse src/shared/protocol.ts:905:36
❯ InMemoryTransport._transport.onmessage src/shared/protocol.ts:625:22
❯ InMemoryTransport.send src/inMemory.ts:58:34
❯ src/shared/protocol.ts:821:50
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: -32602, data: undefined }
|
|
test/client/index.test.ts > should accept form-mode elicitation request when client advertises empty elicitation object (back-compat):
src/server/index.ts#L571
Error: Client does not support form elicitation.
❯ Server.elicitInput src/server/index.ts:571:27
❯ test/client/index.test.ts:815:33
|
|
test/types.test.ts > Types > CreateMessageResult > should validate result with array content (using WithTools schema):
test/types.test.ts#L909
AssertionError: expected true to be false // Object.is equality
- Expected
+ Received
- false
+ true
❯ test/types.test.ts:909:41
|
|
test/types.test.ts > Types > CreateMessageResult > should validate result with tool call (using WithTools schema):
test/types.test.ts#L874
AssertionError: expected true to be false // Object.is equality
- Expected
+ Received
- false
+ true
❯ test/types.test.ts:874:41
|
|
test/types.test.ts > Types > ToolResultContent > should validate tool result with error in content:
test/types.test.ts#L579
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/types.test.ts:579:36
|
|
test/types.test.ts > Types > ToolResultContent > should validate a tool result content:
test/types.test.ts#L562
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/types.test.ts:562:36
|
|
test/types.test.ts > Types > CallToolResult with ContentBlock > should validate empty content array with default:
test/types.test.ts#L286
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/types.test.ts:286:36
|
|
test/types.capabilities.test.ts > ClientCapabilitiesSchema backwards compatibility > ElicitationCapabilitySchema preprocessing > should work within InitializeRequestParamsSchema context:
test/types.capabilities.test.ts#L99
AssertionError: expected undefined to be defined
❯ test/types.capabilities.test.ts:99:59
|
|
test/client/index.test.ts > outputSchema validation > should handle complex JSON schema validation:
src/types.ts#L926
McpError: MCP error -32602: MCP error -32602: Invalid tools/call result: [
{
"expected": "array",
"code": "invalid_type",
"path": [
"content"
],
"message": "Invalid input: expected array, received undefined"
}
]
❯ Function.fromError src/types.ts:926:16
❯ Client._onresponse src/shared/protocol.ts:905:36
❯ InMemoryTransport._transport.onmessage src/shared/protocol.ts:625:22
❯ InMemoryTransport.send src/inMemory.ts:58:34
❯ src/shared/protocol.ts:821:50
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: -32602, data: undefined }
|
|
test/client/index.test.ts > outputSchema validation > should throw error when structuredContent does not match schema:
test/client/index.test.ts#L1963
AssertionError: expected [Function] to throw error matching /Structured content does not match the…/ but got 'MCP error -32602: MCP error -32602: I…'
- Expected:
/Structured content does not match the tool's output schema/
+ Received:
"MCP error -32602: MCP error -32602: Invalid tools/call result: [
{
\"expected\": \"array\",
\"code\": \"invalid_type\",
\"path\": [
\"content\"
],
\"message\": \"Invalid input: expected array, received undefined\"
}
]"
❯ test/client/index.test.ts:1963:9
|
|
test/client/index.test.ts > outputSchema validation > should validate structuredContent against outputSchema:
src/types.ts#L926
McpError: MCP error -32602: MCP error -32602: Invalid tools/call result: [
{
"expected": "array",
"code": "invalid_type",
"path": [
"content"
],
"message": "Invalid input: expected array, received undefined"
}
]
❯ Function.fromError src/types.ts:926:16
❯ Client._onresponse src/shared/protocol.ts:905:36
❯ InMemoryTransport._transport.onmessage src/shared/protocol.ts:625:22
❯ InMemoryTransport.send src/inMemory.ts:58:34
❯ src/shared/protocol.ts:821:50
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: -32602, data: undefined }
|
|
test/client/index.test.ts > should accept form-mode elicitation request when client advertises empty elicitation object (back-compat):
src/server/index.ts#L571
Error: Client does not support form elicitation.
❯ Server.elicitInput src/server/index.ts:571:27
❯ test/client/index.test.ts:815:33
|
|
test/types.test.ts > Types > CreateMessageResult > should validate result with array content (using WithTools schema):
test/types.test.ts#L909
AssertionError: expected true to be false // Object.is equality
- Expected
+ Received
- false
+ true
❯ test/types.test.ts:909:41
|
|
test/types.test.ts > Types > CreateMessageResult > should validate result with tool call (using WithTools schema):
test/types.test.ts#L874
AssertionError: expected true to be false // Object.is equality
- Expected
+ Received
- false
+ true
❯ test/types.test.ts:874:41
|
|
test/types.test.ts > Types > ToolResultContent > should validate tool result with error in content:
test/types.test.ts#L579
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/types.test.ts:579:36
|
|
test/types.test.ts > Types > ToolResultContent > should validate a tool result content:
test/types.test.ts#L562
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/types.test.ts:562:36
|
|
test/types.test.ts > Types > CallToolResult with ContentBlock > should validate empty content array with default:
test/types.test.ts#L286
AssertionError: expected false to be true // Object.is equality
- Expected
+ Received
- true
+ false
❯ test/types.test.ts:286:36
|
|
test/types.capabilities.test.ts > ClientCapabilitiesSchema backwards compatibility > ElicitationCapabilitySchema preprocessing > should work within InitializeRequestParamsSchema context:
test/types.capabilities.test.ts#L99
AssertionError: expected undefined to be defined
❯ test/types.capabilities.test.ts:99:59
|