Skip to main content
Glama

generate_personal_summary

Generate a personal book memory summary from Kindle highlights by analyzing themes, key ideas, and actionable takeaways to create structured insights without external AI calls.

Instructions

Builds a prompt package for the host model to generate a personal book memory summary from highlights alone. Use this when processing a single book manually.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
authorYes
highlightsYes

Implementation Reference

  • Handler case for 'generate_personal_summary' tool. Validates args and calls buildSummaryPromptPackage to generate the prompt package for the AI model.
    case "generate_personal_summary": {
      const result = buildSummaryPromptPackage(
        args as { title: string; author: string; highlights: string[] }
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Zod input schema definition for the tool with validation rules for title (non-empty), author (non-empty), and highlights (array with at least one item). Also exports the inferred TypeScript type.
    export const GeneratePersonalSummaryInputSchema = z.object({
      title: z.string().min(1, "title must not be empty"),
      author: z.string().min(1, "author must not be empty"),
      highlights: z
        .array(z.string().min(1))
        .min(1, "highlights must contain at least one item"),
    });
    
    export type GeneratePersonalSummaryToolInput = z.infer<
      typeof GeneratePersonalSummaryInputSchema
    >;
  • src/index.ts:105-118 (registration)
    Tool registration in the MCP server. Defines the tool name 'generate_personal_summary', description, and JSON schema for the input parameters (title, author, highlights).
    {
      name: "generate_personal_summary",
      description:
        "Builds a prompt package for the host model to generate a personal book memory summary from highlights alone. Use this when processing a single book manually.",
      inputSchema: {
        type: "object",
        properties: {
          title: { type: "string" },
          author: { type: "string" },
          highlights: { type: "array", items: { type: "string" } },
        },
        required: ["title", "author", "highlights"],
      },
    },
  • Core helper function that validates input, deduplicates highlights, formats them, and builds a PromptPackage with system prompt, user prompt, and output schema for the AI to generate the summary.
    export function buildSummaryPromptPackage(
      input: GeneratePersonalSummaryToolInput
    ): PromptPackage {
      const validated = GeneratePersonalSummaryInputSchema.parse(input);
      const deduped = deduplicateHighlights(validated.highlights);
      const formattedHighlights = formatHighlights(deduped);
    
      const user_prompt = `Here are my Kindle highlights from "${validated.title}" by ${validated.author} (${deduped.length} highlights):\n\n${formattedHighlights}\n\nGenerate a structured personal memory summary based solely on these highlights. Respond with a JSON object matching the output_schema.`;
    
      return {
        system_prompt: SYSTEM_PROMPT,
        user_prompt,
        output_schema: OUTPUT_SCHEMA,
        instructions:
          "Use system_prompt as your system instruction, user_prompt as the user message, and produce a JSON object matching output_schema. Do not use any knowledge beyond the highlights provided.",
      };
    }
  • TypeScript interface defining the input structure for the generate_personal_summary tool.
    export interface GeneratePersonalSummaryInput {
      title: string;
      author: string;
      highlights: string[];
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds crucial context that the tool builds a 'prompt package' rather than generating the summary directly, which prevents confusion about return values. However, it lacks details about the prompt structure, caching behavior, or what the output format looks like given the absence of an output schema.

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 consists of two efficient sentences with zero waste. The first sentence front-loads the core functionality (building prompt packages), while the second provides usage constraints, making it easy for an agent to quickly grasp both purpose and context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with three parameters and no output schema, the description adequately explains the high-level mechanism but remains incomplete regarding input requirements and return values. Given the complexity of 'prompt package' construction, additional details about the output structure or parameter interactions would strengthen completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, requiring the description to compensate significantly. While the text mentions 'highlights alone,' implying the highlights parameter, it does not explicitly document the title or author parameters or describe expected formats (e.g., whether highlights should be raw strings or formatted text). This leaves substantial gaps in parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'builds a prompt package for the host model to generate a personal book memory summary,' specifying the verb (builds), resource (prompt package), and scope (from highlights alone). This effectively distinguishes it from siblings like parse_kindle_clippings and push_to_notion, which handle parsing and external system integration rather than summary generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context with 'Use this when processing a single book manually,' which helps identify when to select this tool over bulk-processing siblings like process_kindle_export. However, it does not explicitly name alternatives or state exclusion criteria (e.g., 'do not use for batch processing').

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/Silcfcr/kindle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server