Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEANTIME_API_KEYNoYour Leantime API key. Required for ticket tools.
LEANTIME_USER_IDNoYour Leantime user ID (numeric). Recommended.
LEANTIME_BASE_URLNoYour Leantime base URL, e.g. https://leantime.example.com. Required for ticket tools.
LEANTIME_PICK_LIMITNoMax tickets listed (default 30). Optional.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
leantime_list_my_ticketsA

List Leantime tickets assigned to the configured user (LEANTIME_USER_ID), newest first.

Use this to let the user pick a ticket before creating a branch (the aibranch workflow). Read-only.

Args:

  • limit (number, optional): max tickets to return (1-100, default from LEANTIME_PICK_LIMIT or 30)

Returns JSON: { count, tickets: [{ id, headline, statusLabel, projectName, dueDate, url }] }

leantime_get_ticketA

Fetch one Leantime ticket's full detail, including an HTML-stripped description and a PR-ready markdown block.

Use this for context when writing a commit/PR, or to preview the markdown that gets embedded in a PR body. Read-only.

Args:

  • id (string|number): the ticket id

Returns JSON: { id, headline, description, statusLabel, dueDate, url, markdown } or { found: false }

git_statusA

Report the current branch, upstream ahead/behind counts, and staged/unstaged/untracked files.

Use to orient before committing or opening a PR, and to parse a ticket id from a branch named type/<id>-<slug>. Read-only.

Args:

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { branch, ahead, behind, staged[], unstaged[], untracked[] }

git_staged_diffA

Return the staged diff (git diff --cached) plus a per-file status list, for writing a commit message.

This is the first step of the aicommit workflow: read the diff, write a Conventional Commit message, then call git_commit. Read-only.

Args:

  • repo_path (string, optional): repository path (default: server cwd)

  • max_bytes (number, optional): truncate the diff above this size (default 100000)

Returns JSON: { diff, files: [{ path, status }], isEmpty, truncated }

git_log_for_prA

List commits on the current branch since the base branch, for writing a PR title/body (the aipr workflow).

If base is omitted, it is auto-detected (origin/HEAD, else main/master). Read-only.

Args:

  • base (string, optional): base branch/ref to compare against

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { base, count, commits: [{ sha, subject, body }] }

git_commitA

Commit the currently staged changes with the given message (the agent-authored Conventional Commit).

Fails with an actionable message if nothing is staged.

Args:

  • message (string): the full commit message (subject + optional body)

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { sha, shortStat }

git_create_branchA

Create (or switch to) a branch named type/<ticket_id>-<slug> (the aibranch workflow).

If slug is omitted, the ticket headline is fetched from Leantime and slugified (Vietnamese diacritics handled).

Args:

  • ticket_id (string|number): Leantime ticket id

  • type (string, optional): branch type prefix (default "feat")

  • slug (string, optional): explicit slug; auto-derived from the ticket headline if omitted

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { branch, created }

git_create_or_update_prA

Push the current branch and create or update its GitHub PR (the aipr workflow). Requires gh authenticated.

The agent supplies title and body. If ticket_id is given, the Leantime ticket markdown block is appended to the body. Detects an existing PR for the branch and edits it, otherwise creates a new one.

Args:

  • title (string): PR title

  • body (string): PR body (markdown)

  • ticket_id (string|number, optional): Leantime ticket to embed

  • base (string, optional): base branch for a new PR

  • draft (boolean, optional): open as draft (new PRs only)

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { url, number, action: "created" | "updated" }

git_undo_last_commitA

Soft-reset the last commit (git reset --soft HEAD~1): removes the commit but keeps all its changes staged. Safe — no work is lost.

Args:

  • repo_path (string, optional): repository path (default: server cwd)

Returns JSON: { undoneSha, message }

Prompts

Interactive templates invoked by user choice

NameDescription
aicommitRead the staged diff, write a Conventional Commit message, and commit.
aibranchPick a Leantime ticket and create a branch type/<id>-<slug>.
aiprPush the branch and open/update a GitHub PR with an AI-written title and body.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/BenBen2109/ai-git-mcp'

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