pulsemcp-cms-admin-mcp-server 0.7.4 → 0.9.1

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.
package/README.md CHANGED
@@ -94,7 +94,7 @@ This server is built and tested on macOS with Claude Desktop. It should work wit
94
94
  | `cleanup_good_jobs` | good_jobs | write | Clean up old background jobs by status and age. |
95
95
  | `run_exam_for_mirror` | proctor | write | Run proctor exams against unofficial mirrors via Fly Machines. Returns truncated summary with `result_id`. |
96
96
  | `get_exam_result` | proctor | read | Retrieve full untruncated exam results by `result_id`, with optional section/mirror filtering. |
97
- | `save_results_for_mirror` | proctor | write | Save proctor exam results. Accepts `result_id` or explicit results array. |
97
+ | `save_results_for_mirror` | proctor | write | Save proctor exam results via `result_id` from `run_exam_for_mirror`. |
98
98
 
99
99
  # Tool Groups
100
100
 
@@ -218,7 +218,7 @@ TOOL_GROUPS=newsletter,server_directory_readonly
218
218
  - Enable or disable specific tool groups by setting `TOOL_GROUPS` environment variable
219
219
  - Use `_readonly` suffixes to restrict groups to read-only operations (e.g., `server_directory_readonly`)
220
220
  - Use the `remote` array parameter in `save_mcp_implementation` to configure remote endpoints for MCP servers (transport, host_platform, authentication_method, etc.)
221
- - Use the `canonical` array parameter in `save_mcp_implementation` to set canonical URLs with scope (domain, subdomain, subfolder, or url)
221
+ - Use the `canonical` array parameter in `save_mcp_implementation` to set canonical URLs with scope (domain, subdomain, or url)
222
222
  - Remote endpoints allow specifying how MCP servers can be accessed (direct URL, setup URL, authentication method, cost, etc.)
223
223
  - When updating existing remotes, include the remote `id` (number from `get_draft_mcp_implementations`) in the remote object
224
224
  - Use `list_mcp_servers` to browse MCP servers with filtering by status (draft/live/archived) and classification (official/community)
@@ -0,0 +1,68 @@
1
+ export async function getProctorRuns(apiKey, baseUrl, params) {
2
+ const url = new URL('/api/proctor_runs', baseUrl);
3
+ if (params?.q) {
4
+ url.searchParams.append('q', params.q);
5
+ }
6
+ if (params?.recommended) {
7
+ url.searchParams.append('recommended', '1');
8
+ }
9
+ if (params?.tenant_ids) {
10
+ url.searchParams.append('tenant_ids', params.tenant_ids);
11
+ }
12
+ if (params?.sort) {
13
+ url.searchParams.append('sort', params.sort);
14
+ }
15
+ if (params?.direction) {
16
+ url.searchParams.append('direction', params.direction);
17
+ }
18
+ if (params?.limit) {
19
+ url.searchParams.append('limit', params.limit.toString());
20
+ }
21
+ if (params?.offset !== undefined && params.offset > 0) {
22
+ url.searchParams.append('offset', params.offset.toString());
23
+ }
24
+ const response = await fetch(url.toString(), {
25
+ method: 'GET',
26
+ headers: {
27
+ 'X-API-Key': apiKey,
28
+ Accept: 'application/json',
29
+ },
30
+ });
31
+ if (!response.ok) {
32
+ if (response.status === 401) {
33
+ throw new Error('Invalid API key');
34
+ }
35
+ if (response.status === 403) {
36
+ throw new Error('User lacks admin privileges');
37
+ }
38
+ throw new Error(`Failed to fetch proctor runs: ${response.status} ${response.statusText}`);
39
+ }
40
+ const data = (await response.json());
41
+ return {
42
+ runs: data.data.map((run) => ({
43
+ id: run.id,
44
+ slug: run.slug,
45
+ name: run.name,
46
+ recommended: run.recommended,
47
+ mirrors_count: run.mirrors_count,
48
+ tenant_count: run.tenant_count,
49
+ latest_version: run.latest_version,
50
+ latest_mirror_id: run.latest_mirror_id,
51
+ latest_mirror_name: run.latest_mirror_name,
52
+ latest_tested: run.latest_tested,
53
+ last_auth_check_days: run.last_auth_check_days,
54
+ last_tools_list_days: run.last_tools_list_days,
55
+ auth_types: run.auth_types,
56
+ num_tools: run.num_tools,
57
+ packages: run.packages,
58
+ remotes: run.remotes,
59
+ })),
60
+ pagination: {
61
+ current_page: data.meta.current_page,
62
+ total_pages: data.meta.total_pages,
63
+ total_count: data.meta.total_count,
64
+ has_next: data.meta.has_next,
65
+ limit: data.meta.limit,
66
+ },
67
+ };
68
+ }
@@ -958,6 +958,12 @@ export function createMockPulseMCPAdminClient(mockData) {
958
958
  errors: [],
959
959
  };
