Skip to main content
Glama

generate_outline

Create hierarchical outlines from manuscript content to organize writing projects and track structure.

Instructions

Create hierarchical outline from content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNoPath to manuscript directory (defaults to current directory)
scopeNoFile scope pattern
depthNoOutline depth
include_word_countsNoInclude word counts

Implementation Reference

  • The core handler function that executes the generate_outline tool. It fetches project statistics using writersAid.getStats and returns a flat outline of files with optional word counts.
    private async generateOutline(args: Record<string, unknown>) {
      const scope = args.scope as string | undefined;
      const includeWordCounts = (args.include_word_counts as boolean) || false;
    
      // Get all files and generate outline
      const stats = await this.writersAid.getStats({ scope });
    
      return {
        outline: stats.files.map((f) => ({
          file: f.path,
          words: includeWordCounts ? f.words : undefined,
        })),
        totalWords: stats.totalWords,
      };
    }
  • Defines the tool schema including name, description, and inputSchema for validation in MCP.
    {
      name: "generate_outline",
      description: "Create hierarchical outline from content",
      inputSchema: {
        type: "object",
        properties: {
          project_path: { type: "string", description: "Path to manuscript directory (defaults to current directory)" },
          scope: { type: "string", description: "File scope pattern" },
          depth: { type: "number", description: "Outline depth", default: 3 },
          include_word_counts: { type: "boolean", description: "Include word counts", default: false },
        },
      },
    },
  • Registers the generate_outline handler in the main tool dispatch switch statement within handleTool method.
    case "generate_outline":
      return this.generateOutline(args);
  • src/index.ts:73-75 (registration)
    Registers the list of all tools, including generate_outline, for MCP ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: writerToolDefinitions,
    }));
  • src/index.ts:87-90 (registration)
    Instantiates WriterToolHandlers and calls handleTool for tool execution in MCP CallToolRequest handler.
    const handlers = new WriterToolHandlers(writersAid);
    
    // Call the tool
    const result = await handlers.handleTool(name, args || {});
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. 'Create' implies a generative operation, but it doesn't disclose behavioral traits such as whether it modifies files, requires specific permissions, handles errors, or produces output format. This leaves significant gaps for an agent to understand how to invoke it safely and effectively.

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 with zero waste—'Create hierarchical outline from content' is front-loaded and directly conveys the core action. Every word 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 generative tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on output format, error handling, or behavioral context, which are crucial for an agent to use this tool effectively in a content analysis environment with many 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 fully documents all four parameters. The description adds no additional meaning beyond implying content as input, which is already covered by parameters like 'project_path' and 'scope'. Thus, it meets the baseline of 3 without compensating for any gaps.

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 'Create hierarchical outline from content' clearly states the verb ('Create'), resource ('hierarchical outline'), and source ('from content'), making the purpose unambiguous. However, it doesn't explicitly differentiate this outline generation tool from other content analysis tools like 'extract_themes' or 'suggest_reorganization' among the siblings, which would require a 5.

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 for content analysis (e.g., 'extract_themes', 'suggest_reorganization'), there's no indication of whether this is for structural overview, planning, or other contexts, nor any prerequisites or exclusions mentioned.

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