Skip to main content
Glama

generate_session

Create structured Learning Hour content for Technical Coaches to facilitate deliberate practice sessions on technical topics like Feature Envy or DRY Principle.

Instructions

Generate comprehensive Learning Hour content for Technical Coaches

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesThe learning topic (e.g., 'Feature Envy', 'DRY Principle')
styleNoPresentation style: slide (default), vertical, or workshopslide

Implementation Reference

  • The primary handler method for the 'generate_session' MCP tool. Parses input arguments using Zod schema, delegates to LearningHourGenerator.generateSessionContent, and returns formatted content block.
    public async generateSession(args: any) {
      const input = GenerateSessionInputSchema.parse(args);
    
      try {
        const sessionData = await this.generator.generateSessionContent(input.topic, input.style);
    
        return {
          content: [
            {
              type: "text",
              text: `✅ Learning Hour session generated for: ${input.topic}`,
            },
            {
              type: "text",
              text: JSON.stringify(sessionData, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new Error(`Failed to generate session: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • src/index.ts:97-115 (registration)
    Tool registration in ListToolsRequestHandler. Defines name, description, and input schema for the MCP server.
    {
      name: "generate_session",
      description: "Generate comprehensive Learning Hour content for Technical Coaches",
      inputSchema: {
        type: "object",
        properties: {
          topic: {
            type: "string",
            description: "The learning topic (e.g., 'Feature Envy', 'DRY Principle')",
          },
          style: {
            type: "string",
            description: "Presentation style: slide (default), vertical, or workshop",
            default: "slide"
          },
        },
        required: ["topic"],
      },
    },
  • Zod schema used for input validation in the generateSession handler.
    const GenerateSessionInputSchema = z.object({
      topic: z.string().min(1, "Topic is required"),
      style: z.string().optional().default('slide'),
    });
  • Core implementation that generates session content by constructing a detailed prompt and calling the Anthropic Claude API. This is the actual logic execution delegated from the MCP handler.
    async generateSessionContent(topic: string, style: string = 'slide'): Promise<SessionContent> {
      const prompt = this.buildSessionPrompt(topic, style);
    
      try {
        const message = await this.client.messages.create({
          model: this.model,
          max_tokens: 3000,
          messages: [{
            role: 'user',
            content: prompt
          }]
        });
    
        const textContent = message.content.find(block => block.type === 'text');
        if (!textContent || textContent.type !== 'text') {
          throw new Error('No text content in response');
        }
        const content = textContent.text;
        const sessionData = JSON.parse(content);
        this.validateSessionContent(sessionData);
    
        return sessionData;
      } catch (error) {
        throw new Error(`Failed to generate session: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • TypeScript interface defining the structure of the SessionContent returned by generateSessionContent.
    export interface SessionContent {
      topic: string;
      sessionOverview: string;
      learningObjectives: string[];
      activities: LearningActivity[];
      discussionPrompts: string[];
      keyTakeaways: string[];
      miroContent: MiroContent;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates content but doesn't describe what 'comprehensive' entails (e.g., length, format, depth), whether it's a one-time generation or reusable, or any limitations (e.g., topic scope, output format). This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/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. It avoids unnecessary words and gets straight to the point, though it could be slightly more structured by including key details like output format or usage context.

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 of generating educational content, no annotations, and no output schema, the description is incomplete. It doesn't explain what the output looks like (e.g., text, slides, interactive materials), quality expectations, or any behavioral traits like rate limits or error handling. This leaves significant gaps for the agent.

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%, so the schema already documents both parameters ('topic' and 'style') with descriptions and defaults. The description doesn't add any additional meaning beyond what's in the schema, such as examples of 'comprehensive' content or how 'style' affects output. Baseline 3 is appropriate when the schema handles parameter documentation.

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 action ('Generate comprehensive Learning Hour content') and the target audience ('for Technical Coaches'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate this tool from sibling tools like 'generate_code_example' or 'create_miro_board', which might also be used in educational contexts, so it doesn't fully distinguish from alternatives.

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 prerequisites, context (e.g., for coaching sessions vs. self-study), or exclusions (e.g., not for non-technical topics). This leaves the agent with minimal direction on appropriate usage scenarios.

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/SDiamante13/learning-hour-mcp'

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