Skip to main content
Glama
cexll
by cexll

brainstorm

Generate creative ideas using structured frameworks with domain context and feasibility analysis for brainstorming challenges.

Instructions

Generate creative ideas using structured frameworks with domain context and feasibility analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesBrainstorming challenge or question
modelNoModel: gpt-5-codex (default), gpt-5, o3, o4-mini, codex-1, codex-mini-latest, gpt-4.1
approvalPolicyNoApproval: never, on-request, on-failure, untrusted
sandboxModeNoAccess: read-only, workspace-write, danger-full-access
fullAutoNoFull automation mode
yoloNo⚠️ Bypass all safety (dangerous)
cdNoWorking directory
methodologyNoFramework: divergent, convergent, scamper, design-thinking, lateral, auto (default)auto
domainNoDomain: software, business, creative, research, product, marketing, etc.
constraintsNoLimitations: budget, time, technical, legal, etc.
existingContextNoBackground info or previous attempts
ideaCountNoNumber of ideas (default: 12, range: 5-30)
includeAnalysisNoInclude feasibility/impact analysis
searchNoEnable web search for research (activates web_search_request feature)
ossNoUse local Ollama server
enableFeaturesNoEnable feature flags
disableFeaturesNoDisable feature flags

Implementation Reference

  • The main handler function that processes arguments, builds the enhanced brainstorming prompt, logs debug info, reports progress, and executes the Codex CLI with the prompt.
    execute: async (args, onProgress) => {
      const {
        prompt,
        model,
        approvalPolicy,
        sandboxMode,
        fullAuto,
        yolo,
        cd,
        methodology = 'auto',
        domain,
        constraints,
        existingContext,
        ideaCount = 12,
        includeAnalysis = true,
        search,
        oss,
        enableFeatures,
        disableFeatures,
      } = args;
    
      if (!prompt?.trim()) {
        throw new Error('You must provide a valid brainstorming challenge or question to explore');
      }
    
      let enhancedPrompt = buildBrainstormPrompt({
        prompt: prompt.trim() as string,
        methodology: methodology as string,
        domain: domain as string | undefined,
        constraints: constraints as string | undefined,
        existingContext: existingContext as string | undefined,
        ideaCount: ideaCount as number,
        includeAnalysis: includeAnalysis as boolean,
      });
    
      Logger.debug(
        `Brainstorm: Using methodology '${methodology}' for domain '${domain || 'general'}'`
      );
    
      // Report progress to user
      onProgress?.(`Generating ${ideaCount} ideas via ${methodology} methodology...`);
    
      // Execute with Codex (non-interactive)
      return await executeCodexCLI(
        enhancedPrompt,
        {
          model: model as string | undefined,
          fullAuto: Boolean(fullAuto),
          approvalPolicy: approvalPolicy as any,
          sandboxMode: sandboxMode as any,
          yolo: Boolean(yolo),
          cd: cd as string | undefined,
          search: search as boolean,
          oss: oss as boolean,
          enableFeatures: enableFeatures as string[],
          disableFeatures: disableFeatures as string[],
        },
        onProgress
      );
    },
  • Zod schema defining all input parameters for the brainstorm tool, including prompt, model options, methodology, domain, and various execution flags.
    const brainstormArgsSchema = z.object({
      prompt: z.string().min(1).describe('Brainstorming challenge or question'),
      model: z
        .string()
        .optional()
        .describe(
          'Model: gpt-5-codex (default), gpt-5, o3, o4-mini, codex-1, codex-mini-latest, gpt-4.1'
        ),
      approvalPolicy: z
        .enum(['never', 'on-request', 'on-failure', 'untrusted'])
        .optional()
        .describe('Approval: never, on-request, on-failure, untrusted'),
      sandboxMode: z
        .enum(['read-only', 'workspace-write', 'danger-full-access'])
        .optional()
        .describe('Access: read-only, workspace-write, danger-full-access'),
      fullAuto: z.boolean().optional().describe('Full automation mode'),
      yolo: z.boolean().optional().describe('⚠️ Bypass all safety (dangerous)'),
      cd: z.string().optional().describe('Working directory'),
      methodology: z
        .enum(['divergent', 'convergent', 'scamper', 'design-thinking', 'lateral', 'auto'])
        .default('auto')
        .describe(
          'Framework: divergent, convergent, scamper, design-thinking, lateral, auto (default)'
        ),
      domain: z
        .string()
        .optional()
        .describe('Domain: software, business, creative, research, product, marketing, etc.'),
      constraints: z.string().optional().describe('Limitations: budget, time, technical, legal, etc.'),
      existingContext: z.string().optional().describe('Background info or previous attempts'),
      ideaCount: z
        .number()
        .int()
        .positive()
        .default(12)
        .describe('Number of ideas (default: 12, range: 5-30)'),
      includeAnalysis: z.boolean().default(true).describe('Include feasibility/impact analysis'),
      search: z
        .boolean()
        .optional()
        .describe('Enable web search for research (activates web_search_request feature)'),
      oss: z.boolean().optional().describe('Use local Ollama server'),
      enableFeatures: z.array(z.string()).optional().describe('Enable feature flags'),
      disableFeatures: z.array(z.string()).optional().describe('Disable feature flags'),
    });
  • Imports the brainstormTool and adds it to the central toolRegistry array for MCP tool registration.
    import { brainstormTool } from './brainstorm.tool.js';
    import { fetchChunkTool } from './fetch-chunk.tool.js';
    import { timeoutTestTool } from './timeout-test.tool.js';
    
    toolRegistry.push(
      askCodexTool,
      batchCodexTool,
      // reviewCodexTool,
      pingTool,
      helpTool,
      versionTool,
      brainstormTool,
      fetchChunkTool,
      timeoutTestTool
    );
  • Helper function that constructs the formatted brainstorming prompt incorporating the methodology instructions, context, and formatting requirements.
    function buildBrainstormPrompt(config: {
      prompt: string;
      methodology: string;
      domain?: string;
      constraints?: string;
      existingContext?: string;
      ideaCount: number;
      includeAnalysis: boolean;
    }): string {
      const { prompt, methodology, domain, constraints, existingContext, ideaCount, includeAnalysis } =
        config;
    
      // Select methodology framework
      let frameworkInstructions = getMethodologyInstructions(methodology, domain);
    
      let enhancedPrompt = `# BRAINSTORMING SESSION
    
    ## Challenge: ${prompt}
    
    ## Framework
    ${frameworkInstructions}
    
    ## Context
    ${domain ? `Domain: ${domain}` : ''}
    ${constraints ? `Constraints: ${constraints}` : ''}
    ${existingContext ? `Background: ${existingContext}` : ''}
    
    ## Requirements
    Generate ${ideaCount} actionable ideas. Keep descriptions concise (2-3 sentences max).
    
    ${
      includeAnalysis
        ? `## Analysis
    Rate each: Feasibility (1-5), Impact (1-5), Innovation (1-5)`
        : ''
    }
    
    ## Format
    ### Idea [N]: [Name]
    Description: [2-3 sentences]
    ${includeAnalysis ? 'Ratings: F:[1-5] I:[1-5] N:[1-5]' : ''}
    
    Begin:`;
    
      return enhancedPrompt;
    }
  • Helper function providing detailed instructions for each supported brainstorming methodology (divergent, convergent, SCAMPER, etc.).
    /**
     * Returns methodology-specific instructions for structured brainstorming
     */
    function getMethodologyInstructions(methodology: string, domain?: string): string {
      const methodologies: Record<string, string> = {
        divergent: `**Divergent Thinking Approach:**
    - Generate maximum quantity of ideas without self-censoring
    - Build on wild or seemingly impractical ideas
    - Combine unrelated concepts for unexpected solutions
    - Use "Yes, and..." thinking to expand each concept
    - Postpone evaluation until all ideas are generated`,
    
        convergent: `**Convergent Thinking Approach:**
    - Focus on refining and improving existing concepts
    - Synthesize related ideas into stronger solutions
    - Apply critical evaluation criteria
    - Prioritize based on feasibility and impact
    - Develop implementation pathways for top ideas`,
    
        scamper: `**SCAMPER Creative Triggers:**
    - **Substitute:** What can be substituted or replaced?
    - **Combine:** What can be combined or merged?
    - **Adapt:** What can be adapted from other domains?
    - **Modify:** What can be magnified, minimized, or altered?
    - **Put to other use:** How else can this be used?
    - **Eliminate:** What can be removed or simplified?
    - **Reverse:** What can be rearranged or reversed?`,
    
        'design-thinking': `**Human-Centered Design Thinking:**
    - **Empathize:** Consider user needs, pain points, and contexts
    - **Define:** Frame problems from user perspective
    - **Ideate:** Generate user-focused solutions
    - **Consider Journey:** Think through complete user experience
    - **Prototype Mindset:** Focus on testable, iterative concepts`,
    
        lateral: `**Lateral Thinking Approach:**
    - Make unexpected connections between unrelated fields
    - Challenge fundamental assumptions
    - Use random word association to trigger new directions
    - Apply metaphors and analogies from other domains
    - Reverse conventional thinking patterns`,
    
        auto: `**AI-Optimized Approach:**
    ${domain ? `Given the ${domain} domain, I'll apply the most effective combination of:` : "I'll intelligently combine multiple methodologies:"}
    - Divergent exploration with domain-specific knowledge
    - SCAMPER triggers and lateral thinking
    - Human-centered perspective for practical value`,
      };
    
      return methodologies[methodology] || methodologies['auto'];
    }
Behavior2/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 mentions 'feasibility analysis' but lacks critical details: it doesn't specify whether this is a read-only or mutating operation, what permissions or authentication might be required, potential rate limits, or output format. For a tool with 17 parameters and no annotations, this is a significant gap in transparency.

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 that front-loads the core purpose without unnecessary words. Every phrase ('creative ideas', 'structured frameworks', 'domain context', 'feasibility analysis') contributes meaningfully, making it appropriately sized and well-structured for quick understanding.

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 (17 parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral aspects like safety, permissions, or output format, and while schema coverage is high, the description itself lacks depth to guide an agent in using such a multifaceted tool effectively. This is inadequate for a tool of this scope.

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%, meaning all parameters are documented in the schema itself. The description adds minimal value beyond the schema by hinting at 'structured frameworks' (related to 'methodology') and 'domain context' (related to 'domain'), but doesn't provide additional syntax, format, or usage details for parameters. This meets the baseline for high schema coverage.

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 clearly states the tool's purpose as 'Generate creative ideas using structured frameworks with domain context and feasibility analysis.' It specifies the verb ('generate'), resource ('creative ideas'), and key aspects ('structured frameworks', 'domain context', 'feasibility analysis'). However, it doesn't explicitly differentiate from sibling tools like 'ask-codex' or 'batch-codex', which might also generate content, so it doesn't reach the highest score.

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. It doesn't mention sibling tools like 'ask-codex' or 'batch-codex', nor does it specify contexts or exclusions for usage. The agent must infer usage based on the purpose alone, which is insufficient for effective tool selection.

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/cexll/codex-mcp-server'

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