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,
      };
    }
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 'Record' which implies a write operation, but doesn't specify permissions, whether it's idempotent, how it handles duplicates, or what the response looks like. This is inadequate for a mutation tool with zero annotation coverage.

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 directly states the tool's purpose without unnecessary words. It's front-loaded and every part earns its place, making it highly concise 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 a mutation tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It lacks details on behavioral traits, error handling, and return values, which are critical for an agent to use this tool effectively in context with its siblings.

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 already documents all parameters thoroughly. The description doesn't add any meaning beyond what the schema provides, such as explaining relationships between parameters or usage nuances. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Record') and resource ('style decision') with the purpose 'for consistency', which specifies what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'list_writing_decisions' or 'track_changes', which might handle related aspects of style decisions.

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 siblings like 'list_writing_decisions' and 'track_changes', there's no indication of context, prerequisites, or exclusions for using add_style_decision, leaving the agent without usage direction.

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