yontrack-mcp 1.12.4 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,20 @@ const SEARCH = `
13
13
  }
14
14
  }
15
15
  `;
16
+ const SEARCH_TYPED = `
17
+ query SearchTyped($token: String!, $type: String!, $size: Int) {
18
+ search(token: $token, type: $type, size: $size) {
19
+ pageItems {
20
+ type { id name description }
21
+ title
22
+ description
23
+ accuracy
24
+ data
25
+ }
26
+ pageInfo { totalSize }
27
+ }
28
+ }
29
+ `;
16
30
  export function registerSearchTools(server) {
17
31
  server.tool("search", "Full-text search across all Yontrack entities (projects, branches, builds, etc.)", {
18
32
  token: z.string().describe("Search query"),
@@ -24,4 +38,30 @@ export function registerSearchTools(server) {
24
38
  content: [{ type: "text", text: JSON.stringify(data.search, null, 2) }],
25
39
  };
26
40
  });
41
+ server.tool("search_commits", "Search for SCM commits by keyword or commit message", {
42
+ token: z.string().describe("Search query (keyword or commit message fragment)"),
43
+ size: z.number().int().optional().default(10).describe("Max number of results"),
44
+ }, async ({ token, size }) => {
45
+ const data = await gqlClient.request(SEARCH_TYPED, {
46
+ token,
47
+ type: "scm-commit",
48
+ size,
49
+ });
50
+ return {
51
+ content: [{ type: "text", text: JSON.stringify(data.search, null, 2) }],
52
+ };
53
+ });
54
+ server.tool("search_issues", "Search for SCM issues by keyword or issue key", {
55
+ token: z.string().describe("Search query (keyword or issue key)"),
56
+ size: z.number().int().optional().default(10).describe("Max number of results"),
57
+ }, async ({ token, size }) => {
58
+ const data = await gqlClient.request(SEARCH_TYPED, {
59
+ token,
60
+ type: "scm-issue",
61
+ size,
62
+ });
63
+ return {
64
+ content: [{ type: "text", text: JSON.stringify(data.search, null, 2) }],
65
+ };
66
+ });
27
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yontrack-mcp",
3
- "version": "1.12.4",
3
+ "version": "1.13.0",
4
4
  "description": "MCP server for Yontrack (Ontrack CI/CD monitoring platform)",
5
5
  "type": "module",
6
6
  "bin": {