960
960
  },
961
+ async getProctorRuns() {
962
+ return {
963
+ runs: [],
964
+ pagination: { current_page: 1, total_pages: 1, total_count: 0, has_next: false, limit: 30 },
965
+ };
966
+ },
961
967
  // Discovered URL methods
962
968
  async getDiscoveredUrls() {
963
969
  return {
@@ -261,6 +261,10 @@ export class PulseMCPAdminClient {
261
261
  const { saveResultsForMirror } = await import('./pulsemcp-admin-client/lib/save-results-for-mirror.js');
262
262
  return saveResultsForMirror(this.apiKey, this.baseUrl, params);
263
263
  }
264
+ async getProctorRuns(params) {
265
+ const { getProctorRuns } = await import('./pulsemcp-admin-client/lib/get-proctor-runs.js');
266
+ return getProctorRuns(this.apiKey, this.baseUrl, params);
267
+ }
264
268
  // Discovered URL REST API methods
265
269
  async getDiscoveredUrls(params) {
266
270
  const { getDiscoveredUrls } = await import('./pulsemcp-admin-client/lib/get-discovered-urls.js');
@@ -14,7 +14,7 @@ The response includes:
14
14
  - **Basic info**: name, descriptions, status, classification, implementation language
15
15
  - **Provider**: organization/person details
16
16
  - **Source code location**: GitHub repository info with stars and last update
17
- - **Canonical URLs**: authoritative URLs with scope (domain, subdomain, subfolder, url)
17
+ - **Canonical URLs**: authoritative URLs with scope (domain, subdomain, url)
18
18
  - **Remote endpoints**: all deployment endpoints with transport, platform, auth, and cost info
19
19
  - **Tags**: categorization tags
20
20
  - **Download statistics**: npm download estimates
@@ -48,7 +48,7 @@ Example response:
48
48
  "github_stars": 5000
49
49
  },
50
50
  "canonical_urls": [
51
- { "url": "https://github.com/modelcontextprotocol/servers", "scope": "subfolder" }
51
+ { "url": "https://github.com/modelcontextprotocol/servers", "scope": "domain" }
52
52
  ],
53
53
  "remotes": [
54
54
  {
@@ -0,0 +1,171 @@
1
+ import { z } from 'zod';
2
+ const PARAM_DESCRIPTIONS = {
3
+ q: 'Search by server slug, implementation name, or mirror name',
4
+ recommended: 'When true, filter to recommended servers only. When false or omitted, shows all servers',
5
+ tenant_ids: 'Comma-separated tenant IDs to filter by (OR logic)',
6
+ sort: 'Column to sort by: slug, name, mirrors, recommended, tenants, latest_tested, last_auth_check, last_tools_list',
7
+ direction: 'Sort direction: asc or desc. Default: asc',
8
+ limit: 'Results per page, range 1-100. Default: 30',
9
+ offset: 'Pagination offset. Default: 0',
10
+ };
11
+ const ListProctorRunsSchema = z.object({
12
+ q: z.string().optional().describe(PARAM_DESCRIPTIONS.q),
13
+ recommended: z.boolean().optional().describe(PARAM_DESCRIPTIONS.recommended),
14
+ tenant_ids: z.string().optional().describe(PARAM_DESCRIPTIONS.tenant_ids),
15
+ sort: z
16
+ .enum([
17
+ 'slug',
18
+ 'name',
19
+ 'mirrors',
20
+ 'recommended',
21
+ 'tenants',
22
+ 'latest_tested',
23
+ 'last_auth_check',
24
+ 'last_tools_list',
25
+ ])
26
+ .optional()
27
+ .describe(PARAM_DESCRIPTIONS.sort),
28
+ direction: z.enum(['asc', 'desc']).optional().describe(PARAM_DESCRIPTIONS.direction),
29
+ limit: z.number().min(1).max(100).optional().describe(PARAM_DESCRIPTIONS.limit),
30
+ offset: z.number().min(0).optional().describe(PARAM_DESCRIPTIONS.offset),
31
+ });
32
+ export function listProctorRuns(_server, clientFactory) {
33
+ return {
34
+ name: 'list_proctor_runs',
35
+ description: `List proctor run summaries for MCP servers. Shows testing status across all servers including auth-check and tools-list exam results. Useful for identifying untested servers or servers that need re-testing.
36
+
37
+ Default sort order: untested servers first, then stalest auth check, then stalest tools list, then alphabetical by slug.
38
+
39
+ Example response:
40
+ {
41
+ "runs": [
42
+ {
43
+ "id": 123,
44
+ "slug": "some-server",
45
+ "name": "Some Server",
46
+ "recommended": true,
47
+ "mirrors_count": 2,
48
+ "latest_tested": true,
49
+ "last_auth_check_days": 2,
50
+ "last_tools_list_days": 3,
51
+ "auth_types": ["oauth2"],
52
+ "num_tools": 5,
53
+ "packages": ["npm"],
54
+ "remotes": ["streamable-http"]
55
+ }
56
+ ],
57
+ "pagination": { "current_page": 1, "total_pages": 2, "total_count": 45, "has_next": true }
58
+ }
59
+
60
+ Use cases:
61
+ - Find servers that haven't been tested yet (untested appear first by default)
62
+ - Check which servers have stale proctor results
63
+ - Filter to recommended servers to prioritize testing
64
+ - Search for a specific server's testing status`,
65
+ inputSchema: {
66
+ type: 'object',
67
+ properties: {
68
+ q: { type: 'string', description: PARAM_DESCRIPTIONS.q },
69
+ recommended: { type: 'boolean', description: PARAM_DESCRIPTIONS.recommended },
70
+ tenant_ids: { type: 'string', description: PARAM_DESCRIPTIONS.tenant_ids },
71
+ sort: {
72
+ type: 'string',
73
+ enum: [
74
+ 'slug',
75
+ 'name',
76
+ 'mirrors',
77
+ 'recommended',
78
+ 'tenants',
79
+ 'latest_tested',
80
+ 'last_auth_check',
81
+ 'last_tools_list',
82
+ ],
83
+ description: PARAM_DESCRIPTIONS.sort,
84
+ },
85
+ direction: {
86
+ type: 'string',
87
+ enum: ['asc', 'desc'],
88
+ description: PARAM_DESCRIPTIONS.direction,
89
+ },
90
+ limit: { type: 'number', minimum: 1, maximum: 100, description: PARAM_DESCRIPTIONS.limit },
91
+ offset: { type: 'number', minimum: 0, description: PARAM_DESCRIPTIONS.offset },
92
+ },
93
+ },
94
+ handler: async (args) => {
95
+ const validatedArgs = ListProctorRunsSchema.parse(args);
96
+ const client = clientFactory();
97
+ try {
98
+ const response = await client.getProctorRuns({
99
+ q: validatedArgs.q,
100
+ recommended: validatedArgs.recommended,
101
+ tenant_ids: validatedArgs.tenant_ids,
102
+ sort: validatedArgs.sort,
103
+ direction: validatedArgs.direction,
104
+ limit: validatedArgs.limit,
105
+ offset: validatedArgs.offset,
106
+ });
107
+ let content = `Found ${response.runs.length} proctor run summaries`;
108
+ if (response.pagination) {
109
+ content += ` (page ${response.pagination.current_page} of ${response.pagination.total_pages}, total: ${response.pagination.total_count})`;
110
+ }
111
+ content += ':\n\n';
112
+ for (const [index, run] of response.runs.entries()) {
113
+ content += `${index + 1}. **${run.slug}**`;
114
+ if (run.name) {
115
+ content += ` — ${run.name}`;
116
+ }
117
+ content += ` (ID: ${run.id})\n`;
118
+ if (run.recommended) {
119
+ content += ` Recommended: yes\n`;
120
+ }
121
+ content += ` Mirrors: ${run.mirrors_count}, Tenants: ${run.tenant_count}\n`;
122
+ if (run.latest_version) {
123
+ content += ` Latest Version: ${run.latest_version}`;
124
+ if (run.latest_mirror_name) {
125
+ content += ` (mirror: ${run.latest_mirror_name}, ID: ${run.latest_mirror_id})`;
126
+ }
127
+ content += '\n';
128
+ }
129
+ content += ` Latest Tested: ${run.latest_tested ? 'yes' : 'no'}\n`;
130
+ if (run.last_auth_check_days !== null) {
131
+ content += ` Last Auth Check: ${run.last_auth_check_days} day(s) ago\n`;
132
+ }
133
+ else {
134
+ content += ` Last Auth Check: never\n`;
135
+ }
136
+ if (run.last_tools_list_days !== null) {
137
+ content += ` Last Tools List: ${run.last_tools_list_days} day(s) ago\n`;
138
+ }
139
+ else {
140
+ content += ` Last Tools List: never\n`;
141
+ }
142
+ if (run.auth_types.length > 0) {
143
+ content += ` Auth Types: ${run.auth_types.join(', ')}\n`;
144
+ }
145
+ if (run.num_tools !== null) {
146
+ content += ` Num Tools: ${run.num_tools}\n`;
147
+ }
148
+ if (run.packages.length > 0) {
149
+ content += ` Packages: ${run.packages.join(', ')}\n`;
150
+ }
151
+ if (run.remotes.length > 0) {
152
+ content += ` Remotes: ${run.remotes.join(', ')}\n`;
153
+ }
154
+ content += '\n';
155
+ }
156
+ return { content: [{ type: 'text', text: content.trim() }] };
157
+ }
158
+ catch (error) {
159
+ return {
160
+ content: [
161
+ {
162
+ type: 'text',
163
+ text: `Error fetching proctor runs: ${error instanceof Error ? error.message : String(error)}`,
164
+ },
165
+ ],
166
+ isError: true,
167
+ };
168
+ }
169
+ },
170
+ };
171
+ }
@@ -26,7 +26,7 @@ const PARAM_DESCRIPTIONS = {
26
26
  // Remote endpoints
27
27
  remote: 'Array of remote endpoint configurations for MCP servers. Each remote can have: id (existing remote ID or blank for new), url_direct, url_setup, transport (e.g., "sse"), host_platform (e.g., "smithery"), host_infrastructure (e.g., "cloudflare"), authentication_method (e.g., "open"), cost (e.g., "free"), status (defaults to "live"), display_name, and internal_notes.',
28
28
  // Canonical URLs
29
- canonical: 'Array of canonical URL configurations. Each entry must have: url (the canonical URL), scope (one of "domain", "subdomain", "subfolder", or "url"), and optional note for additional context.',
29
+ canonical: 'Array of canonical URL configurations. Each entry must have: url (the canonical URL), scope (one of "domain", "subdomain", or "url"), and optional note for additional context.',
30
30
  // Other fields
31
31
  internal_notes: 'Admin-only notes. Not displayed publicly. Used for tracking submission sources, reviewer comments, etc.',
32
32
  };
@@ -83,7 +83,7 @@ const SaveMCPImplementationSchema = z.object({
83
83
  canonical: z
84
84
  .array(z.object({
85
85
  url: z.string(),
86
- scope: z.enum(['domain', 'subdomain', 'subfolder', 'url']),
86
+ scope: z.enum(['domain', 'subdomain', 'url']),
87
87
  note: z.string().optional(),
88
88
  }))
89
89
  .optional()
@@ -294,7 +294,7 @@ Use cases:
294
294
  type: 'object',
295
295
  properties: {
296
296
  url: { type: 'string' },
297
- scope: { type: 'string', enum: ['domain', 'subdomain', 'subfolder', 'url'] },
297
+ scope: { type: 'string', enum: ['domain', 'subdomain', 'url'] },
298
298
  note: { type: 'string' },
299
299
  },
300
300
  required: ['url', 'scope'],
@@ -3,38 +3,19 @@ import { examResultStore, extractExamId, extractStatus } from '../exam-result-st
3
3
  const PARAM_DESCRIPTIONS = {
4
4
  mirror_id: 'The ID of the unofficial mirror to save results for',
5
5
  runtime_id: 'The runtime ID that was used to run the exams',
6
- result_id: 'The UUID returned by run_exam_for_mirror. When provided, the server retrieves the full result from the local file store — no need to pass the results array. This is the preferred approach.',
7
- results: 'Array of exam results to save. Each result must include exam_id, status, and optional data. Only needed if result_id is not provided.',
8
- exam_id: 'The exam identifier (e.g., "auth-check", "init-tools-list")',
9
- status: 'The result status (e.g., "pass", "fail", "error", "skip")',
10
- data: 'Optional detailed result data. Sensitive fields (tokens, secrets, passwords) will be automatically redacted before storage.',
6
+ result_id: 'The UUID returned by run_exam_for_mirror. The server retrieves the full result from the local file store automatically.',
11
7
  };
12
- const ResultSchema = z.object({
13
- exam_id: z.string().describe(PARAM_DESCRIPTIONS.exam_id),
14
- status: z.string().describe(PARAM_DESCRIPTIONS.status),
15
- data: z.record(z.unknown()).optional().describe(PARAM_DESCRIPTIONS.data),
16
- });
17
- const SaveResultsForMirrorSchema = z
18
- .object({
8
+ const SaveResultsForMirrorSchema = z.object({
19
9
  mirror_id: z.number().describe(PARAM_DESCRIPTIONS.mirror_id),
20
10
  runtime_id: z.string().optional().describe(PARAM_DESCRIPTIONS.runtime_id),
21
- result_id: z.string().uuid().optional().describe(PARAM_DESCRIPTIONS.result_id),
22
- results: z.array(ResultSchema).optional().describe(PARAM_DESCRIPTIONS.results),
23
- })
24
- .refine((data) => data.result_id || (data.results && data.results.length > 0), {
25
- message: 'Either result_id or a non-empty results array must be provided',
26
- })
27
- .refine((data) => !(data.result_id && data.results && data.results.length > 0), {
28
- message: 'Provide either result_id or results, not both. Use result_id (preferred) to retrieve from the store, or results for direct submission.',
11
+ result_id: z.string().uuid().describe(PARAM_DESCRIPTIONS.result_id),
29
12
  });
30
13
  export function saveResultsForMirror(_server, clientFactory) {
31
14
  return {
32
15
  name: 'save_results_for_mirror',
33
16
  description: `Save proctor exam results for an unofficial mirror.
34
17
 
35
- **Preferred**: Pass the \`result_id\` returned by \`run_exam_for_mirror\`. The full result is retrieved from the local file store server-side — no need to pass the large results payload through the LLM context.
36
-
37
- **Fallback**: Pass results directly (as before) if result_id is not available.
18
+ Pass the \`result_id\` returned by \`run_exam_for_mirror\`. The full result is retrieved from the local file store server-side — no need to pass the large results payload through the LLM context.
38
19
 
39
20
  Results are sanitized server-side to redact sensitive data (OAuth tokens, client secrets, passwords, etc.) before being persisted.
40
21
 
@@ -54,109 +35,85 @@ Typical workflow:
54
35
  format: 'uuid',
55
36
  description: PARAM_DESCRIPTIONS.result_id,
56
37
  },
57
- results: {
58
- type: 'array',
59
- items: {
60
- type: 'object',
61
- properties: {
62
- exam_id: { type: 'string', description: PARAM_DESCRIPTIONS.exam_id },
63
- status: { type: 'string', description: PARAM_DESCRIPTIONS.status },
64
- data: {
65
- type: 'object',
66
- additionalProperties: true,
67
- description: PARAM_DESCRIPTIONS.data,
68
- },
69
- },
70
- required: ['exam_id', 'status'],
71
- },
72
- description: PARAM_DESCRIPTIONS.results,
73
- },
74
38
  },
75
- required: ['mirror_id'],
39
+ required: ['mirror_id', 'result_id'],
76
40
  },
77
41
  handler: async (args) => {
78
42
  const validatedArgs = SaveResultsForMirrorSchema.parse(args);
79
43
  const client = clientFactory();
80
44
  try {
81
- let results = validatedArgs.results;
82
- let runtimeId = validatedArgs.runtime_id;
83
- // If result_id is provided, retrieve from the store
84
- if (validatedArgs.result_id) {
85
- const stored = examResultStore.get(validatedArgs.result_id);
86
- if (!stored) {
87
- return {
88
- content: [
89
- {
90
- type: 'text',
91
- text: `No stored result found for result_id "${validatedArgs.result_id}". The result file may have been cleaned up or the /tmp directory cleared. Pass the results array directly instead.`,
92
- },
93
- ],
94
- isError: true,
95
- };
96
- }
97
- // Extract exam_result lines from stored data.
98
- //
99
- // The real proctor API returns a deeply nested structure:
100
- // line.data = {
101
- // mirror_id, server_slug, exam_id, ...,
102
- // result: { ← envelope
103
- // exam_id, machine_id, status,
104
- // result: { ← actual payload
105
- // input: {...}, output: {...}, processedBy: {...}
106
- // },
107
- // error, logs
108
- // }
109
- // }
110
- //
111
- // The PulseMCP API expects the actual payload { input, output,
112
- // processedBy } at the top level of the saved results column.
113
- // We must unwrap through data.result.result to reach it.
114
- results = stored.lines
115
- .filter((line) => line.type === 'exam_result')
116
- .map((line) => {
117
- const data = line.data;
118
- // Unwrap nested result objects to find the exam payload
119
- // containing { input, output, processedBy }.
120
- let resultData = data;
121
- // Level 1: data.result (envelope with exam_id, machine_id, logs, etc.)
122
- if (resultData?.result &&
45
+ const stored = examResultStore.get(validatedArgs.result_id);
46
+ if (!stored) {
47
+ return {
48
+ content: [
49
+ {
50
+ type: 'text',
51
+ text: `No stored result found for result_id "${validatedArgs.result_id}". The result file may have been cleaned up or the /tmp directory cleared. Re-run run_exam_for_mirror to generate a new result.`,
52
+ },
53
+ ],
54
+ isError: true,
55
+ };
56
+ }
57
+ // Extract exam_result lines from stored data.
58
+ //
59
+ // The real proctor API returns a deeply nested structure:
60
+ // line.data = {
61
+ // mirror_id, server_slug, exam_id, ...,
62
+ // result: { ← envelope
63
+ // exam_id, machine_id, status,
64
+ // result: { ← actual payload
65
+ // input: {...}, output: {...}, processedBy: {...}
66
+ // },
67
+ // error, logs
68
+ // }
69
+ // }
70
+ //
71
+ // The PulseMCP API expects the actual payload { input, output,
72
+ // processedBy } at the top level of the saved results column.
73
+ // We must unwrap through data.result.result to reach it.
74
+ const results = stored.lines
75
+ .filter((line) => line.type === 'exam_result')
76
+ .map((line) => {
77
+ const data = line.data;
78
+ // Unwrap nested result objects to find the exam payload
79
+ // containing { input, output, processedBy }.
80
+ let resultData = data;
81
+ // Level 1: data.result (envelope with exam_id, machine_id, logs, etc.)
82
+ if (resultData?.result &&
83
+ typeof resultData.result === 'object' &&
84
+ !Array.isArray(resultData.result)) {
85
+ resultData = resultData.result;
86
+ // Level 2: data.result.result (actual payload with input, output, processedBy)
87
+ if (resultData.result &&
123
88
  typeof resultData.result === 'object' &&
124
89
  !Array.isArray(resultData.result)) {
125
90
  resultData = resultData.result;
126
- // Level 2: data.result.result (actual payload with input, output, processedBy)
127
- if (resultData.result &&
128
- typeof resultData.result === 'object' &&
129
- !Array.isArray(resultData.result)) {
130
- resultData = resultData.result;
131
- }
132
91
  }
133
- return {
134
- exam_id: extractExamId(line),
135
- status: extractStatus(line),
136
- ...(resultData ? { data: resultData } : {}),
137
- };
138
- });
139
- if (!runtimeId) {
140
- runtimeId = stored.runtime_id;
141
92
  }
142
- }
143
- if (!results || results.length === 0) {
93
+ return {
94
+ exam_id: extractExamId(line),
95
+ status: extractStatus(line),
96
+ ...(resultData ? { data: resultData } : {}),
97
+ };
98
+ });
99
+ if (results.length === 0) {
144
100
  return {
145
101
  content: [
146
102
  {
147
103
  type: 'text',
148
- text: 'No exam results to save. Either provide a result_id from run_exam_for_mirror or pass results directly.',
104
+ text: 'No exam results found in the stored result. The stored data may not contain any exam_result lines.',
149
105
  },
150
106
  ],
151
107
  isError: true,
152
108
  };
153
109
  }
110
+ const runtimeId = validatedArgs.runtime_id || stored.runtime_id;
154
111
  if (!runtimeId) {
155
112
  return {
156
113
  content: [
157
114
  {
158
115
  type: 'text',
159
- text: 'runtime_id is required. Provide it directly or use a result_id which includes the runtime_id.',
116
+ text: 'runtime_id is required. Provide it directly or ensure the stored result includes it.',
160
117
  },
161
118
  ],
162
119
  isError: true,
@@ -170,9 +127,7 @@ Typical workflow:
170
127
  let content = `**Proctor Results Saved**\n\n`;
171
128
  content += `Mirror ID: ${validatedArgs.mirror_id}\n`;
172
129
  content += `Runtime: ${runtimeId}\n`;
173
- if (validatedArgs.result_id) {
174
- content += `Result ID: ${validatedArgs.result_id}\n`;
175
- }
130
+ content += `Result ID: ${validatedArgs.result_id}\n`;
176
131
  content += '\n';
177
132
  if (response.saved.length > 0) {
178
133
  content += `**Successfully Saved (${response.saved.length}):**\n`;
@@ -193,7 +148,7 @@ Typical workflow:
193
148
  }
194
149
  }
195
150
  // Clean up stored result after successful save (all results persisted)
196
- if (validatedArgs.result_id && response.errors.length === 0) {
151
+ if (response.errors.length === 0) {
197
152
  examResultStore.delete(validatedArgs.result_id);
198
153
  }
199
154
  return { content: [{ type: 'text', text: content.trim() }] };
@@ -25,8 +25,8 @@ const PARAM_DESCRIPTIONS = {
25
25
  const CanonicalUrlSchema = z.object({
26
26
  url: z.string().describe('The canonical URL'),
27
27
  scope: z
28
- .enum(['domain', 'subdomain', 'subfolder', 'url'])
29
- .describe('Scope of the canonical: domain, subdomain, subfolder, or url (exact match)'),
28
+ .enum(['domain', 'subdomain', 'url'])
29
+ .describe('Scope of the canonical: domain, subdomain, or url (exact match)'),
30
30
  note: z.string().optional().describe('Optional note about this canonical URL'),
31
31
  });
32
32
  const RemoteEndpointSchema = z.object({
@@ -126,7 +126,7 @@ Providing canonical_urls replaces ALL existing canonical URLs:
126
126
  {
127
127
  "implementation_id": 456,
128
128
  "canonical_urls": [
129
- { "url": "https://github.com/org/repo", "scope": "subfolder" },
129
+ { "url": "https://github.com/org/repo", "scope": "domain" },
130
130
  { "url": "https://npmjs.com/package/name", "scope": "url" }
131
131
  ]
132
132
  }
@@ -237,7 +237,7 @@ Create new provider:
237
237
  url: { type: 'string', description: 'The canonical URL' },
238
238
  scope: {
239
239
  type: 'string',
240
- enum: ['domain', 'subdomain', 'subfolder', 'url'],
240
+ enum: ['domain', 'subdomain', 'url'],
241
241
  description: 'Scope of the canonical',
242
242
  },
243
243
  note: { type: 'string', description: 'Optional note' },
@@ -60,6 +60,7 @@ import { cleanupGoodJobs } from './tools/cleanup-good-jobs.js';
60
60
  import { runExamForMirror } from './tools/run-exam-for-mirror.js';
61
61
  import { getExamResult } from './tools/get-exam-result.js';
62
62
  import { saveResultsForMirror } from './tools/save-results-for-mirror.js';
63
+ import { listProctorRuns } from './tools/list-proctor-runs.js';
63
64
  // Discovered URLs tools
64
65
  import { listDiscoveredUrls } from './tools/list-discovered-urls.js';
65
66
  import { markDiscoveredUrlProcessed } from './tools/mark-discovered-url-processed.js';
@@ -230,6 +231,7 @@ const ALL_TOOLS = [
230
231
  { factory: runExamForMirror, groups: ['proctor'], isWriteOperation: true },
231
232
  { factory: getExamResult, groups: ['proctor'], isWriteOperation: false },
232
233
  { factory: saveResultsForMirror, groups: ['proctor'], isWriteOperation: true },
234
+ { factory: listProctorRuns, groups: ['proctor'], isWriteOperation: false },
233
235
  // Discovered URLs tools
234
236
  { factory: listDiscoveredUrls, groups: ['discovered_urls'], isWriteOperation: false },
235
237
  {
@@ -367,7 +369,7 @@ function shouldIncludeTool(toolDef, enabledGroups) {
367
369
  * - good_jobs: GoodJob background job management tools (read + write)
368
370
  * - good_jobs_readonly: GoodJob tools (read only)
369
371
  * - proctor: Proctor exam execution and result storage tools (read + write)
370
- * - proctor_readonly: Proctor tools (read only - get_exam_result for retrieving stored results)
372
+ * - proctor_readonly: Proctor tools (read only - get_exam_result and list_proctor_runs)
371
373
  * - discovered_urls: Discovered URL management tools for processing URLs into MCP implementations (read + write)
372
374
  * - discovered_urls_readonly: Discovered URL tools (read only - list and stats)
373
375
  * - notifications: Notification email tools - send_impl_posted_notif (write-only, no readonly variant)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulsemcp-cms-admin-mcp-server",
3
- "version": "0.7.4",
3
+ "version": "0.9.1",
4
4
  "description": "Local implementation of PulseMCP CMS Admin MCP server",
5
5
  "mcpName": "com.pulsemcp.servers/pulsemcp-cms-admin",
6
6
  "main": "build/index.js",
@@ -0,0 +1,11 @@
1
+ import type { ProctorRunsResponse } from '../../types.js';
2
+ export declare function getProctorRuns(apiKey: string, baseUrl: string, params?: {
3
+ q?: string;
4
+ recommended?: boolean;
5
+ tenant_ids?: string;
6
+ sort?: 'slug' | 'name' | 'mirrors' | 'recommended' | 'tenants' | 'latest_tested' | 'last_auth_check' | 'last_tools_list';
7
+ direction?: 'asc' | 'desc';
8
+ limit?: number;
9
+ offset?: number;
10
+ }): Promise<ProctorRunsResponse>;
11
+ //# sourceMappingURL=get-proctor-runs.d.ts.map