fix(agentic): add namespaced MCP aliases for core tools
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
1b1aaa3d66
commit
75fc9d4bf4
6 changed files with 130 additions and 0 deletions
|
|
@ -289,41 +289,73 @@ func (s *PrepSubsystem) registerIssueTools(server *mcp.Server) {
|
|||
Name: "issue_create",
|
||||
Description: "Create a tracked platform issue with title, type, priority, labels, and optional sprint assignment.",
|
||||
}, s.issueCreate)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_create",
|
||||
Description: "Create a tracked platform issue with title, type, priority, labels, and optional sprint assignment.",
|
||||
}, s.issueCreate)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_get",
|
||||
Description: "Read a tracked platform issue by slug.",
|
||||
}, s.issueGet)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_get",
|
||||
Description: "Read a tracked platform issue by slug.",
|
||||
}, s.issueGet)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_list",
|
||||
Description: "List tracked platform issues with optional status, type, sprint, and limit filters.",
|
||||
}, s.issueList)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_list",
|
||||
Description: "List tracked platform issues with optional status, type, sprint, and limit filters.",
|
||||
}, s.issueList)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_update",
|
||||
Description: "Update fields on a tracked platform issue by slug.",
|
||||
}, s.issueUpdate)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_update",
|
||||
Description: "Update fields on a tracked platform issue by slug.",
|
||||
}, s.issueUpdate)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_assign",
|
||||
Description: "Assign an agent or user to a tracked platform issue by slug.",
|
||||
}, s.issueAssign)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_assign",
|
||||
Description: "Assign an agent or user to a tracked platform issue by slug.",
|
||||
}, s.issueAssign)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_comment",
|
||||
Description: "Add a comment to a tracked platform issue.",
|
||||
}, s.issueComment)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_comment",
|
||||
Description: "Add a comment to a tracked platform issue.",
|
||||
}, s.issueComment)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_report",
|
||||
Description: "Post a structured report comment to a tracked platform issue.",
|
||||
}, s.issueReport)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_report",
|
||||
Description: "Post a structured report comment to a tracked platform issue.",
|
||||
}, s.issueReport)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "issue_archive",
|
||||
Description: "Archive a tracked platform issue by slug.",
|
||||
}, s.issueArchive)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_issue_archive",
|
||||
Description: "Archive a tracked platform issue by slug.",
|
||||
}, s.issueArchive)
|
||||
}
|
||||
|
||||
func (s *PrepSubsystem) issueCreate(ctx context.Context, _ *mcp.CallToolRequest, input IssueCreateInput) (*mcp.CallToolResult, IssueOutput, error) {
|
||||
|
|
|
|||
|
|
@ -724,6 +724,12 @@ func TestPrep_RegisterTools_Good_RegistersCompletionTool(t *testing.T) {
|
|||
assert.Contains(t, toolNames, "prompt_version")
|
||||
assert.Contains(t, toolNames, "agentic_prompt_version")
|
||||
assert.Contains(t, toolNames, "agentic_setup")
|
||||
assert.Contains(t, toolNames, "agentic_issue_create")
|
||||
assert.Contains(t, toolNames, "agentic_issue_assign")
|
||||
assert.Contains(t, toolNames, "agentic_session_start")
|
||||
assert.Contains(t, toolNames, "agentic_task_create")
|
||||
assert.Contains(t, toolNames, "agentic_state_set")
|
||||
assert.Contains(t, toolNames, "agentic_sprint_create")
|
||||
assert.Contains(t, toolNames, "session_complete")
|
||||
assert.Contains(t, toolNames, "agentic_message_send")
|
||||
assert.Contains(t, toolNames, "agent_send")
|
||||
|
|
|
|||
|
|
@ -308,56 +308,100 @@ func (s *PrepSubsystem) registerSessionTools(server *mcp.Server) {
|
|||
Name: "session_start",
|
||||
Description: "Start a new agent session for a plan and capture the initial context summary.",
|
||||
}, s.sessionStart)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_start",
|
||||
Description: "Start a new agent session for a plan and capture the initial context summary.",
|
||||
}, s.sessionStart)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_get",
|
||||
Description: "Read a session by session ID, including saved context, work log, and artifacts.",
|
||||
}, s.sessionGet)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_get",
|
||||
Description: "Read a session by session ID, including saved context, work log, and artifacts.",
|
||||
}, s.sessionGet)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_list",
|
||||
Description: "List sessions with optional plan and status filters.",
|
||||
}, s.sessionList)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_list",
|
||||
Description: "List sessions with optional plan and status filters.",
|
||||
}, s.sessionList)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_continue",
|
||||
Description: "Continue an existing session from its latest saved state.",
|
||||
}, s.sessionContinue)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_continue",
|
||||
Description: "Continue an existing session from its latest saved state.",
|
||||
}, s.sessionContinue)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_end",
|
||||
Description: "End a session with status, summary, and optional handoff notes.",
|
||||
}, s.sessionEnd)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_end",
|
||||
Description: "End a session with status, summary, and optional handoff notes.",
|
||||
}, s.sessionEnd)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_complete",
|
||||
Description: "Mark a session completed with status, summary, and optional handoff notes.",
|
||||
}, s.sessionEnd)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_complete",
|
||||
Description: "Mark a session completed with status, summary, and optional handoff notes.",
|
||||
}, s.sessionEnd)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_log",
|
||||
Description: "Add a typed work log entry to a stored session.",
|
||||
}, s.sessionLog)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_log",
|
||||
Description: "Add a typed work log entry to a stored session.",
|
||||
}, s.sessionLog)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_artifact",
|
||||
Description: "Record a created, modified, deleted, or reviewed artifact for a stored session.",
|
||||
}, s.sessionArtifact)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_artifact",
|
||||
Description: "Record a created, modified, deleted, or reviewed artifact for a stored session.",
|
||||
}, s.sessionArtifact)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_handoff",
|
||||
Description: "Prepare a stored session for handoff and mark it handed_off with summary, blockers, and next-step context.",
|
||||
}, s.sessionHandoff)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_handoff",
|
||||
Description: "Prepare a stored session for handoff and mark it handed_off with summary, blockers, and next-step context.",
|
||||
}, s.sessionHandoff)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_resume",
|
||||
Description: "Resume a paused or handed-off stored session and return handoff context.",
|
||||
}, s.sessionResume)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_resume",
|
||||
Description: "Resume a paused or handed-off stored session and return handoff context.",
|
||||
}, s.sessionResume)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "session_replay",
|
||||
Description: "Build replay context for a stored session from its work log, checkpoints, errors, and artifacts.",
|
||||
}, s.sessionReplay)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_session_replay",
|
||||
Description: "Build replay context for a stored session from its work log, checkpoints, errors, and artifacts.",
|
||||
}, s.sessionReplay)
|
||||
}
|
||||
|
||||
func (s *PrepSubsystem) sessionStart(ctx context.Context, _ *mcp.CallToolRequest, input SessionStartInput) (*mcp.CallToolResult, SessionOutput, error) {
|
||||
|
|
|
|||
|
|
@ -158,26 +158,46 @@ func (s *PrepSubsystem) registerSprintTools(server *mcp.Server) {
|
|||
Name: "sprint_create",
|
||||
Description: "Create a tracked platform sprint with goal, schedule, and metadata.",
|
||||
}, s.sprintCreate)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_sprint_create",
|
||||
Description: "Create a tracked platform sprint with goal, schedule, and metadata.",
|
||||
}, s.sprintCreate)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "sprint_get",
|
||||
Description: "Read a tracked platform sprint by slug.",
|
||||
}, s.sprintGet)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_sprint_get",
|
||||
Description: "Read a tracked platform sprint by slug.",
|
||||
}, s.sprintGet)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "sprint_list",
|
||||
Description: "List tracked platform sprints with optional status and limit filters.",
|
||||
}, s.sprintList)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_sprint_list",
|
||||
Description: "List tracked platform sprints with optional status and limit filters.",
|
||||
}, s.sprintList)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "sprint_update",
|
||||
Description: "Update fields on a tracked platform sprint by slug.",
|
||||
}, s.sprintUpdate)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_sprint_update",
|
||||
Description: "Update fields on a tracked platform sprint by slug.",
|
||||
}, s.sprintUpdate)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "sprint_archive",
|
||||
Description: "Archive a tracked platform sprint by slug.",
|
||||
}, s.sprintArchive)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_sprint_archive",
|
||||
Description: "Archive a tracked platform sprint by slug.",
|
||||
}, s.sprintArchive)
|
||||
}
|
||||
|
||||
func (s *PrepSubsystem) sprintCreate(ctx context.Context, _ *mcp.CallToolRequest, input SprintCreateInput) (*mcp.CallToolResult, SprintOutput, error) {
|
||||
|
|
|
|||
|
|
@ -145,21 +145,37 @@ func (s *PrepSubsystem) registerStateTools(server *mcp.Server) {
|
|||
Name: "state_set",
|
||||
Description: "Set a typed workspace state value for a plan so later sessions can reuse shared context.",
|
||||
}, s.stateSet)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_state_set",
|
||||
Description: "Set a typed workspace state value for a plan so later sessions can reuse shared context.",
|
||||
}, s.stateSet)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "state_get",
|
||||
Description: "Get a workspace state value for a plan by key.",
|
||||
}, s.stateGet)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_state_get",
|
||||
Description: "Get a workspace state value for a plan by key.",
|
||||
}, s.stateGet)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "state_list",
|
||||
Description: "List all stored workspace state values for a plan, with optional type or category filtering.",
|
||||
}, s.stateList)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_state_list",
|
||||
Description: "List all stored workspace state values for a plan, with optional type or category filtering.",
|
||||
}, s.stateList)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "state_delete",
|
||||
Description: "Delete a stored workspace state value for a plan by key.",
|
||||
}, s.stateDelete)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_state_delete",
|
||||
Description: "Delete a stored workspace state value for a plan by key.",
|
||||
}, s.stateDelete)
|
||||
}
|
||||
|
||||
func (s *PrepSubsystem) stateSet(_ context.Context, _ *mcp.CallToolRequest, input StateSetInput) (*mcp.CallToolResult, StateOutput, error) {
|
||||
|
|
|
|||
|
|
@ -127,16 +127,28 @@ func (s *PrepSubsystem) registerTaskTools(server *mcp.Server) {
|
|||
Name: "task_create",
|
||||
Description: "Create a plan task by plan slug and phase order.",
|
||||
}, s.taskCreate)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_task_create",
|
||||
Description: "Create a plan task by plan slug and phase order.",
|
||||
}, s.taskCreate)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "task_update",
|
||||
Description: "Update a plan task status or notes by plan slug, phase order, and task identifier.",
|
||||
}, s.taskUpdate)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_task_update",
|
||||
Description: "Update a plan task status or notes by plan slug, phase order, and task identifier.",
|
||||
}, s.taskUpdate)
|
||||
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "task_toggle",
|
||||
Description: "Toggle a plan task between pending and completed.",
|
||||
}, s.taskToggle)
|
||||
mcp.AddTool(server, &mcp.Tool{
|
||||
Name: "agentic_task_toggle",
|
||||
Description: "Toggle a plan task between pending and completed.",
|
||||
}, s.taskToggle)
|
||||
}
|
||||
|
||||
func (s *PrepSubsystem) taskUpdate(_ context.Context, _ *mcp.CallToolRequest, input TaskUpdateInput) (*mcp.CallToolResult, TaskOutput, error) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue