Skip to main content
Glama

show_summary

Retrieve a one-paragraph summary of each model's plan for a specific round, giving a quick overview of all positions.

Instructions

One-paragraph summary of each model's plan — quick overview of all positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roundNoWhich round to summarize (defaults to latest round with plans)
modelNameNoYour model name (optional)

Implementation Reference

  • src/server.ts:261-274 (registration)
    Registration of the show_summary tool with MCP server, defining its schema (optional round and modelName parameters) and delegating to executeSummary handler.
    // ─── show_summary ─────────────────────────────────────────────────
    server.tool(
      "show_summary",
      "One-paragraph summary of each model's plan — quick overview of all positions",
      {
        round: z.enum(["round1", "round2", "final"]).optional().describe("Which round to summarize (defaults to latest round with plans)"),
        modelName: z.string().optional().describe("Your model name (optional)"),
      },
      async (params, extra) => {
        const identity = detectCaller(server.server.getClientVersion(), params.modelName);
        const formatted = await executeSummary(projectRoot, identity, params.round as Round | undefined);
        return { content: [{ type: "text", text: formatted }] };
      }
    );
  • Core handler: reads plans for the target round (or auto-detects latest round), extracts a one-paragraph summary and topics for each plan, logs the action to history, and returns formatted output.
    export async function executeSummary(
      projectRoot: string,
      identity: CallerIdentity,
      round?: Round
    ): Promise<string> {
      // Default to the latest round that has plans
      const targetRound = round ?? (await findLatestRound(projectRoot));
    
      const plans = await readPlansByRound(projectRoot, targetRound);
    
      if (plans.length === 0) {
        return `No plans found for ${targetRound}. Run /polyplan ${targetRound} first.`;
      }
    
      const lines: string[] = [];
      lines.push(`SUMMARY — ${targetRound.toUpperCase()} (${plans.length} plans)`);
      lines.push("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
      lines.push("");
    
      for (const plan of plans) {
        const modelId = `${plan.cliTool}-${plan.modelName}`;
        const summary = extractSummary(plan.content);
        const topics = extractTopics(plan.content);
        const wordCount = plan.content.split(/\s+/).length;
    
        lines.push(`📄 ${modelId} (${wordCount} words)`);
        if (topics.length > 0) {
          lines.push(`   Sections: ${topics.join(" → ")}`);
        }
        lines.push(`   Summary: ${summary}`);
        lines.push("");
      }
    
      lines.push("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
      lines.push("💡 Read full plans in .plans/ for complete details.");
    
      await logAction(
        projectRoot,
        identity.cliTool,
        identity.modelName,
        "summary",
        `Viewed summary for ${targetRound}: ${plans.length} plans`
      );
    
      return lines.join("\n");
    }
  • Helper that extracts the first substantial paragraph from plan markdown content (skipping headings, empty lines, and short metadata lines), truncated to max 300 characters.
    function extractSummary(content: string, maxLength: number = 300): string {
      const lines = content.split("\n");
      const paragraphs: string[] = [];
      let currentParagraph: string[] = [];
    
      for (const line of lines) {
        const trimmed = line.trim();
    
        // Skip headings and empty lines to find content paragraphs
        if (trimmed.startsWith("#") || trimmed === "") {
          if (currentParagraph.length > 0) {
            paragraphs.push(currentParagraph.join(" "));
            currentParagraph = [];
          }
          continue;
        }
    
        // Skip very short lines (likely list markers or metadata)
        if (trimmed.length < 10 && !trimmed.endsWith(".")) continue;
    
        currentParagraph.push(trimmed);
      }
    
      if (currentParagraph.length > 0) {
        paragraphs.push(currentParagraph.join(" "));
      }
    
      // Find the first substantial paragraph
      const substantial = paragraphs.find((p) => p.length > 50);
      const summary = substantial ?? paragraphs[0] ?? "No summary available.";
    
      return summary.length > maxLength
        ? summary.substring(0, maxLength) + "..."
        : summary;
    }
  • Helper that extracts up to 6 section headings (h1-h3) from plan content as key topics.
    function extractTopics(content: string): string[] {
      return content
        .split("\n")
        .filter((line) => /^#{1,3}\s/.test(line))
        .map((line) => line.replace(/^#+\s*/, "").trim())
        .slice(0, 6); // Max 6 topics
    }
  • Helper that finds the latest round with any plans by checking final -> round2 -> round1 in order.
    async function findLatestRound(projectRoot: string): Promise<Round> {
      const finalPlans = await readPlansByRound(projectRoot, "final");
      if (finalPlans.length > 0) return "final";
    
      const round2Plans = await readPlansByRound(projectRoot, "round2");
      if (round2Plans.length > 0) return "round2";
    
      return "round1";
    }
Behavior3/5

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

No annotations provided, so description bears full burden. It states output is a summary but does not explicitly declare it's read-only or disclose any behavioral traits beyond the obvious.

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?

Single sentence, perfectly concise with no unnecessary words. Front-loaded with the key action.

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

Completeness4/5

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

For a simple list/summary tool with optional params and no output schema, description adequately explains purpose. Could mention output format (text) but not critical.

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?

Input schema covers 100% of parameters with descriptions. Description adds no extra meaning beyond schema, so baseline score of 3 is appropriate.

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?

Description clearly states it provides a one-paragraph summary of each model's plan for a quick overview. It distinguishes from siblings like show_diff, show_agree, which are more detailed or specific.

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

Usage Guidelines3/5

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

Description implies usage for quick overview but does not explicitly state when not to use or suggest alternatives. Lacks guidance on when to prefer this over other summary tools.

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/IMAFDI/polyplan-mcp'

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