Skip to main content
Glama
Sunwood-ai-labs

aira-mcp-server

get_status

Retrieve Git repository status information using the specified absolute path to analyze changes and prepare for commit message generation.

Instructions

Gitのステータス情報を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesGitリポジトリの絶対パス

Implementation Reference

  • Exports createGetStatusHandler function that returns the ToolHandler for 'get_status'. Includes name, description, inputSchema, and the async handler logic: validates 'path' arg, calls gitService.getStatus(path), returns JSON-formatted status as text content.
    export function createGetStatusHandler(gitService: GitService): ToolHandler {
      return {
        name: "get_status",
        description: "Gitのステータス情報を取得します",
        inputSchema: {
          type: "object",
          properties: {
            path: {
              type: "string",
              description: "Gitリポジトリの絶対パス"
            }
          },
          required: ["path"]
        },
        handler: async (args) => {
          try {
            if (!args || typeof args !== 'object' || !('path' in args) || typeof args.path !== 'string') {
              throw new McpError(
                ErrorCode.InvalidParams,
                "path parameter is required and must be a string"
              );
            }
    
            const status = await gitService.getStatus(args.path);
            return {
              content: [{
                type: "text",
                text: JSON.stringify(status, null, 2)
              }]
            };
          } catch (error) {
            throw new McpError(
              ErrorCode.InternalError,
              `Failed to get git status: ${error}`
            );
          }
        }
      };
    }
  • Input schema definition for the get_status tool: object with properties {path: string (required)}.
    inputSchema: {
      type: "object",
      properties: {
        path: {
          type: "string",
          description: "Gitリポジトリの絶対パス"
        }
      },
      required: ["path"]
    },
  • Registers the get_status ToolHandler in the ToolHandlers class's internal Map during constructor initialization.
    this.handlers = new Map([
      ['get_status', createGetStatusHandler(gitService)],
      ['create_commit', createCreateCommitHandler(gitService)]
    ]);
  • GitService.getStatus(path) method, which delegates to statusManager.getStatus(path). Called by the tool handler.
    async getStatus(path?: string) {
      return this.statusManager.getStatus(path);
    }
  • src/index.ts:46-47 (registration)
    Dispatches 'get_status' tool calls to toolHandlers.handleGetStatus in the main server request handler.
    case "get_status":
      response = await toolHandlers.handleGetStatus(request.params.arguments);

Tool Definition Quality

Score is being calculated. Check back soon.

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

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