Skip to main content
Glama

tag_list

List all tags in a Git repository by providing its absolute path. Enables efficient tag management via the Git MCP Server for streamlined version control workflows.

Instructions

List tags

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to repository. MUST be an absolute path (e.g., /Users/username/projects/my-repo)

Implementation Reference

  • The handler function `GitOperations.tagList` that validates the repository path, executes `git tag -l` command with caching, and returns the list of tags as text content.
    static async tagList(options: BasePathOptions, context: GitToolContext): Promise<GitToolResult> { const path = this.getPath(options); return await this.executeOperation( context.operation, path, async () => { const { path: repoPath } = PathValidator.validateGitRepo(path); const result = await CommandExecutor.executeGitCommand( 'tag -l', context.operation, repoPath ); const output = result.stdout.trim(); return { content: [{ type: 'text', text: output || 'No tags found' }] }; }, { useCache: true, stateType: RepoStateType.TAG, command: 'tag -l' } ); }
  • The switch case in the tool executor that handles the 'tag_list' tool call by validating arguments and delegating to `GitOperations.tagList`.
    case 'tag_list': { const validArgs = this.validateArguments(operation, args, isPathOnly); return await GitOperations.tagList(validArgs, context); }
  • The tool registration definition including the name 'tag_list', description, and input schema specifying an optional repository path.
    name: 'tag_list', description: 'List tags', inputSchema: { type: 'object', properties: { path: { type: 'string', description: `Path to repository. ${PATH_DESCRIPTION}`, }, }, required: [], }, },

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/Sheshiyer/git-mcp-v2'

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