Skip to main content
Glama

agentic_pr_create

Automatically create GitHub pull requests with AI-generated descriptions by providing an issue number. This tool analyzes issues and generates comprehensive PR content to streamline development workflows.

Instructions

PRAgent実行 - PR自動作成・説明文AI生成

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branch_nameNoブランチ名(オプション)
issue_numberYesGitHub Issue番号

Implementation Reference

  • The handler function that implements the core logic of 'agentic_pr_create' by triggering a GitHub Actions workflow ('agentic-system.yml' with agent=pr) to automatically create a PR linked to the specified issue.
      private async handlePRCreate(args: {
        issue_number: number;
        branch_name?: string;
      }) {
        try {
          const branchParam = args.branch_name ? ` -f branch="${args.branch_name}"` : '';
          await execAsync(
            `gh workflow run agentic-system.yml -f agent=pr -f issue_number=${args.issue_number}${branchParam}`,
            { cwd: process.env.GITHUB_REPOSITORY_PATH || process.cwd() }
          );
    
          return {
            content: [
              {
                type: 'text',
                text: `## 🔀 PRAgent起動
    
    **Issue**: #${args.issue_number}
    ${args.branch_name ? `**Branch**: ${args.branch_name}` : '**Branch**: feature/issue-${args.issue_number}'}
    
    ✅ PR作成ワークフローを起動しました
    
    作成されたPRは Issue #${args.issue_number} にリンクされます`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: `❌ エラー: ${error instanceof Error ? error.message : 'Unknown error'}`
              }
            ]
          };
        }
      }
  • Input schema defining the parameters for the 'agentic_pr_create' tool: required issue_number and optional branch_name.
    inputSchema: {
      type: 'object',
      properties: {
        issue_number: {
          type: 'number',
          description: 'GitHub Issue番号'
        },
        branch_name: {
          type: 'string',
          description: 'ブランチ名(オプション)'
        }
      },
      required: ['issue_number']
    }
  • server.ts:108-125 (registration)
    Tool definition and registration in the TOOLS array, returned by listTools handler for tool discovery.
    {
      name: 'agentic_pr_create',
      description: 'PRAgent実行 - PR自動作成・説明文AI生成',
      inputSchema: {
        type: 'object',
        properties: {
          issue_number: {
            type: 'number',
            description: 'GitHub Issue番号'
          },
          branch_name: {
            type: 'string',
            description: 'ブランチ名(オプション)'
          }
        },
        required: ['issue_number']
      }
    },
  • server.ts:235-236 (registration)
    Dispatch case in the CallToolRequest handler switch statement that routes calls to the specific handler.
    case 'agentic_pr_create':
      return await this.handlePRCreate(args as any);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions AI generation for descriptions, which adds some context, but fails to disclose critical traits: whether this is a read-only or mutative operation (implied creation suggests mutation), authentication needs, rate limits, or what happens on execution (e.g., PR submission to GitHub). For a tool with no annotations, this leaves significant gaps in understanding behavior.

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 concise with two parts separated by a dash, front-loading the main action ('PRAgent実行') and specifying outcomes. It wastes no words, though it could be slightly clearer in English translation. Every phrase contributes to the purpose, making it efficient despite language barriers.

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 complexity (PR creation with AI features), no annotations, no output schema, and 2 parameters, the description is incomplete. It doesn't explain return values, error handling, or integration details (e.g., with GitHub). For a tool that likely involves mutative actions and AI processing, more context is needed to ensure the agent can use it effectively without structured support.

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%, with clear parameter descriptions in Japanese ('ブランチ名(オプション)' for branch_name, 'GitHub Issue番号' for issue_number). The description adds no parameter semantics beyond the schema, such as format examples or constraints. With high schema coverage, the baseline is 3, as the schema adequately documents parameters without extra help from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'PRAgent実行 - PR自動作成・説明文AI生成' states the tool creates PRs and generates AI descriptions, which gives a general purpose. However, it's somewhat vague in Japanese and doesn't clearly distinguish this PR creation tool from sibling tools like 'agentic_codegen_execute' or 'agentic_review_execute' that might also involve PR-related operations. It specifies the verb (create/generate) and resource (PR/description) but lacks precision about scope or differentiation.

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., after issue analysis), or exclusions. Given sibling tools like 'agentic_issue_analyze' that might precede PR creation, the lack of usage guidelines leaves the agent to infer timing, which is insufficient for clear 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/ShunsukeHayashi/agentic-mcp-server'

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