Skip to content

Align MCP schema validation: remove "remote" from generic types, enforce strict properties#11725

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/align-schema-properties-and-enums
Closed

Align MCP schema validation: remove "remote" from generic types, enforce strict properties#11725
Copilot wants to merge 2 commits intomainfrom
copilot/align-schema-properties-and-enums

Conversation

Copy link
Contributor

Copilot AI commented Jan 25, 2026

Schema inconsistency between main_workflow_schema.json and mcp_config_schema.json: the main schema's generic MCP tool definition incorrectly included "remote" in type/mode enums and used permissive additionalProperties: true, while the MCP config schema correctly restricted types and enforced strict validation.

Changes

  • Removed "remote" from generic MCP type/mode enums (lines ~3430, ~3435)

    • "remote" is GitHub-tool specific (tools.github.mode), not a valid generic MCP server type
    • Generic MCP configs support only: stdio, http, local
    • Aligns with existing code validation: ValidMCPTypes = ["stdio", "http", "local"]
  • Enforced strict validation (line ~3475)

    • Changed additionalProperties: truefalse in generic MCP tool definition
    • Now consistent with mcp_config_schema.json, stdio_mcp_tool, and http_mcp_tool
  • Added schema documentation

    • $comment fields explain type restrictions and validation rationale

Schema consistency

All MCP configurations now use uniform validation:

Component additionalProperties type/mode enum
mcp_config_schema.json false stdio, http, local
stdio_mcp_tool false stdio, local
http_mcp_tool false http
Generic MCP (tools.additionalProperties) false stdio, http, local
GitHub tool (tools.github.mode) N/A local, remote

Binary rebuilt to embed updated schemas.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Align additionalProperties and enum values between schemas</issue_title>
<issue_description>## Objective

Resolve additionalProperties conflict and enum value mismatch between main and MCP config schemas.

Context

From discussion #11706:

  • additionalProperties conflict: Main schema uses true (permissive), MCP config uses false (strict)
  • Enum mismatch: Main schema includes "remote" in type/mode enums, MCP config doesn't

Approach

  1. Investigate which additionalProperties setting is correct for workflow validation
  2. Align both schemas to use the same setting
  3. Determine if "remote" is valid for type enum or should be removed
  4. Document the decision in schema comments

Files to Modify

  • pkg/parser/schemas/main_workflow_schema.json - Update additionalProperties and/or enum values
  • pkg/parser/schemas/mcp_config_schema.json - Update to match (if needed)

Acceptance Criteria

  • additionalProperties setting is consistent between schemas
  • Enum values for type/mode are identical
  • Decision documented in schema comments
  • Existing workflows continue to validate correctly
  • Run make build to embed updated schemas
  • All tests pass with make test

AI generated by Plan Command for discussion #11706

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Remove "remote" from generic MCP tool type/mode enums (only valid for GitHub tool)
- Change additionalProperties from true to false for strict validation
- Add schema comments documenting the decisions
- Schemas now consistently validate MCP configurations

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Align additionalProperties and enum values between schemas Align MCP schema validation: remove "remote" from generic types, enforce strict properties Jan 25, 2026
Copilot AI requested a review from pelikhan January 25, 2026 03:47
@pelikhan pelikhan marked this pull request as ready for review January 25, 2026 05:45
@pelikhan pelikhan closed this Jan 25, 2026
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.

[plan] Align additionalProperties and enum values between schemas

2 participants