Skip to main content
Glama

generate_release_note

Create structured release notes by analyzing differences between Git repository tags. Automatically generates Markdown output highlighting features, improvements, bug fixes, and breaking changes.

Instructions

タグ間の差分からリリースノートを生成します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
breakingNo破壊的変更の一覧(オプション)
bugfixesNoバグ修正の一覧(オプション)
endTagYes終了タグ
featuresNo新機能の一覧(オプション)
improvementsNo改善項目の一覧(オプション)
startTagYes開始タグ
titleNoリリースノートのタイトル(オプション)

Implementation Reference

  • The main handler for the 'generate_release_note' tool. Fetches git diff between tags, generates content using helper, saves markdown file to .iris directory, and returns the file path and content.
    private async handleGenerateReleaseNote(input: ReleaseNoteInput) {
      try {
        // .irisディレクトリの作成
        const irisDir = path.join(process.cwd(), '.iris');
        await fs.ensureDir(irisDir);
    
        // タグ間の差分を取得
        const diff = await this.git.diff([input.startTag, input.endTag]);
        const files = diff.split('diff --git').slice(1);
    
        // リリースノートの内容を生成
        const content = this.generateReleaseNoteContent(input, files);
    
        // ファイル名を生成(タグ名とタイムスタンプを使用)
        const filename = `release-note-${input.endTag}-${Date.now()}.md`;
        const filePath = path.join(irisDir, filename);
    
        // リリースノートを保存
        await fs.writeFile(filePath, content, 'utf-8');
    
        return {
          content: [
            {
              type: 'text',
              text: `リリースノートを生成しました: ${filePath}\n\n${content}`,
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : '不明なエラーが発生しました';
        throw new McpError(
          ErrorCode.InternalError,
          `リリースノートの生成に失敗しました: ${errorMessage}`
        );
      }
  • Helper function that generates the markdown content for the release note, including sections for breaking changes, features, improvements, bugfixes, and changed files based on input and git diff files.
    private generateReleaseNoteContent(input: ReleaseNoteInput, files: string[]): string {
      let content = '';
      const title = input.title || `Release ${input.endTag}`;
      const date = new Date().toISOString().split('T')[0];
    
      content += `# ${title}\n\n`;
      content += `リリース日: ${date}\n\n`;
    
      // 破壊的変更
      if (input.breaking && input.breaking.length > 0) {
        content += '## 💥 破壊的変更\n\n';
        input.breaking.forEach(item => {
          content += `- ${item}\n`;
        });
        content += '\n';
      }
    
      // 新機能
      if (input.features && input.features.length > 0) {
        content += '## ✨ 新機能\n\n';
        input.features.forEach(feature => {
          content += `- ${feature}\n`;
        });
        content += '\n';
      }
    
      // 改善項目
      if (input.improvements && input.improvements.length > 0) {
        content += '## 🔧 改善項目\n\n';
        input.improvements.forEach(improvement => {
          content += `- ${improvement}\n`;
        });
        content += '\n';
      }
    
      // バグ修正
      if (input.bugfixes && input.bugfixes.length > 0) {
        content += '## 🐛 バグ修正\n\n';
        input.bugfixes.forEach(bugfix => {
          content += `- ${bugfix}\n`;
        });
        content += '\n';
      }
    
      // 変更されたファイル
      if (files.length > 0) {
        content += '## 📝 変更されたファイル\n\n';
        files.forEach(file => {
          const match = file.match(/a\/(.*) b\//);
          if (match) {
            content += `- \`${match[1]}\`\n`;
          }
        });
        content += '\n';
      }
    
      return content;
    }
  • JSON schema defining the input parameters for the 'generate_release_note' tool, including required startTag and endTag, and optional fields for title, features, improvements, bugfixes, and breaking changes.
    inputSchema: {
      type: 'object',
      properties: {
        startTag: {
          type: 'string',
          description: '開始タグ',
        },
        endTag: {
          type: 'string',
          description: '終了タグ',
        },
        title: {
          type: 'string',
          description: 'リリースノートのタイトル(オプション)',
        },
        features: {
          type: 'array',
          items: { type: 'string' },
          description: '新機能の一覧(オプション)',
        },
        improvements: {
          type: 'array',
          items: { type: 'string' },
          description: '改善項目の一覧(オプション)',
        },
        bugfixes: {
          type: 'array',
          items: { type: 'string' },
          description: 'バグ修正の一覧(オプション)',
        },
        breaking: {
          type: 'array',
          items: { type: 'string' },
          description: '破壊的変更の一覧(オプション)',
        },
      },
      required: ['startTag', 'endTag'],
    },
  • src/index.ts:51-96 (registration)
    Registers the 'generate_release_note' tool in the MCP ListToolsRequestSchema handler, providing name, description, and input schema.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        {
          name: 'generate_release_note',
          description: 'タグ間の差分からリリースノートを生成します',
          inputSchema: {
            type: 'object',
            properties: {
              startTag: {
                type: 'string',
                description: '開始タグ',
              },
              endTag: {
                type: 'string',
                description: '終了タグ',
              },
              title: {
                type: 'string',
                description: 'リリースノートのタイトル(オプション)',
              },
              features: {
                type: 'array',
                items: { type: 'string' },
                description: '新機能の一覧(オプション)',
              },
              improvements: {
                type: 'array',
                items: { type: 'string' },
                description: '改善項目の一覧(オプション)',
              },
              bugfixes: {
                type: 'array',
                items: { type: 'string' },
                description: 'バグ修正の一覧(オプション)',
              },
              breaking: {
                type: 'array',
                items: { type: 'string' },
                description: '破壊的変更の一覧(オプション)',
              },
            },
            required: ['startTag', 'endTag'],
          },
        },
      ],
    }));
  • src/index.ts:97-111 (registration)
    Registers the CallToolRequestSchema handler, which dispatches calls to 'generate_release_note' to the handleGenerateReleaseNote function after basic validation.
      this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
        if (request.params.name === 'generate_release_note') {
          const input = request.params.arguments as unknown as ReleaseNoteInput;
          if (!input.startTag || !input.endTag) {
            throw new McpError(
              ErrorCode.InvalidParams,
              'startTagとendTagは必須パラメータです'
            );
          }
          return await this.handleGenerateReleaseNote(input);
        }
        throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${request.params.name}`);
      });
    }
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 the action (generating release notes) but lacks details on behavioral traits like required permissions, rate limits, output format, or error handling. For a tool with 7 parameters and no annotations, this is a significant gap in transparency, though it doesn't contradict any 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?

The description is a single, efficient sentence in Japanese that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing essential information. This makes it easy for an AI agent to parse quickly.

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 the tool's complexity (7 parameters, no output schema, no annotations), the description is minimally adequate but has clear gaps. It explains the core function but lacks details on behavioral aspects, usage context, and output handling. Without annotations or an output schema, more completeness is needed for effective tool invocation, though it meets a basic threshold.

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 description adds no parameter-specific information beyond what's in the input schema, which has 100% coverage with clear descriptions for all 7 parameters (e.g., '開始タグ' for startTag, '破壊的変更の一覧' for breaking). Since the schema fully documents parameters, the baseline score is 3, as the description doesn't compensate but doesn't need to given the 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: 'タグ間の差分からリリースノートを生成します' (Generates release notes from differences between tags). It specifies the verb '生成します' (generates) and the resource 'リリースノート' (release notes), with the method 'タグ間の差分から' (from differences between tags). However, with no sibling tools provided, it cannot demonstrate differentiation from alternatives, preventing a score of 5.

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, prerequisites, or exclusions. It states what the tool does but offers no context for its application, such as when it's appropriate for generating release notes from tag diffs versus other methods. This lack of usage instructions limits its effectiveness for an AI agent.

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

Related 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/Sunwood-ai-labs/release-notes-generator-iris-mcp-server'

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