Skip to main content
Glama

add_style_decision

Record style decisions for consistent terminology, formatting, citations, tone, and other writing elements in markdown manuscripts.

Instructions

Record a style decision for consistency

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
categoryYesStyle category
canonical_choiceYesThe chosen canonical form
rationaleNoWhy this choice was made
examplesNoExample usages

Implementation Reference

  • Tool handler function that extracts arguments and delegates to WritersAid.addStyleDecision
    private async addStyleDecision(args: Record<string, unknown>) { const category = args.category as | "terminology" | "formatting" | "citations" | "tone" | "headings" | "lists" | "code_blocks" | "quotes" | "other"; const canonicalChoice = args.canonical_choice as string; const rationale = args.rationale as string | undefined; const examples = args.examples as string[] | undefined; return this.writersAid.addStyleDecision({ category, canonicalChoice, rationale, examples, }); }
  • Input schema and description for the add_style_decision tool
    name: "add_style_decision", description: "Record a style decision for consistency", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" }, category: { type: "string", enum: ["terminology", "formatting", "citations", "tone", "headings", "lists", "code_blocks", "quotes", "other"], description: "Style category", }, canonical_choice: { type: "string", description: "The chosen canonical form" }, rationale: { type: "string", description: "Why this choice was made" }, examples: { type: "array", items: { type: "string" }, description: "Example usages", }, }, required: ["category", "canonical_choice"], }, },
  • Tool registration in the handleTool switch statement
    case "add_style_decision": return this.addStyleDecision(args);
  • Core implementation that persists the style decision to the database
    addStyleDecision( decision: Omit<StyleDecision, "id" | "createdAt"> ): StyleDecision { const now = Date.now(); const newDecision: StyleDecision = { id: nanoid(), ...decision, createdAt: now, }; this.db .prepare( `INSERT INTO style_decisions (id, category, canonical_choice, alternatives_rejected, rationale, examples, created_at) VALUES (?, ?, ?, ?, ?, ?, ?)` ) .run( newDecision.id, newDecision.category, newDecision.canonicalChoice, newDecision.alternativesRejected ? JSON.stringify(newDecision.alternativesRejected) : null, newDecision.rationale || null, newDecision.examples ? JSON.stringify(newDecision.examples) : null, newDecision.createdAt ); return newDecision; }
  • Delegation method in WritersAid that calls RequirementsManager and formats response
    addStyleDecision(options: { category: | "terminology" | "formatting" | "citations" | "tone" | "headings" | "lists" | "code_blocks" | "quotes" | "other"; canonicalChoice: string; rationale?: string; examples?: string[]; }) { const decision = this.requirementsManager.addStyleDecision({ category: options.category, canonicalChoice: options.canonicalChoice, rationale: options.rationale, examples: options.examples, }); return { id: decision.id, category: decision.category, canonicalChoice: decision.canonicalChoice, rationale: decision.rationale, examples: decision.examples, }; }

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