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

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions filtering capabilities but fails to describe key behaviors such as pagination (implied by 'limit' parameter), default sorting, error handling, or what constitutes a 'writing decision'. For a list operation with no annotation coverage, this is a significant gap in transparency.

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 extremely concise—a single sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the main action ('list writing decisions') and immediately specifies filtering options. Every part of the sentence earns its place, making it highly efficient and well-structured.

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 listing decisions with filtering, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format, what a 'writing decision' entails, or how results are structured. For a tool with 4 parameters and behavioral unknowns, more context is needed to ensure the agent can use it effectively.

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 input schema fully documents all parameters. The description adds minimal value by hinting at filtering options ('by file, type, or date range'), but it doesn't provide additional semantics beyond the schema. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description could have elaborated on parameter interactions.

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: listing writing decisions with filtering capabilities by file, type, or date range. It uses specific verbs ('list') and resources ('writing decisions'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'recall_writing_session' or 'track_changes', which might have overlapping functionality, preventing a perfect score.

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. With many sibling tools available (e.g., 'recall_writing_session', 'track_changes'), there's no indication of context, prerequisites, or exclusions. This lack of comparative guidance leaves the agent to infer usage, which is insufficient for effective tool selection.

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