Skip to main content
Glama

recall_writing_session

Search writing session history by date range or query to review past work and track progress in manuscript projects.

Instructions

Search writing session history by date range or query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
start_dateNoStart date (ISO format or relative like '1 week ago')
end_dateNoEnd date (ISO format)
file_pathNoFilter sessions that touched this file
limitNoMaximum sessions to return

Implementation Reference

  • Handler method in WriterToolHandlers that parses tool arguments (dates, file_path, limit), converts dates using parseDate helper, and delegates to WritersAid.recallWritingSessions for execution.
    private async recallWritingSession(args: Record<string, unknown>) { const startDate = args.start_date ? this.parseDate(args.start_date as string) : undefined; const endDate = args.end_date ? this.parseDate(args.end_date as string) : undefined; const filePath = args.file_path as string | undefined; const limit = (args.limit as number) || 10; return this.writersAid.recallWritingSessions({ startDate, endDate, filePath, limit, }); }
  • Tool schema definition including input schema for parameters: project_path, start_date, end_date, file_path, limit.
    { name: "recall_writing_session", description: "Search writing session history by date range or query", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" }, start_date: { type: "string", description: "Start date (ISO format or relative like '1 week ago')" }, end_date: { type: "string", description: "End date (ISO format)" }, file_path: { type: "string", description: "Filter sessions that touched this file" }, limit: { type: "number", description: "Maximum sessions to return", default: 10 }, }, }, },
  • Registration of the tool handler in the main handleTool switch statement.
    case "recall_writing_session": return this.recallWritingSession(args);
  • Core implementation in WritersAid that queries SessionManager for sessions matching criteria and formats the response with session details.
    async recallWritingSessions(options: { startDate?: Date; endDate?: Date; filePath?: string; limit?: number; }) { const query = { projectPath: this.config.projectPath, startDate: options.startDate, endDate: options.endDate, fileInvolved: options.filePath, limit: options.limit || 10, }; const sessions = this.sessionManager.findSessions(query); return { sessions: sessions.map((session) => ({ id: session.id, startedAt: new Date(session.startedAt).toISOString(), endedAt: session.endedAt ? new Date(session.endedAt).toISOString() : null, filesTouched: session.filesTouched || [], summary: session.summary || "Writing session", conversationFile: session.conversationFile, })), total: sessions.length, }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaolai/claude-writers-aid-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server