Skip to main content
Glama

round_2_context

Fetches Round 2 context with other models' Round 1 plans to prepare for generating your Round 2 plan.

Instructions

Get the Round 2 prompt with all other models' Round 1 plans injected — call this before generating your Round 2 plan

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNameNoYour model name (e.g., 'sonnet4.6') — used to exclude your own Round 1 plan from the injected context

Implementation Reference

  • The main handler for the round_2_context tool. Reads all Round 1 plans, filters out the caller's own plan, and builds a Round 2 prompt with all other models' plans injected.
    export async function getRound2Context(
      projectRoot: string,
      identity: CallerIdentity
    ): Promise<{ prompt: string; error?: string }> {
      const config = await readConfig(projectRoot);
      if (!config) {
        return { prompt: "", error: "Project not initialized. Run `polyplan-mcp init` first." };
      }
    
      const round1Plans = await readPlansByRound(projectRoot, "round1");
    
      if (round1Plans.length < 2) {
        return {
          prompt: "",
          error: `Round 2 requires at least 2 Round 1 plans. Currently have ${round1Plans.length}.`,
        };
      }
    
      // Split into own plan and others
      const ownPlan = round1Plans.find(
        (p) => p.cliTool === identity.cliTool && p.modelName === identity.modelName
      );
      const otherPlans = round1Plans.filter(
        (p) => !(p.cliTool === identity.cliTool && p.modelName === identity.modelName)
      );
    
      const prompt = generateRound2Prompt(
        config.projectName,
        ownPlan?.content ?? null,
        otherPlans.map((p) => ({
          identifier: `${p.cliTool}-${p.modelName}`,
          content: p.content,
        }))
      );
    
      return { prompt };
    }
  • Input schema for round_2_context — accepts an optional modelName string parameter.
    {
      modelName: z.string().optional().describe("Your model name (e.g., 'sonnet4.6') — used to exclude your own Round 1 plan from the injected context"),
    },
  • src/server.ts:119-133 (registration)
    Registration of the round_2_context tool on the MCP server with its name, description, input schema, and handler callback.
    // ─── round_2_context ──────────────────────────────────────────────
    server.tool(
      "round_2_context",
      "Get the Round 2 prompt with all other models' Round 1 plans injected — call this before generating your Round 2 plan",
      {
        modelName: z.string().optional().describe("Your model name (e.g., 'sonnet4.6') — used to exclude your own Round 1 plan from the injected context"),
      },
      async (params, extra) => {
        const identity = detectCaller(server.server.getClientVersion(), params.modelName);
        const result = await getRound2Context(projectRoot, identity);
    
        if (result.error) return { content: [{ type: "text", text: `❌ ${result.error}` }] };
        return { content: [{ type: "text", text: result.prompt }] };
      }
    );
  • Helper function that builds the Round 2 prompt string containing the project name, the caller's own Round 1 plan, and all other models' Round 1 plans with instructions for peer review.
    export function generateRound2Prompt(
      projectName: string,
      ownPlanContent: string | null,
      otherPlans: Array<{ identifier: string; content: string }>
    ): string {
      const ownSection = ownPlanContent
        ? `YOUR ROUND 1 PLAN:\n${ownPlanContent}`
        : "YOUR ROUND 1 PLAN:\n(No Round 1 plan found for this model — you are joining fresh in Round 2)";
    
      const othersSection = otherPlans
        .map((p) => `--- ${p.identifier} ---\n${p.content}`)
        .join("\n\n");
    
      return `You are participating in a multi-model planning session using PolyPlan.
    
    PROJECT: ${projectName}
    ROUND: 2 of 3 — Peer Review Master Plan
    
    ${ownSection}
    
    OTHER MODELS' ROUND 1 PLANS:
    ${othersSection}
    
    Your task:
    1. Review all other models' plans
    2. Note where you agree, disagree, or where they raised points you missed
    3. If another model answered a question you had, incorporate that answer
    4. Create your revised master plan informed by all the above
    5. Explicitly note: what you changed from Round 1 and why`;
    }
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool excludes the caller's own Round 1 plan based on the modelName parameter, and that it injects other models' plans. This is sufficient behavioral information for a read-only context retrieval tool. No contradiction with annotations.

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?

A single, focused sentence that packs essential information: action, resource, context, and usage timing. No unnecessary words, perfectly front-loaded for quick understanding.

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

Completeness5/5

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

Given the low complexity (1 parameter, no output schema, no annotations), the description fully covers what the tool does, when to use it, and what the parameter does. It is complete for an agent to invoke correctly in the workflow.

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

Parameters4/5

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

The only parameter, modelName, is described with an example and explanation of its purpose (excluding own plan). This adds meaningful context beyond the schema's type and description, aiding correct usage. Schema coverage is 100%, but the description still adds value.

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 action ('Get'), the resource ('Round 2 prompt'), and the specific context (injected with other models' Round 1 plans). It also provides a usage directive ('call this before generating your Round 2 plan'), making the purpose unmistakable and distinguishing it from sibling tools like round_1_context.

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?

Explicitly states when to call ('before generating your Round 2 plan'), which is a clear usage guideline. While it doesn't mention when not to use or list alternatives, the context of sibling tools (round_1_context, round_2) implicitly differentiates. A small deduction for lack of explicit exclusions.

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