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 or tracker_get_ticket.
  2. DMtools looks up all implementations registered for that alias.
  3. Explicit key formats win first (only for tracker_* calls carrying an issue key): gh-123 or owner/repo#123 always route to GitHub — they are not valid keys anywhere else.
  4. If only one implementation exists, it is used automatically.
  5. If multiple implementations exist (e.g., GitHub and GitLab), the routing property is consulted from the config chain (config.properties → dmtools.env → environment variables):
    • DEFAULT_SOURCE_CODE → github or gitlab
    • DEFAULT_TRACKER → jira, ado, or github
  6. If no routing property is set, key-format detection applies to tracker_* calls: PROJ-123 → Jira, bare integer (12345) → ADO.
  7. Otherwise the first registered implementation is used (with a warning).

Alias resolution works the same in every entry point: the CLI (dmtools tracker_get_ticket ...) and JavaScript agents (GraalJS), where tracker_* functions are exposed as first-class globals alongside the canonical vendor tools.


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

# Use GitHub Issues for all tracker_* calls
DEFAULT_TRACKER=github

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, Azure DevOps (ADO) work items, and GitHub Issues.

AliasJira ImplementationADO ImplementationGitHub Implementation
tracker_searchjira_search_by_jqlado_search_by_wiqlgithub_search_issues
tracker_get_ticketjira_get_ticketado_get_work_itemgithub_get_issue
tracker_get_commentsjira_get_commentsado_get_work_item_commentsgithub_get_pr_comments
tracker_post_commentjira_post_commentado_add_work_item_commentgithub_create_comment
tracker_add_labeljira_add_labelado_add_work_item_labelgithub_add_labels
tracker_remove_labeljira_remove_labelado_remove_work_item_labelgithub_remove_label
tracker_assign_ticketjira_assign_ticket_toado_assign_work_itemgithub_assign_issue
tracker_assignjira_assign_ticket_toado_assign_work_itemgithub_assign_issue
tracker_move_to_statusjira_move_to_statusado_move_to_stategithub_move_issue_to_status
tracker_get_my_profilejira_get_my_profileado_get_my_profilegithub_test
tracker_get_user_by_emailjira_get_account_by_emailado_get_user_by_email—
tracker_link_ticketsjira_link_issuesado_link_work_items—
tracker_create_ticketjira_create_ticket_basicado_create_work_itemgithub_create_issue
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 Jira, ADO, or GitHub Issues depending on DEFAULT_TRACKER
const issues = tracker_search("status = In Progress AND assignee = currentUser()");
const ticket = tracker_get_ticket("PROJ-123");

// Key-format routing: gh-N always lands on GitHub Issues, even when the
// deployment default tracker is Jira or ADO
const ghIssue = tracker_get_ticket("gh-42");        // → github_get_issue
const ghIssue2 = tracker_get_ticket("owner/repo#42"); // → github_get_issue

// 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 .