SCM MCP Tools

Total Tools: 15

Vendor-neutral scm_* tools routed by DEFAULT_SCM (github|gitlab). Additive next to the untouched github_* / gitlab_* tools; absent from dmtools list when the variable is not set.

Quick Reference

# List all scm tools
dmtools list | jq '.tools[] | select(.name | startswith("scm_"))'

Available Tools

Tool NameDescriptionParameters
scm_add_labelsAdd labels to a PR/MR or issue. Labels are plain strings.workspace (string, optional)
repository (string, optional)
pr (string, required)
labels (array, required)
scm_add_pr_commentComment on a pull request / merge request.workspace (string, required)
repository (string, required)
pr (string, required)
text (string, required)
scm_approveApprove a pull request / merge request.workspace (string, required)
repository (string, required)
pr (string, required)
body (string, optional)
scm_close_issueClose an issue (SM close-on-merge finishing move).workspace (string, required)
repository (string, required)
issue (string, required)
scm_create_commentComment on an issue (the SM issue-carrier channel). GitLab: rides the MR-note shape — issue is the MR iid, not a GitLab issue number.workspace (string, optional)
repository (string, optional)
issue (string, required)
body (string, required)
scm_get_diffRaw unified diff text of a pull request / merge request.workspace (string, required)
repository (string, required)
pr (string, required)
scm_get_issueFetch one issue by number.workspace (string, optional)
repository (string, optional)
issue (string, required)
scm_get_prFetch one pull request / merge request (provider PR payload).workspace (string, required)
repository (string, required)
pr (string, required)
scm_get_pr_commentsList comments of a pull request / merge request.workspace (string, required)
repository (string, required)
pr (string, required)
scm_get_reviewsList reviews / approvals of a pull request / merge request.workspace (string, required)
repository (string, required)
pr (string, required)
scm_list_branchesList repository branches (name + head sha).workspace (string, required)
repository (string, required)
scm_list_prsList pull requests / merge requests. State filter is the normalized enum: open (default), closed, merged, all.workspace (string, required)
repository (string, required)
state (string, optional)
scm_merge_prMerge a pull request / merge request. Merge method per provider config (GitHub: mergeMethod merge|squash|rebase).workspace (string, required)
repository (string, required)
pr (string, required)
mergeMethod (string, optional)
commitTitle (string, optional)
commitMessage (string, optional)
scm_remove_labelRemove one label from a PR/MR or issue (an absent label is a no-op on GitLab-shaped providers).workspace (string, optional)
repository (string, optional)
pr (string, required)
label (string, required)
scm_search_issuesSearch issues (GitHub search syntax; scoped to the configured repository when the query has no repo: qualifier).workspace (string, optional)
repository (string, optional)
query (string, required)

Detailed Parameter Information

scm_add_labels

Add labels to a PR/MR or issue. Labels are plain strings.

Parameters:

  • workspace (string) Optional

    • Repository owner / namespace
  • repository (string) Optional

    • Repository name
  • pr (string) Required

    • PR / MR number
  • labels (array) Required

    • Labels to add

Example:

// In JavaScript agent
const result = scm_add_labels("workspace", "repository", "pr", "labels");

scm_add_pr_comment

Comment on a pull request / merge request.

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number
  • text (string) Required

    • Comment text

Example:

// In JavaScript agent
const result = scm_add_pr_comment("workspace", "repository", "pr", "text");

scm_approve

Approve a pull request / merge request.

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number
  • body (string) Optional

    • Optional approval summary text

Example:

// In JavaScript agent
const result = scm_approve("workspace", "repository", "pr", "body");

scm_close_issue

Close an issue (SM close-on-merge finishing move).

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • issue (string) Required

    • Issue number

Example:

// In JavaScript agent
const result = scm_close_issue("workspace", "repository", "issue");

scm_create_comment

Comment on an issue (the SM issue-carrier channel). GitLab: rides the MR-note shape — issue is the MR iid, not a GitLab issue number.

Parameters:

  • workspace (string) Optional

    • Repository owner / namespace
  • repository (string) Optional

    • Repository name
  • issue (string) Required

    • Issue number (GitLab: MR iid)
  • body (string) Required

    • Comment body

Example:

// In JavaScript agent
const result = scm_create_comment("workspace", "repository", "issue", "body");

scm_get_diff

Raw unified diff text of a pull request / merge request.

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number

Example:

// In JavaScript agent
const result = scm_get_diff("workspace", "repository", "pr");

scm_get_issue

Fetch one issue by number.

Parameters:

  • workspace (string) Optional

    • Repository owner / namespace
  • repository (string) Optional

    • Repository name
  • issue (string) Required

    • Issue number

Example:

// In JavaScript agent
const result = scm_get_issue("workspace", "repository", "issue");

scm_get_pr

Fetch one pull request / merge request (provider PR payload).

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number

Example:

// In JavaScript agent
const result = scm_get_pr("workspace", "repository", "pr");

scm_get_pr_comments

List comments of a pull request / merge request.

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number

Example:

// In JavaScript agent
const result = scm_get_pr_comments("workspace", "repository", "pr");

scm_get_reviews

List reviews / approvals of a pull request / merge request.

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number

Example:

// In JavaScript agent
const result = scm_get_reviews("workspace", "repository", "pr");

scm_list_branches

List repository branches (name + head sha).

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name

Example:

// In JavaScript agent
const result = scm_list_branches("workspace", "repository");

scm_list_prs

List pull requests / merge requests. State filter is the normalized enum: open (default), closed, merged, all.

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • state (string) Optional

    • Normalized state filter: open, closed, merged, all

Example:

// In JavaScript agent
const result = scm_list_prs("workspace", "repository", "state");

scm_merge_pr

Merge a pull request / merge request. Merge method per provider config (GitHub: mergeMethod merge|squash|rebase).

Parameters:

  • workspace (string) Required

    • Repository owner / namespace
  • repository (string) Required

    • Repository name
  • pr (string) Required

    • PR / MR number
  • mergeMethod (string) Optional

    • merge | squash | rebase (GitHub)
  • commitTitle (string) Optional

    • Override the merge commit title (GitHub)
  • commitMessage (string) Optional

    • Override the merge commit message (GitHub)

Example:

// In JavaScript agent
const result = scm_merge_pr("workspace", "repository", "pr", "mergeMethod", "commitTitle", "commitMessage");

scm_remove_label

Remove one label from a PR/MR or issue (an absent label is a no-op on GitLab-shaped providers).

Parameters:

  • workspace (string) Optional

    • Repository owner / namespace
  • repository (string) Optional

    • Repository name
  • pr (string) Required

    • PR / MR number
  • label (string) Required

    • The label to remove

Example:

// In JavaScript agent
const result = scm_remove_label("workspace", "repository", "pr", "label");

scm_search_issues

Search issues (GitHub search syntax; scoped to the configured repository when the query has no repo: qualifier).

Parameters:

  • workspace (string) Optional

    • Repository owner / namespace
  • repository (string) Optional

    • Repository name
  • query (string) Required

    • Search query

Example:

// In JavaScript agent
const result = scm_search_issues("workspace", "repository", "query");

Edit this page on GitHub →

Rendered from dmtools-ai-docs/references/mcp-tools/scm-tools.md, the same Markdown the DMTools agent skill reads. Last updated .