Remove duplicate parsing logic from mcp inspect commands#11898
Merged
Remove duplicate parsing logic from mcp inspect commands#11898
Conversation
… parsing - Replace manual frontmatter parsing in mcp_inspect.go with compiler.ParseWorkflowFile() - Remove duplicate applyImportsToFrontmatter function and mcp_inspect_imports.go - Update mcp_inspect_inspector.go to use compiler functions consistently - Use ParsedFrontmatter.ToMap() to reconstruct frontmatter for MCP extraction - Remove test for deleted applyImportsToFrontmatter function Benefits: - Eliminates ~100 lines of duplicate parsing/merging logic - Ensures consistent behavior between compilation and inspection - Automatically handles all import types (mcp-servers, tools, safe-inputs, etc.) - Leverages compiler's robust validation and error handling Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review mcp_inspect workflow parsing logic and remove duplicates
Remove duplicate parsing logic from mcp inspect commands
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
mcp inspectandmcp inspect --inspectorcommands reimplemented frontmatter parsing, import processing, and MCP server merging logic that already exists in the compiler.Changes
compiler.ParseWorkflowFile()applyImportsToFrontmatter()no longer neededAdded
buildFrontmatterFromWorkflowData()helper that usesParsedFrontmatter.ToMap()to reconstruct frontmatter for MCP extraction.Before/After
Before:
After:
This ensures consistent behavior between compilation and inspection commands, eliminating ~220 lines of duplicate code.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.