Enhance the existing Claude Code custom-prompt discovery examples to match the new MCP contract introduced by multi-target routing and target-scoped catalog semantics.
Changes included:
- static_harvest.sh
- added required --target-id argument (with MCP_TARGET_ID env fallback)
- always sends target_id in discovery.run_static arguments
- updated usage/help/examples to include target_id
- two_phase_discovery.py
- added required --target-id argument
- static-harvest bootstrap call now passes target_id
- improved run_id error guidance with target_id-aware commands
- injects <TARGET_ID> placeholder into user prompt template
- improved runtime logging to display target_id
- Prompt templates
- two_phase_discovery_prompt.md:
- catalog/agent/llm tool signatures updated to include target_id
- Stage 0 and workflow text updated to use provided target_id + run_id
- removed contradictory instruction that asked to call discovery.run_static in Phase 2
- two_phase_user_prompt.md:
- added target_id input section
- all example calls updated to pass target_id
- start instructions now require target_id + run_id
- README and utility example
- README quick-start curl and script examples now include target_id
- test_catalog.sh now accepts/prints target_id and passes it to catalog/llm calls
Validation:
- bash -n passed for updated shell scripts
- python3 -m py_compile passed for two_phase_discovery.py
"summary": "{\"hypothesis\":\"Test user table\",\"grain\":\"one row per user\",\"primary_key\":[\"user_id\"],\"time_columns\":[\"created_at\"],\"example_questions\":[\"How many users do we have?\",\"Count users by registration date\"]}",