@@ -32,38 +32,45 @@ import (
3232
3333func GetCourseTool () mcpgoserver.ServerTool {
3434 return mcpgoserver.ServerTool {
35- Tool : mcp .NewTool ("get_course_list" ,
35+ Tool : mcp .NewTool (
36+ "get_course_list" ,
3637 mcp .WithDescription (
3738 "Fetch the user's course list for a given academic term. " +
3839 "ALWAYS call get_date first to determine the current term and week if the user asks about today's timetable or current-week schedule. " +
3940 "Do NOT guess dates or terms—use get_date to retrieve them. " +
4041 "Use this when the user asks to view courses/timetable for a specific term or the current day/week. " +
41- "Returns the course list for the given term." ),
42+ "Returns the course list for the given term." ,
43+ ),
4244 mcp .WithString ("term" ,
4345 mcp .Description (
4446 "Academic term code in the form yyyymm. " +
4547 "Examples: 202401 means 2024 Autumn term, 202402 means 2025 Spring term. " +
46- "If omitted, the tool will use get_date-derived current term automatically." )),
48+ "If omitted, the tool will use get_date-derived current term automatically." ,
49+ )),
4750 mcp .WithString ("user_id" ,
4851 mcp .Required (),
4952 mcp .Description (
50- "user_id data comes from the login method response (user_id field)." )),
53+ "user_id data comes from the login method response (user_id field)." ,
54+ )),
5155 mcp .WithString ("user_cookies" ,
5256 mcp .Required (),
5357 mcp .Description (
54- "user_cookies data comes from the login method response (user_cookies field)." )),
58+ "user_cookies data comes from the login method response (user_cookies field)." ,
59+ )),
5560 ),
5661 Handler : handleGetCourse ,
5762 }
5863}
5964
6065func GetDateTool () mcpgoserver.ServerTool {
6166 return mcpgoserver.ServerTool {
62- Tool : mcp .NewTool ("get_date" ,
67+ Tool : mcp .NewTool (
68+ "get_date" ,
6369 mcp .WithDescription (
6470 "Get the current year, academic term, week number, calendar date, and weekday. " +
6571 "You MUST call this before attempting to fetch today's timetable or current-week schedule. " +
66- "Returns: year, term, week, date (YYYY-MM-DD), term_formatted, weekday_name (e.g., Monday), weekday_number (1-7)." ),
72+ "Returns: year, term, week, date (YYYY-MM-DD), term_formatted, weekday_name (e.g., Monday), weekday_number (1-7)." ,
73+ ),
6774 ),
6875 Handler : handleGetDate ,
6976 }
0 commit comments