Skip to content

feat: ergonomic enhancements — @file, --pick, --timeout, stdin merge#4

Merged
Codestz merged 1 commit intomainfrom
feat/ergonomic-enhancements
Mar 13, 2026
Merged

feat: ergonomic enhancements — @file, --pick, --timeout, stdin merge#4
Codestz merged 1 commit intomainfrom
feat/ergonomic-enhancements

Conversation

@Codestz
Copy link
Owner

@Codestz Codestz commented Mar 13, 2026

Summary

  • @file/@- syntax: Any string flag now accepts @/path to read from a file or @-/- to read from stdin — eliminates shell escaping pain for large content (e.g. --body @/tmp/code.go)
  • --pick flag: Lightweight JSON field extraction without jq (e.g. --pick user.name, --pick items.0)
  • --timeout flag: Per-call timeout override using Go duration format (e.g. --timeout 60s)
  • Stdin merge: --stdin can now be combined with CLI flags; flags win on conflict — enables mixed large+small arguments
  • Updated MCPX.md: mcpx configure now generates docs covering all new features including tips for AI agents

Test plan

  • All 130 existing tests pass (go test ./...)
  • New unit tests: TestResolveStringValue, TestParseToolFlagsPartial, TestPickField (7 cases)
  • New integration test case: --body @/tmp/file in TestParseToolFlags
  • Manual: mcpx serena find_symbol --name_path_pattern Foo --pick body
  • Manual: mcpx serena replace_symbol_body --body @/tmp/newcode.go --name_path Foo --relative_path src/main.go
  • Manual: echo '{"body":"x"}' | mcpx serena replace_symbol_body --name_path Foo --relative_path f.go --stdin
  • Manual: mcpx configure --global — verify updated MCPX.md content

🤖 Generated with Claude Code

- @file/@- syntax for reading flag values from files or stdin
- --pick flag for lightweight JSON field extraction
- --timeout per-call timeout override
- --stdin now merges with CLI flags (flags win on conflict)
- Updated MCPX.md generation with new feature docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Codestz Codestz merged commit 065c632 into main Mar 13, 2026
4 checks passed
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.

1 participant