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,
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool searches history but doesn't describe what 'writing session history' entails, how results are returned (e.g., format, pagination), or any limitations (e.g., rate limits, permissions). This leaves significant gaps for a search tool with 5 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. It effectively communicates the tool's function in a compact form, earning its place with zero waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a search tool with 5 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, result format, and usage context, making it inadequate for an agent to fully understand how to invoke and interpret results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond implying date range and query-based search, which is already covered by the schema's parameter descriptions. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Search writing session history by date range or query', specifying the verb 'search' and resource 'writing session history'. It distinguishes itself from siblings like 'get_writing_stats' or 'link_commits_to_sessions' by focusing on search functionality, though it doesn't explicitly differentiate from 'search_content' or 'holistic_search' which might overlap in search operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, exclusions, or compare to sibling tools like 'search_content' or 'get_session_context', leaving the agent to infer usage based on the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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