Skip to main content
Glama

show_status

Display the full session state: completed rounds per model, open questions, and conflicts.

Instructions

Show full session state — which models completed each round, open questions, and conflicts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameNoYour model name (optional)

Implementation Reference

  • src/server.ts:171-183 (registration)
    Registration of the 'show_status' MCP tool with description and optional modelName parameter. The handler calls detectCaller then executeStatus.
    // ─── show_status ──────────────────────────────────────────────────
    server.tool(
      "show_status",
      "Show full session state — which models completed each round, open questions, and conflicts",
      {
        modelName: z.string().optional().describe("Your model name (optional)"),
      },
      async (params, extra) => {
        const identity = detectCaller(server.server.getClientVersion(), params.modelName);
        const formatted = await executeStatus(projectRoot, identity.cliTool, identity.modelName);
        return { content: [{ type: "text", text: formatted }] };
      }
    );
  • The executeStatus function — the main handler for show_status. It delegates to getStatus() for data retrieval and logs the action.
    export async function executeStatus(
      projectRoot: string,
      cliTool: string,
      modelName: string
    ): Promise<string> {
      const result = await getStatus(projectRoot);
    
      await logAction(projectRoot, cliTool, modelName, "status", "Viewed session status");
    
      return result.formatted;
    }
  • getStatus() — gathers session data: reads config, loads plans per round, detects conflicts, tracks open questions, and constructs the SessionStatus object.
    export async function getStatus(projectRoot: string): Promise<{
      status?: SessionStatus;
      formatted: string;
      error?: string;
    }> {
      const config = await readConfig(projectRoot);
      if (!config) {
        return {
          formatted: "⚠ Project not initialized. Run `polyplan-mcp init` first.",
          error: "Project not initialized.",
        };
      }
    
      const rounds: Round[] = ["round1", "round2", "final"];
      const roundStatuses: Record<Round, RoundStatus> = {
        round1: { plans: [], hasPlans: false },
        round2: { plans: [], hasPlans: false },
        final: { plans: [], hasPlans: false },
      };
      const plansWithTimestamps: Record<Round, PlanFile[]> = {
        round1: [],
        round2: [],
        final: [],
      };
    
      for (const round of rounds) {
        const plans = await readPlansByRound(projectRoot, round);
        plansWithTimestamps[round] = plans;
        roundStatuses[round] = {
          plans: plans.map((p) => ({ round: p.round, cliTool: p.cliTool, modelName: p.modelName, filename: p.filename })),
          hasPlans: plans.length > 0,
        };
      }
    
      let openQuestionCount = 0;
      let conflictCount = 0;
    
      try {
        const round1Plans = await readPlansByRound(projectRoot, "round1");
        if (round1Plans.length > 0) {
          const conflicts = detectConflicts(round1Plans);
          conflictCount = conflicts.length;
          const questions = trackQuestions(round1Plans);
          openQuestionCount = questions.filter((q) => !q.answered).length;
        }
      } catch {
        // Conflict/question detection failed — not critical
      }
    
      const status: SessionStatus = {
        projectName: config.projectName,
        sessionStarted: config.createdAt,
        rounds: roundStatuses,
        openQuestionCount,
        conflictCount,
      };
    
      const formatted = await formatStatus(status, plansWithTimestamps);
    
      return { status, formatted };
    }
  • formatStatus() — formats the session status into a human-readable string showing Round 1, Round 2, Final completion, open questions, conflicts, and next-step hints.
    async function formatStatus(
      status: SessionStatus,
      plansWithTimestamps: Record<Round, PlanFile[]>
    ): Promise<string> {
      const lines: string[] = [];
    
      lines.push(`📁 Project: ${status.projectName}`);
      lines.push(`Session started: ${new Date(status.sessionStarted).toLocaleString()}`);
      lines.push("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
      lines.push("");
    
      // Round 1
      lines.push("ROUND 1 — Individual Plans");
      if (status.rounds.round1.plans.length === 0) {
        lines.push("  ✗ not started");
      } else {
        for (const plan of plansWithTimestamps.round1) {
          lines.push(`  ✓ ${plan.cliTool}-${plan.modelName}  ${timeAgo(plan.timestamp)}`);
        }
      }
      lines.push("");
    
      // Round 2
      lines.push("ROUND 2 — Peer Review Plans");
      if (status.rounds.round2.plans.length === 0) {
        lines.push("  ✗ not started");
      } else {
        for (const plan of plansWithTimestamps.round2) {
          lines.push(`  ✓ ${plan.cliTool}-${plan.modelName}  ${timeAgo(plan.timestamp)}`);
        }
      }
      lines.push("");
    
      // Final
      lines.push("FINAL — Synthesis");
      if (status.rounds.final.plans.length === 0) {
        lines.push("  ✗ not started");
      } else {
        for (const plan of plansWithTimestamps.final) {
          lines.push(`  ✓ ${plan.cliTool}-${plan.modelName}  ${timeAgo(plan.timestamp)}`);
        }
      }
      lines.push("");
    
      lines.push("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
    
      if (status.openQuestionCount > 0) {
        lines.push(`⚠  ${status.openQuestionCount} open question(s) detected across Round 1 plans`);
      }
      if (status.conflictCount > 0) {
        lines.push(`⚠  ${status.conflictCount} conflict(s) detected across Round 1 plans`);
      }
    
      if (!status.rounds.round1.hasPlans) {
        lines.push("ℹ  Run /polyplan round1 in CLI tools to start planning");
        lines.push("ℹ  OpenCode/Gemini users: use \"Call the polyplan_round1 tool\" instead of \"Use polyplan\" to ensure MCP tool invocation");
      } else if (!status.rounds.round2.hasPlans) {
        lines.push("ℹ  When satisfied with Round 1, run /polyplan round2 to begin peer review");
      } else if (!status.rounds.final.hasPlans) {
        lines.push("ℹ  When satisfied with Round 2, run /polyplan final to synthesize");
      } else {
        lines.push("✅ All rounds complete! Check your final plan in .plans/");
      }
    
      return lines.join("\n");
    }
  • Imports and type usage for SessionStatus, RoundStatus, Round, PlanFile — these define the shape of the status data.
    /**
     * PolyPlan MCP — Status Tool
     *
     * Shows the full session state: which models have completed each round,
     * open questions count, and conflict count.
     */
    
    import type { SessionStatus, RoundStatus, Round, PlanFile } from "../types.js";
    import { readConfig } from "../core/session.js";
    import { readPlansByRound, timeAgo } from "../core/plansManager.js";
    import { logAction } from "../core/historyLogger.js";
    import { detectConflicts } from "../core/conflictEngine.js";
    import { trackQuestions } from "../core/questionTracker.js";
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states what is shown, but fails to mention read-only nature, dependency on prior steps, or error conditions (e.g., no session available). Minimal behavioral context.

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, front-loaded sentence that immediately conveys the tool's purpose with no extraneous words. Every word is necessary.

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?

Given low complexity (one optional parameter, no output schema, no annotations), the description provides sufficient purpose clarity. However, it lacks depth on behavioral aspects and prerequisites, leaving the agent without complete context for decision-making.

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?

The input schema has 100% coverage with a description for the optional 'modelName' parameter. The tool description does not add any meaning beyond the 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?

The description clearly states the tool shows the full session state, specifically listing key components: completed models per round, open questions, and conflicts. This verb+resource combination is specific and distinguishes it from siblings like show_conflicts, show_questions, etc.

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?

No guidance is provided on when to use this tool versus more specific siblings (e.g., show_conflicts, show_questions). The description implies it's for a comprehensive overview, but lacks explicit 'when not to use' or alternative recommendations.

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