Default Integration Aliases for MCP Tools

DMtools supports cross-integration aliases — universal tool names that map to platform-specific implementations. Instead of calling github_list_prs or gitlab_list_mrs directly, you can call source_code_list_prs and DMtools routes the call to the correct integration based on environment variables.


How It Works

  1. You call a generic alias, e.g. source_code_list_prs.
  2. DMtools looks up all implementations registered for that alias.
  3. If only one implementation exists, it is used automatically.
  4. If multiple implementations exist (e.g., GitHub and GitLab), the routing env var is consulted:
    • DEFAULT_SOURCE_CODEgithub or gitlab
    • DEFAULT_TRACKERjira or ado
  5. If no env var is set, the first registered implementation is used (with a warning).

Configuration

# Use GitHub for all source_code_* calls
DEFAULT_SOURCE_CODE=github

# Use GitLab for all source_code_* calls
DEFAULT_SOURCE_CODE=gitlab

# Use Jira for all tracker_* calls
DEFAULT_TRACKER=jira

# Use Azure DevOps for all tracker_* calls
DEFAULT_TRACKER=ado

Add these to your dmtools.env file or export them as shell environment variables.


Source Code Aliases (source_code_*)

These aliases abstract over GitHub and GitLab PR/MR operations.

AliasGitHub ImplementationGitLab Implementation
source_code_list_prsgithub_list_prsgitlab_list_mrs
source_code_get_prgithub_get_prgitlab_get_mr
source_code_get_pr_commentsgithub_get_pr_commentsgitlab_get_mr_comments
source_code_add_pr_commentgithub_add_pr_commentgitlab_add_mr_comment
source_code_get_pr_activitiesgithub_get_pr_activitiesgitlab_get_mr_activities
source_code_get_pr_discussionsgithub_get_pr_conversationsgitlab_get_mr_discussions
source_code_reply_to_pr_threadgithub_reply_to_pr_threadgitlab_reply_to_mr_thread
source_code_add_inline_commentgithub_add_inline_commentgitlab_add_inline_comment
source_code_resolve_pr_threadgithub_resolve_pr_threadgitlab_resolve_mr_thread
source_code_merge_prgithub_merge_prgitlab_merge_mr
source_code_get_pr_diffgithub_get_pr_diffgitlab_get_mr_diff

Aligned Parameter Names (source_code_*)

Alias ParameterGitHub ParameterGitLab Parameter
workspaceworkspaceworkspace
repositoryrepositoryrepository
pullRequestIdpullRequestIdpullRequestId
texttexttext
filePathpath (alias: filePath)filePath
threadIdinReplyToId (alias: threadId)discussionId (alias: threadId)

Tracker Aliases (tracker_*)

These aliases abstract over Jira and Azure DevOps (ADO) issue-tracking operations.

AliasJira ImplementationADO Implementation
tracker_searchjira_search_by_jqlado_search_by_wiql
tracker_get_ticketjira_get_ticketado_get_work_item
tracker_get_commentsjira_get_commentsado_get_comments
tracker_post_commentjira_post_commentado_post_comment
tracker_assign_ticketjira_assign_ticket_toado_assign_work_item
tracker_move_to_statusjira_move_to_statusado_move_to_state
tracker_get_my_profilejira_get_my_profileado_get_my_profile
tracker_get_user_by_emailjira_get_account_by_emailado_get_account_by_email
tracker_link_ticketsjira_link_issuesado_link_work_items
tracker_create_ticketjira_create_ticket_basicado_create_work_item
tracker_download_attachmentjira_download_attachmentado_download_attachment

Aligned Parameter Names (tracker_*)

Alias ParameterJira ParameterADO Parameter
keykeyid (alias: key)
queryjql (alias: query)wiql (aliases: jql, query)
statusNamestatusNamestate (alias: statusName)
accountIdaccountIduserEmail (alias: accountId)
issueTypeissueTypeworkItemType (alias: issueType)
summarysummarytitle (alias: summary)
sourceKeysourceKeysourceId (alias: sourceKey)
anotherKeyanotherKeytargetId (alias: anotherKey)

Usage Examples

CLI

# List PRs/MRs using the generic alias (routes via DEFAULT_SOURCE_CODE)
./dmtools.sh source_code_list_prs workspace=myorg repository=myrepo

# Search issues (routes via DEFAULT_TRACKER)
./dmtools.sh tracker_search query="status = In Progress"

# Get a ticket by key
./dmtools.sh tracker_get_ticket key=PROJ-123

JavaScript Agents

// Works for both GitHub and GitLab depending on DEFAULT_SOURCE_CODE
const prs = source_code_list_prs("myorg", "myrepo", "open");

// Works for both Jira and ADO depending on DEFAULT_TRACKER
const issues = tracker_search("status = In Progress AND assignee = currentUser()");
const ticket = tracker_get_ticket("PROJ-123");

// Post a comment using the alias
tracker_post_comment("PROJ-123", "This has been reviewed.");

Adding New Aliases

To add a new alias to any @MCPTool-annotated method:

@MCPTool(
    name = "github_list_prs",
    description = "List pull requests in a repository",
    integration = "github",
    category = "pull_requests",
    aliases = {"source_code_list_prs"}   // ← add aliases here
)
public List<PullRequest> listPullRequests(
        @MCPParam(name = "workspace", ...) String workspace,
        @MCPParam(name = "repository", ...) String repository) { ... }

After adding aliases, rebuild: ./gradlew :dmtools-core:compileJava. The annotation processor will update MCPToolRegistry.ALIAS_TO_TOOL_NAMES automatically.

Edit this page on GitHub →

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