Skip to main content
Glama

git-issues

Manage Git repository issues by creating, listing, updating, closing, commenting, and searching across GitHub and Gitea platforms directly from your project directory.

Instructions

Comprehensive issue management tool for Git repositories. Supports create, list, get, update, close, comment, and search operations for issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe issue operation to perform
assigneesNoIssue assignees (usernames)
bodyNoIssue body/description
comment_bodyNoComment body (required for comment action)
directionNoSort direction (for list action, default: desc)
issue_numberNoIssue number (required for get/update/close/comment actions)
labelsNoIssue labels
milestoneNoMilestone number
ownerNoRepository owner (auto-detected if not provided)
projectPathYesAbsolute path to the project directory
providerYesProvider for issue operations (required)
queryNoSearch query (required for search action)
repoNoRepository name (auto-detected if not provided)
search_orderNoOrder for search results (default: desc)
search_sortNoSort for search results (default: created)
sinceNoOnly issues updated after this date (ISO 8601 format, for list action)
sortNoSort criteria (for list action, default: created)
stateNoIssue state (for update action)
state_filterNoFilter issues by state (for list action, default: open)
titleNoIssue title (required for create, optional for update)

Implementation Reference

  • Main handler function that executes git-issues operations: validates parameters, determines if remote/local, and delegates to provider handler.
    async execute(params: GitIssuesParams): Promise<ToolResult> {
      const startTime = Date.now();
    
      try {
        // Validate basic parameters
        const validation = ParameterValidator.validateToolParams('git-issues', params);
        if (!validation.isValid) {
          return OperationErrorHandler.createToolError(
            'VALIDATION_ERROR',
            `Parameter validation failed: ${validation.errors.join(', ')}`,
            params.action,
            { validationErrors: validation.errors },
            validation.suggestions
          );
        }
    
        // Validate operation-specific parameters
        const operationValidation = ParameterValidator.validateOperationParams('git-issues', params.action, params);
        if (!operationValidation.isValid) {
          return OperationErrorHandler.createToolError(
            'VALIDATION_ERROR',
            `Operation validation failed: ${operationValidation.errors.join(', ')}`,
            params.action,
            { validationErrors: operationValidation.errors },
            operationValidation.suggestions
          );
        }
    
        // Route to appropriate handler
        const isRemoteOperation = this.isRemoteOperation(params.action);
    
        if (isRemoteOperation) {
          return await this.executeRemoteOperation(params, startTime);
        } else {
          return await this.executeLocalOperation(params, startTime);
        }
    
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        return OperationErrorHandler.createToolError(
          'EXECUTION_ERROR',
          `Failed to execute ${params.action}: ${errorMessage}`,
          params.action,
          { error: errorMessage },
          ['Check the error details and try again']
        );
      }
    }
  • Static method providing the complete tool schema (name, description, inputSchema) for MCP tool registration.
    static getToolSchema() {
      return {
        name: 'git-issues',
        description: 'Comprehensive issue management tool for Git repositories. Supports create, list, get, update, close, comment, and search operations for issues. In universal mode (GIT_MCP_MODE=universal), automatically executes on both GitHub and Gitea providers.',
        inputSchema: {
          type: 'object',
          properties: {
            action: {
              type: 'string',
              enum: ['create', 'list', 'get', 'update', 'close', 'comment', 'search'],
              description: 'The issue operation to perform'
            },
            projectPath: {
              type: 'string',
              description: 'Absolute path to the project directory'
            },
            provider: {
              type: 'string',
              enum: ['github', 'gitea', 'both'],
              description: 'Provider for issue operations (required)'
            },
            repo: {
              type: 'string',
              description: 'Repository name (auto-detected if not provided)'
            },
            issue_number: {
              type: 'number',
              description: 'Issue number (required for get/update/close/comment actions)'
            },
            title: {
              type: 'string',
              description: 'Issue title (required for create, optional for update)'
            },
            body: {
              type: 'string',
              description: 'Issue body/description'
            },
            labels: {
              type: 'array',
              items: { type: 'string' },
              description: 'Issue labels'
            },
            assignees: {
              type: 'array',
              items: { type: 'string' },
              description: 'Issue assignees (usernames)'
            },
            milestone: {
              type: 'number',
              description: 'Milestone number'
            },
            state: {
              type: 'string',
              enum: ['open', 'closed'],
              description: 'Issue state (for update action)'
            },
            state_filter: {
              type: 'string',
              enum: ['open', 'closed', 'all'],
              description: 'Filter issues by state (for list action, default: open)'
            },
            sort: {
              type: 'string',
              enum: ['created', 'updated', 'comments'],
              description: 'Sort criteria (for list action, default: created)'
            },
            direction: {
              type: 'string',
              enum: ['asc', 'desc'],
              description: 'Sort direction (for list action, default: desc)'
            },
            since: {
              type: 'string',
              description: 'Only issues updated after this date (ISO 8601 format, for list action)'
            },
            comment_body: {
              type: 'string',
              description: 'Comment body (required for comment action)'
            },
            query: {
              type: 'string',
              description: 'Search query (required for search action)'
            },
            search_sort: {
              type: 'string',
              enum: ['created', 'updated', 'comments'],
              description: 'Sort for search results (default: created)'
            },
            search_order: {
              type: 'string',
              enum: ['asc', 'desc'],
              description: 'Order for search results (default: desc)'
            }
          },
          required: ['action', 'projectPath']
        }
      };
    }
  • src/server.ts:90-90 (registration)
    Instantiation of GitIssuesTool class instance with provider configuration during server initialization.
    this.gitIssuesTool = new GitIssuesTool(providerConfig);
  • src/server.ts:476-477 (registration)
    Dispatch case in executeTool method that routes git-issues calls to the tool's execute method.
    case 'git-issues':
      return await this.gitIssuesTool.execute(args);
  • Helper function providing operation-specific parameter validation for git-issues actions.
    private static validateIssuesParams(action: string, params: ToolParams): ValidationResult {
      const result: ValidationResult = {
        isValid: true,
        errors: [],
        warnings: [],
        suggestions: []
      };
    
      switch (action) {
        case 'create':
          if (!params.title) {
            result.errors.push('title is required for issue creation');
            result.suggestions.push('Provide a descriptive title for the issue');
            result.isValid = false;
          }
          break;
        case 'get':
        case 'update':
        case 'close':
          if (params.issue_number === undefined) {
            result.errors.push('issue_number is required for issue operations');
            result.suggestions.push('Provide the issue number');
            result.isValid = false;
          }
          break;
        case 'comment':
          if (params.issue_number === undefined) {
            result.errors.push('issue_number is required for commenting on issues');
            result.suggestions.push('Provide the issue number');
            result.isValid = false;
          }
          if (!params.comment_body) {
            result.errors.push('comment_body is required for commenting on issues');
            result.suggestions.push('Provide the comment text');
            result.isValid = false;
          }
          break;
        case 'search':
          if (!params.query) {
            result.errors.push('query is required for issue search');
            result.suggestions.push('Provide a search query to find issues');
            result.isValid = false;
          }
          break;
      }
    
      return result;
    }
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. While it lists operations, it doesn't describe what happens during those operations (e.g., whether 'close' is reversible, if 'create' requires specific permissions, rate limits, error handling, or what the tool returns). For a multi-operation tool with 20 parameters, this leaves significant behavioral gaps.

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 and lists all supported operations. There's no wasted text, though it could be slightly more structured (e.g., grouping operations by category).

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?

For a complex tool with 20 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects (permissions, side effects), usage context, or return values. The high parameter count and lack of structured metadata mean the description should do more to guide 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 all 20 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain relationships between parameters like how 'action' determines which other parameters are relevant). Baseline 3 is appropriate when the schema does the heavy lifting.

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 'Comprehensive issue management tool for Git repositories' and lists the specific operations supported (create, list, get, update, close, comment, search). It provides a specific verb+resource combination but doesn't explicitly differentiate from sibling tools like git-pulls or git-workflow, which might also handle repository operations.

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 when to choose git-issues over sibling tools like git-pulls (which might handle pull requests) or other issue-related tools, nor does it specify prerequisites or exclusions for usage.

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/Andre-Buzeli/git-mcp'

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