get_next_step_history
Retrieve comprehensive history of a next step, including session details and handoff data, to track and manage project workflows effectively. Requires project ID and step ID for precise results.
Instructions
Get complete history of a next step including session and handoff
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project identifier | |
| stepId | Yes | Next step ID |
Input Schema (JSON Schema)
{
"properties": {
"projectId": {
"description": "Project identifier",
"type": "string"
},
"stepId": {
"description": "Next step ID",
"type": "string"
}
},
"required": [
"projectId",
"stepId"
],
"type": "object"
}
Implementation Reference
- src/index.ts:258-274 (handler)The core handler function in ProjectManager that retrieves the history for a specific next step, including associated working session and handoff by loading project data and matching IDs.async getNextStepHistory(projectId: string, stepId: string): Promise<{ step: NextStep; session?: WorkingSession; handoff?: Handoff; }> { const data = await this.loadProjectData(projectId); const step = data.nextSteps.find(s => s.id === stepId); if (!step) { throw new ProjectError(`Next step not found: ${stepId}`, projectId); } const session = data.workingSessions.find(s => s.nextStepId === stepId); const handoff = session ? data.handoffs.find(h => h.sessionId === session.id) : undefined; return { step, session, handoff }; }
- src/index.ts:394-405 (schema)The tool schema definition provided in the list_tools response, specifying name, description, and input schema requiring projectId and stepId.{ name: "get_next_step_history", description: "Get complete history of a next step including session and handoff", inputSchema: { type: "object", properties: { projectId: { type: "string", description: "Project identifier" }, stepId: { type: "string", description: "Next step ID" } }, required: ["projectId", "stepId"] } }
- src/index.ts:508-518 (registration)The switch case in the CallToolRequestSchema handler that registers and dispatches the get_next_step_history tool call to the ProjectManager method.case "get_next_step_history": const history = await projectManager.getNextStepHistory( args.projectId as string, args.stepId as string ); return { content: [{ type: "text", text: JSON.stringify(history, null, 2) }] };