infinitecampus-mcp 2.3.4 → 2.3.6
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/bundle.js +609 -205
- package/dist/client.js +161 -114
- package/dist/index.js +1 -1
- package/dist/tools/_shared.js +2 -11
- package/dist/tools/assessments.js +3 -2
- package/dist/tools/assignments.js +2 -2
- package/dist/tools/attendance.js +3 -2
- package/dist/tools/attendance_events.js +3 -2
- package/dist/tools/behavior.js +3 -2
- package/dist/tools/calendar.js +3 -2
- package/dist/tools/districts.js +2 -2
- package/dist/tools/documents.js +5 -4
- package/dist/tools/features.js +3 -2
- package/dist/tools/fees.js +3 -2
- package/dist/tools/foodservice.js +3 -2
- package/dist/tools/grades.js +2 -2
- package/dist/tools/messages.js +4 -3
- package/dist/tools/recent_grades.js +2 -2
- package/dist/tools/schedule.js +2 -2
- package/dist/tools/students.js +2 -2
- package/dist/tools/teachers.js +3 -2
- package/package.json +4 -4
- package/server.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
+
import { is404, featureDisabled, findStudent, studentNotFound, checkFeatureDisabled } from './_shared.js';
|
|
3
4
|
const argsSchema = z.object({
|
|
4
5
|
district: z.string(),
|
|
5
6
|
studentId: z.string(),
|
|
@@ -27,7 +28,7 @@ export function registerFoodServiceTools(server, client) {
|
|
|
27
28
|
params.set('endDate', args.until);
|
|
28
29
|
try {
|
|
29
30
|
const data = await client.request(args.district, `/campus/resources/portal/foodService?${params}`);
|
|
30
|
-
return
|
|
31
|
+
return textResult(data);
|
|
31
32
|
}
|
|
32
33
|
catch (e) {
|
|
33
34
|
if (is404(e))
|
package/dist/tools/grades.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { textContent } from './_shared.js';
|
|
3
3
|
const argsSchema = z.object({
|
|
4
4
|
district: z.string(),
|
|
5
5
|
studentId: z.string(),
|
|
@@ -16,6 +16,6 @@ export function registerGradeTools(server, client) {
|
|
|
16
16
|
if (args.termId)
|
|
17
17
|
params.set('termID', args.termId);
|
|
18
18
|
const data = await client.request(args.district, `/campus/resources/portal/grades?${params}`);
|
|
19
|
-
return
|
|
19
|
+
return textResult(data);
|
|
20
20
|
});
|
|
21
21
|
}
|
package/dist/tools/messages.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
3
|
import { extractPlainTextFromHtml } from '@chrischall/mcp-utils/html';
|
|
3
|
-
import {
|
|
4
|
+
import { toArray } from './_shared.js';
|
|
4
5
|
const listArgs = z.object({
|
|
5
6
|
district: z.string(),
|
|
6
7
|
limit: z.number().int().positive().describe('Number of prism notifications to retrieve (default 20). Does not affect inbox or announcements.').optional(),
|
|
@@ -95,7 +96,7 @@ export function registerMessageTools(server, client) {
|
|
|
95
96
|
return { count: 0, items: [], error: e instanceof Error ? e.message : String(e) };
|
|
96
97
|
});
|
|
97
98
|
const [notifications, inbox, announcements] = await Promise.all([prismPromise, inboxPromise, noticePromise]);
|
|
98
|
-
return
|
|
99
|
+
return textResult({ notifications, inbox, announcements });
|
|
99
100
|
});
|
|
100
101
|
server.registerTool('ic_get_message', {
|
|
101
102
|
description: "Fetch the HTML body of an inbox message and return it parsed into { subject, date, body, url }. Takes a `messageUrl` which is the `url` field from an item returned by ic_list_messages' inbox section (e.g. 'portal/messageView.xsl?x=messenger.MessengerEngine-getMessageRecipientView&messageID=...'). Relative and /campus/-prefixed URLs are both accepted. Note: fetching the HTML body may mark the message as read on some district configurations; probe against an empty inbox could not confirm the side effect.",
|
|
@@ -106,6 +107,6 @@ export function registerMessageTools(server, client) {
|
|
|
106
107
|
const path = normalizeMessageUrl(args.messageUrl);
|
|
107
108
|
const html = await client.request(args.district, path, { responseType: 'text' });
|
|
108
109
|
const parsed = parseMessageHtml(html ?? '', path);
|
|
109
|
-
return
|
|
110
|
+
return textResult(parsed);
|
|
110
111
|
});
|
|
111
112
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { textContent } from './_shared.js';
|
|
3
3
|
const argsSchema = z.object({
|
|
4
4
|
district: z.string(),
|
|
5
5
|
studentId: z.string(),
|
|
@@ -34,6 +34,6 @@ export function registerRecentGradesTools(server, client) {
|
|
|
34
34
|
}
|
|
35
35
|
return out;
|
|
36
36
|
});
|
|
37
|
-
return
|
|
37
|
+
return textResult(trimmed);
|
|
38
38
|
});
|
|
39
39
|
}
|
package/dist/tools/schedule.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { textContent } from './_shared.js';
|
|
3
3
|
const argsSchema = z.object({
|
|
4
4
|
district: z.string().describe('District name from ic_list_districts'),
|
|
5
5
|
studentId: z.string().describe('Student personID from ic_list_students'),
|
|
@@ -15,6 +15,6 @@ export function registerScheduleTools(server, client) {
|
|
|
15
15
|
const args = argsSchema.parse(rawArgs);
|
|
16
16
|
const params = new URLSearchParams({ personID: args.studentId });
|
|
17
17
|
const data = await client.request(args.district, `/campus/resources/portal/roster?${params}`);
|
|
18
|
-
return
|
|
18
|
+
return textResult(data);
|
|
19
19
|
});
|
|
20
20
|
}
|
package/dist/tools/students.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { textContent } from './_shared.js';
|
|
3
3
|
const argsSchema = z.object({
|
|
4
4
|
district: z.string().describe('District name from ic_list_districts'),
|
|
5
5
|
});
|
|
@@ -11,6 +11,6 @@ export function registerStudentTools(server, client) {
|
|
|
11
11
|
}, async (rawArgs) => {
|
|
12
12
|
const args = argsSchema.parse(rawArgs);
|
|
13
13
|
const data = await client.request(args.district, '/campus/api/portal/students');
|
|
14
|
-
return
|
|
14
|
+
return textResult(data);
|
|
15
15
|
});
|
|
16
16
|
}
|
package/dist/tools/teachers.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { textResult } from '@chrischall/mcp-utils';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
+
import { is404, toArray } from './_shared.js';
|
|
3
4
|
const argsSchema = z.object({
|
|
4
5
|
district: z.string(),
|
|
5
6
|
studentId: z.string(),
|
|
@@ -41,6 +42,6 @@ export function registerTeacherTools(server, client) {
|
|
|
41
42
|
const [teachersRaw, counselorsRaw] = await Promise.all([teachersPromise, counselorsPromise]);
|
|
42
43
|
const teachers = toArray(teachersRaw).map((t) => trimRecord(t));
|
|
43
44
|
const counselors = toArray(counselorsRaw).map((c) => trimRecord(c));
|
|
44
|
-
return
|
|
45
|
+
return textResult({ counselors, teachers });
|
|
45
46
|
});
|
|
46
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infinitecampus-mcp",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.6",
|
|
4
4
|
"mcpName": "io.github.chrischall/infinitecampus-mcp",
|
|
5
5
|
"description": "Infinite Campus (Campus Parent) MCP server — multi-district read + message/document write",
|
|
6
6
|
"author": "Claude Code (AI) <https://www.anthropic.com/claude>",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"test:watch": "vitest"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@chrischall/mcp-utils": "^0.
|
|
45
|
+
"@chrischall/mcp-utils": "^0.12.0",
|
|
46
46
|
"@fetchproxy/bootstrap": "^1.0.0",
|
|
47
47
|
"@fetchproxy/server": "^1.0.0",
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
49
49
|
"dotenv": "^17.4.2",
|
|
50
|
-
"node-html-parser": "^
|
|
50
|
+
"node-html-parser": "^8.0.2",
|
|
51
51
|
"zod": "^4.4.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@types/node": "^
|
|
54
|
+
"@types/node": "^26.0.0",
|
|
55
55
|
"@vitest/coverage-v8": "^4.1.7",
|
|
56
56
|
"esbuild": "^0.28.0",
|
|
57
57
|
"typescript": "^6.0.3",
|
package/server.json
CHANGED
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"url": "https://github.com/chrischall/infinitecampus-mcp",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "2.3.
|
|
9
|
+
"version": "2.3.6",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"identifier": "infinitecampus-mcp",
|
|
14
|
-
"version": "2.3.
|
|
14
|
+
"version": "2.3.6",
|
|
15
15
|
"transport": {
|
|
16
16
|
"type": "stdio"
|
|
17
17
|
},
|