@remogram/mcp 0.1.0-beta.3 → 0.1.0-beta.4

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/register-tools.mjs +35 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remogram/mcp",
3
- "version": "0.1.0-beta.3",
3
+ "version": "0.1.0-beta.4",
4
4
  "description": "Remogram MCP server delegating to CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@modelcontextprotocol/sdk": "^1.17.0",
33
- "@remogram/cli": "0.1.0-beta.3",
33
+ "@remogram/cli": "0.1.0-beta.4",
34
34
  "zod": "^3.25.76"
35
35
  }
36
36
  }
@@ -41,15 +41,37 @@ export function registerTools(server) {
41
41
  description: 'Aggregate open change requests with checks and merge-plan facts into a semantic-diff slice.',
42
42
  inputSchema: z.object({
43
43
  slice_ref: z.string().optional().describe('Optional slice ref label for consumers'),
44
- limit: z.number().int().positive().optional().describe('Max open CR entries (default 50)'),
44
+ limit: z.number().int().positive().optional().describe('Max open CR entries (default 3)'),
45
+ sort: z
46
+ .enum(['number_asc', 'number_desc', 'recent_update', 'recent_created'])
47
+ .optional()
48
+ .describe('Open-list slice sort preset (default number_asc)'),
45
49
  }),
46
50
  args: (input) => {
47
51
  const a = ['cr', 'inventory'];
48
52
  if (input.slice_ref) a.push('--slice-ref', input.slice_ref);
49
53
  if (input.limit != null) a.push('--limit', String(input.limit));
54
+ if (input.sort) a.push('--sort', input.sort);
50
55
  return a;
51
56
  },
52
57
  },
58
+ {
59
+ name: 'cr_open',
60
+ description: 'Open a change request (pull request) on the configured forge.',
61
+ inputSchema: z.object({
62
+ head: z.string().describe('Head branch ref'),
63
+ base: z.string().describe('Base branch ref'),
64
+ title: z.string().describe('Change request title'),
65
+ body: z.string().optional().describe('Optional change request body'),
66
+ }),
67
+ args: (input) => {
68
+ const a = ['cr', 'open', '--head', input.head, '--base', input.base, '--title', input.title];
69
+ if (input.body) a.push('--body', input.body);
70
+ return a;
71
+ },
72
+ readOnlyHint: false,
73
+ destructiveHint: true,
74
+ },
53
75
  {
54
76
  name: 'pr_status',
55
77
  description: 'PR metadata and mergeability facts.',
@@ -82,8 +104,15 @@ export function registerTools(server) {
82
104
  description: 'Merge readiness facts: mergeability, checks, blockers.',
83
105
  inputSchema: z.object({
84
106
  number: z.number().int().positive(),
107
+ allowed_paths: z.array(z.string()).optional(),
85
108
  }),
86
- args: (input) => ['merge', 'plan', '--number', String(input.number)],
109
+ args: (input) => {
110
+ const a = ['merge', 'plan', '--number', String(input.number)];
111
+ for (const glob of input.allowed_paths ?? []) {
112
+ a.push('--allowed-path', glob);
113
+ }
114
+ return a;
115
+ },
87
116
  },
88
117
  {
89
118
  name: 'sync_plan',
@@ -105,7 +134,10 @@ export function registerTools(server) {
105
134
  {
106
135
  description: tool.description,
107
136
  inputSchema: tool.inputSchema,
108
- annotations: { readOnlyHint: true, destructiveHint: false },
137
+ annotations: {
138
+ readOnlyHint: tool.readOnlyHint !== false,
139
+ destructiveHint: tool.destructiveHint === true,
140
+ },
109
141
  },
110
142
  async (input) => {
111
143
  const args = typeof tool.args === 'function' ? tool.args(input) : tool.args;