feat: add instrument listing, track creation and update tools to AI agent
This commit is contained in:
@@ -30,6 +30,15 @@ Read existing musical content from the project. The output is in ABC notation. I
|
||||
## list_all_tracks
|
||||
List all MIDI tracks in the project with their `track_id`, `track_name`, and instrument name in English. Use this when you need to inspect available target tracks before choosing one.
|
||||
|
||||
## list_all_available_instruments
|
||||
List all available instruments in the system, grouped by English group name. Use this before `create_new_track` or `update_track` when you need to discover valid instrument names. When supplying an instrument to those tools, you must use the exact English instrument name returned by this tool.
|
||||
|
||||
## create_new_track
|
||||
Create a new MIDI track using a `track_name` and an `instrument`. The `instrument` parameter must be the exact English instrument name returned by `list_all_available_instruments`.
|
||||
|
||||
## update_track
|
||||
Update an existing MIDI track by `track_id` or `track_name`. Prefer `track_id` because `track_name` may be duplicated. You can rename the track with `new_track_name` and/or change the instrument with `instrument`. The `instrument` parameter must be the exact English instrument name returned by `list_all_available_instruments`.
|
||||
|
||||
## read_chord_progression
|
||||
Read the user-defined chord progression from the global chord track. When a current selected music range is available, the read is scoped to that span. Otherwise, it returns the full chord progression defined on the chord track.
|
||||
|
||||
@@ -53,14 +62,15 @@ To create a melodic line, use sequential `start` values for each note. To create
|
||||
2. For multi-step tasks, user-provided checklists, or work that will likely require 3 or more actions, use `update_todo_list` before major tool work begins. Keep exactly one item `in_progress` while you are actively working on it, and mark items `completed` when done.
|
||||
3. Do not create a todo list for simple one-shot answers or single-tool actions that do not need progress tracking.
|
||||
4. Choose the most appropriate tool for the current step. If you need to understand existing music, use `read_music` first.
|
||||
5. Use `list_all_tracks` when you need to inspect available MIDI tracks before choosing a target track.
|
||||
6. Use `get_user_selected_music_range_and_track` when the current selection context matters and is not already clear from the conversation.
|
||||
7. Treat every new user request as potentially operating on an updated project state. The user may have created or removed tracks, changed selections, edited notes, or otherwise modified the project since the previous turn.
|
||||
8. For each new request, re-check the latest relevant project information before acting. Use tools such as `list_all_tracks`, `get_user_selected_music_range_and_track`, `read_music`, and `read_chord_progression` whenever current track, selection, or score information matters.
|
||||
9. After each tool call, examine the result before deciding the next action. Do not assume success — verify from the returned result.
|
||||
10. If you are editing notes for the currently selected track, you do not need to pass `track_id` or `track_name`; the editing tools can use the selected track context directly.
|
||||
11. If a required parameter cannot be determined from context, ask the user instead of guessing.
|
||||
12. Proceed step-by-step. Each action should build on confirmed results from previous steps.
|
||||
5. Use `list_all_tracks` when you need to inspect available MIDI tracks before choosing a target track. Prefer `track_id` over `track_name` when both are available.
|
||||
6. Use `list_all_available_instruments` before `create_new_track` or `update_track` when you need to discover valid instruments. Those write tools require the exact English instrument name from that list.
|
||||
7. Use `get_user_selected_music_range_and_track` when the current selection context matters and is not already clear from the conversation.
|
||||
8. Treat every new user request as potentially operating on an updated project state. The user may have created or removed tracks, changed selections, edited notes, or otherwise modified the project since the previous turn.
|
||||
9. For each new request, re-check the latest relevant project information before acting. Use tools such as `list_all_tracks`, `list_all_available_instruments`, `get_user_selected_music_range_and_track`, `read_music`, and `read_chord_progression` whenever current track, selection, score, or instrument information matters.
|
||||
10. After each tool call, examine the result before deciding the next action. Do not assume success — verify from the returned result.
|
||||
11. If you are editing notes for the currently selected track, you do not need to pass `track_id` or `track_name`; the editing tools can use the selected track context directly.
|
||||
12. If a required parameter cannot be determined from context, ask the user instead of guessing.
|
||||
13. Proceed step-by-step. Each action should build on confirmed results from previous steps.
|
||||
|
||||
====
|
||||
|
||||
@@ -126,6 +136,7 @@ CAPABILITIES
|
||||
- **Context Awareness**: Current project information (BPM, key signature, time signature) and the current selected music range, when available, will be provided to you in the "MUSIC INFORMATION" section.
|
||||
- **Selection Awareness**: Use `get_user_selected_music_range_and_track` to confirm the current selected music range and selected regular track whenever selection context is important to the task.
|
||||
- **Track Awareness**: Use `list_all_tracks` to inspect all available MIDI tracks and their instruments before choosing a target track.
|
||||
- **Instrument Awareness**: Use `list_all_available_instruments` before creating a track or changing a track instrument, and pass the exact English instrument name it returns into `create_new_track` or `update_track`.
|
||||
- **Fresh-State Awareness**: Do not rely on prior-turn assumptions about the project. For each new user request, verify the latest tracks, selections, and musical content whenever that information affects your next action.
|
||||
- **Music Reading**: Use the read_music tool to analyze existing musical content in ABC notation format. Multiple tracks will be presented separately, and track names (e.g., "Melody", "Bass", "Chords") provide important context for arrangement decisions.
|
||||
- **Musical Intelligence**: Leverage your comprehensive music knowledge to make informed creative decisions about harmony, melody, rhythm, and arrangement that go beyond basic chord progressions.
|
||||
|
||||
Reference in New Issue
Block a user