Commit b0078e4
feat: add IDE-support tools to MCP server (#207)
* feat: add module/step schema, template functions, and expression validation tools to MCP server
Adds five new tools to the workflow MCP server to help IDE AI assistants author
and validate workflow YAML configurations with accurate, schema-driven knowledge:
- get_module_schema: returns full ModuleSchema for a module type (description,
config fields with key/type/description/required/default/options, inputs,
outputs, example snippet)
- get_step_schema: returns step type info (description, config keys with types
and descriptions via stepTypeInfoFull, plugin, example snippet)
- get_template_functions: returns all available pipeline template functions with
name, signature, description, and example (uuid/uuidv4/now/lower/default/
trimPrefix/trimSuffix/json/step/trigger)
- validate_template_expressions: parses a YAML config, walks pipeline step
configs for {{ }} expressions, and emits warnings for forward references,
self-references, undefined step references, and hyphenated dot-access patterns
- get_config_examples: lists .yaml files from the example/ directory or returns
a specific example's content by name
All five tools are covered by tests in mcp/tools_test.go (63 tests total, all pass).
golangci-lint clean.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: address PR #207 review comments
- Issues 1-3: confirmed false positives — helpers are defined in server_test.go (same package)
- Issue 4: track warnedRefs set to avoid duplicate hyphen warnings for refs already covered by forward/undefined-reference checks
- Issue 5: compile self-reference regex once per step, outside the expression loop
- Issue 6: validate pluginDir follows expected data/plugins layout before deriving exampleDir
- Issue 7: accumulate YAML marshal/unmarshal errors as warnings instead of silently skipping
- Issue 8: add path traversal protection in readExampleFile (reject .., path separators, validate resolved path within exampleDir)
- Issue 9: update hyphen warning message to say the engine auto-corrects it
- Issue 10: change template regex to (?s)\{\{.*?\}\} (non-greedy dotall) with heuristic comment
- Issue 11: remove "(default: 200)" from status field description since it is Required: true
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 127a557 commit b0078e4
3 files changed
Lines changed: 1771 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
0 commit comments