Skip to content

Fix McpListTask input schema to require server or transport configuration#312

Merged
sroussey merged 2 commits intoclaude/add-mcp-task-registry-y9KGEfrom
copilot/sub-pr-307-yet-again
Mar 14, 2026
Merged

Fix McpListTask input schema to require server or transport configuration#312
sroussey merged 2 commits intoclaude/add-mcp-task-registry-y9KGEfrom
copilot/sub-pr-307-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

McpListTask's inputSchema only required list_type, making inputs with no server/transport configuration schema-valid while always failing at runtime when the MCP client is created.

Changes

  • allOf extended with anyOf: [{ required: ["server"] }, { required: ["transport"] }] — schema now rejects inputs that provide neither a registry server ID nor an inline transport
  • Top-level if/then/else — conditionally requires command for stdio transport, server_url for all other transports
required: ["list_type"],
if: { properties: { transport: { const: "stdio" } }, required: ["transport"] },
then: { required: ["command"] },
else: {
  if: { required: ["transport"] },
  then: { required: ["server_url"] },
},
allOf: [
  ...mcpServerConfigSchema.allOf,
  { anyOf: [{ required: ["server"] }, { required: ["transport"] }] },
],

This aligns McpListTask's input schema with the conditional validation pattern already present in the config schemas of McpToolCallTask, McpPromptGetTask, and McpResourceReadTask.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: sroussey <127349+sroussey@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on MCP server registry and task server references PR Fix McpListTask input schema to require server or transport configuration Mar 13, 2026
Copilot AI requested a review from sroussey March 13, 2026 22:50
@sroussey sroussey marked this pull request as ready for review March 14, 2026 00:06
@sroussey sroussey merged commit 8e182c2 into claude/add-mcp-task-registry-y9KGE Mar 14, 2026
@sroussey sroussey deleted the copilot/sub-pr-307-yet-again branch March 14, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants