Skip to main content
Glama
bsreeram08

Git Repo Browser MCP

git_create_tag

Create annotated or lightweight tags in Git repositories to mark specific commits for versioning, releases, or reference points.

Instructions

Create a tag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_pathYesThe path to the local Git repository
tag_nameYesName of the tag
messageNoTag message (for annotated tags)
annotatedNoWhether to create an annotated tag

Implementation Reference

  • The core implementation of the git_create_tag tool handler. It uses simpleGit to create either a lightweight or annotated tag in the specified repository, returning success/error JSON responses.
    export async function handleGitCreateTag({
      repo_path,
      tag_name,
      message = "",
      annotated = true,
    }) {
      try {
        const git = simpleGit(repo_path);
    
        if (annotated) {
          await git.addAnnotatedTag(tag_name, message);
        } else {
          await git.addTag(tag_name);
        }
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  success: true,
                  message: `Created ${
                    annotated ? "annotated " : ""
                  }tag: ${tag_name}`,
                  tag: tag_name,
                },
                null,
                2
              ),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                { error: `Failed to create tag: ${error.message}` },
                null,
                2
              ),
            },
          ],
          isError: true,
        };
      }
    }
  • Defines the input schema, description, and parameters for the git_create_tag tool in the MCP tools list.
    {
      name: "git_create_tag",
      description: "Create a tag.",
      inputSchema: {
        type: "object",
        properties: {
          repo_path: {
            type: "string",
            description: "The path to the local Git repository",
          },
          tag_name: {
            type: "string",
            description: "Name of the tag",
          },
          message: {
            type: "string",
            description: "Tag message (for annotated tags)",
            default: "",
          },
          annotated: {
            type: "boolean",
            description: "Whether to create an annotated tag",
            default: true,
          },
        },
        required: ["repo_path", "tag_name"],
      },
    },
  • src/server.js:915-915 (registration)
    Registers the 'git_create_tag' tool name to its handler function in the server's handlersMap for request dispatching.
    git_create_tag: handleGitCreateTag,
  • Imports the handleGitCreateTag function from its implementation file.
    import { handleGitCreateTag } from "./tag-operations.js";
  • Re-exports the handleGitCreateTag function for use in server.js.
    handleGitCreateTag,
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. 'Create a tag' implies a write operation but doesn't disclose behavioral traits like whether it requires Git authentication, if it's destructive to existing tags, rate limits, or what happens on success/failure. It lacks essential context for safe use.

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?

Extremely concise with 'Create a tag.'—just three words. It's front-loaded but under-specified, not wasting words. However, it could benefit from slightly more detail without losing efficiency.

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 (Git operation with 4 params, no annotations, no output schema), the description is incomplete. It doesn't cover return values, error cases, or behavioral nuances. For a mutation tool with no structured support, it should provide more context to be adequate.

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 fully documents parameters (repo_path, tag_name, message, annotated). The description adds no meaning beyond the schema, not explaining parameter interactions (e.g., message usage with annotated). Baseline 3 is appropriate as schema does the heavy lifting.

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 'Create a tag' states the basic action but is vague about what kind of tag (Git tag) and lacks specificity. It doesn't distinguish from siblings like git_commit or git_branch_diff, though it's somewhat clear from the name. It's not tautological but remains minimal.

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?

No guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., being in a Git repo), compare to siblings like git_commit for marking points, or specify use cases (e.g., for releases). The description alone offers no usage context.

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/bsreeram08/git-commands-mcp'

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