Skip to main content
Glama

list_writing_decisions

Retrieve and filter writing decisions from markdown manuscripts by file, type, or date range to track editorial choices and maintain consistency.

Instructions

List writing decisions by file, type, or date range

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
file_pathNoFilter decisions for this file
decision_typeNoFilter by decision type
limitNoMaximum decisions to return

Implementation Reference

  • Core handler implementation that queries the DecisionExtractor for writing decisions filtered by file, type, or defaults to recent structure decisions, then maps and returns formatted results.
    async listWritingDecisions(options: { filePath?: string; decisionType?: "structure" | "content" | "terminology" | "style"; limit?: number; }) { let decisions; if (options.filePath) { decisions = this.decisionExtractor.getDecisionsByFile( options.filePath, options.limit || 20 ); } else if (options.decisionType) { decisions = this.decisionExtractor.getDecisionsByType( options.decisionType, options.limit || 20 ); } else { // Get all recent decisions decisions = this.decisionExtractor.getDecisionsByType( "structure", options.limit || 20 ); } return { decisions: decisions.map((decision) => ({ id: decision.id, decisionText: decision.decisionText, rationale: decision.rationale, decisionType: decision.decisionType, filePath: decision.filePath, section: decision.section, timestamp: new Date(decision.timestamp).toISOString(), alternativesConsidered: decision.alternativesConsidered, })), total: decisions.length, }; }
  • Intermediate handler that parses tool arguments (file_path, decision_type, limit) and delegates execution to WritersAid.listWritingDecisions.
    private async listWritingDecisions(args: Record<string, unknown>) { const filePath = args.file_path as string | undefined; const decisionType = args.decision_type as | "structure" | "content" | "terminology" | "style" | undefined; const limit = (args.limit as number) || 20; return this.writersAid.listWritingDecisions({ filePath, decisionType, limit, }); }
  • Dispatch case in the central handleTool switch statement that routes calls to the listWritingDecisions handler method.
    case "list_writing_decisions": return this.listWritingDecisions(args);
  • MCP tool schema definition specifying input parameters, types, descriptions, and defaults for validation.
    { name: "list_writing_decisions", description: "List writing decisions by file, type, or date range", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" }, file_path: { type: "string", description: "Filter decisions for this file" }, decision_type: { type: "string", enum: ["structure", "content", "terminology", "style"], description: "Filter by decision type", }, limit: { type: "number", description: "Maximum decisions to return", default: 20 }, }, }, },

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