Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
UPLUS_CONFIGNoPath to the personal course configuration file (config/courses.json). Example: config/courses.json

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
uplus_check_loginA

Check whether the attached browser session is signed into U+.

uplus_loginA

Sign in to U+ through the attached browser session. Ask the user which flow they prefer BEFORE calling:

  • mode="manual": open the portal and wait for the user to sign in by themselves in the visible browser window; no account or password is needed.

  • mode="auto": the model first asks the user for their account, password and school name, then fills the sign-in form, submits and verifies the session. Credentials are used only for this call: never persisted to config, reports or logs, and never echoed back. The wait is capped at 30 s so a failed auto fill hands over to manual quickly. If auto fill cannot find the fields, the school selector cannot be matched, or a captcha / SMS / wrong-password prompt appears, fall back to manual and hand the window to the user.

Returns logged_in, the chosen mode, current URL and token length.

uplus_list_coursesA

List every course attached to the signed-in account.

uplus_list_homeworksA

List homework status for one course, or all courses when omitted.

refresh_page_state=True opens each answer page to read the real submit button, because the REST status can lag behind the page.

uplus_list_experimentsA

List experiments and their submission state for one course.

uplus_read_experiment_detailB

Read experiment detail: requirements, material, deadline, submitted files.

uplus_generate_experiment_reportC

Generate a standard experiment report .docx file.

output_path must stay inside the configured allowed directories (the report folder and the system temp dir by default; extend via allowed_io_paths in config or UPLUS_ALLOWED_PATHS).

uplus_submit_experiment_reportB

Upload and submit an experiment report file.

file_path must stay inside the configured allowed directories (see uplus_generate_experiment_report). A .docx report first passes the same inspection the experiment pipeline uses — non-empty body, no leftover placeholders, topic matching the experiment — and is refused when it fails, so a blank or wrong report is never uploaded. After submitting, the page is re-read and success is only reported when the submission registered.

uplus_download_experiment_materialsA

Download an experiment's materials from all sources.

Downloads every attachment from the 实验附件 tab, every file link from the 实验手册 tab, and every matching file from the course 资料 section (recursing into folders). The best template across all sources is identified and reported in template / template_source.

Read-only against the platform. Use it after uplus_list_experiments (which returns exp_id / stu_exp_id) when you want the requirement files and the template on disk before authoring the report. Files go to reports/experiment_materials/.

uplus_inspect_experimentA

Read an experiment and return the authoring brief.

Opens the experiment detail page, reads 实验提交物 / 实验手册 / 实验附件, and (when find_template) searches all three sources for a downloadable report template — 实验附件 first, then downloadable files on the 实验手册 tab, then the course 资料 section (including its folders). The first source that yields a downloadable template file wins.

The result separates:

  • auto_sections — 目的 / 内容 / 步骤 / 要求 copied verbatim from the handbook; the server fills these and never rewrites them.

  • needed_sections — 实验实现 / 实验结果 / 实验总结 (plus any template section with no handbook text). Write these yourself from the requirements and attachments, then return {"sections": {"实验实现": "...", ...}} and call uplus_answer_experiment.

template_source reports which source the template came from (实验附件 / 实验手册 / 资料) or empty when no template was found. Nothing is filled, uploaded or submitted by this tool.

uplus_answer_experimentA

Fill the experiment report, verify it, and submit it.

sections maps a section name (实验实现 / 实验结果 / 实验总结 …) to its text — the output of uplus_inspect_experiment's needed_sections. Server-derived sections from the handbook are merged in automatically; a supplied value overrides them.

The report is built from the downloaded 资料 template when one exists, otherwise from the built-in format. Before anything is uploaded the report must pass the inspection gate: non-empty body, no leftover placeholders, content that matches this experiment, and the compliance checklist (teacher-template cover fields, 实验名称 field, screenshots when the handbook demands them, handbook requirement coverage, AI-sounding meta talk, repetition, layout). A failed check returns the reasons and submits nothing; force=True downgrades the checklist to warnings.

With submit=True (default) a passing report is uploaded and submitted, and the page is re-read until 「已提交」+「撤回」 appear — a mere upload is never reported as a successful submission. An already-submitted experiment is not re-submitted. submit=False stops after generating and verifying. student_name / student_id override the identity in the personal config.

uplus_audit_experimentA

Read-only completeness audit for a submitted experiment.

Pulls the submitted report back when the page exposes a download link and checks it for an empty body, leftover placeholders and a report written for a different experiment. When the file cannot be downloaded, the audit says so and only checks the page record — it never reports an unchecked report as clean. It withdraws and submits nothing.

uplus_inspect_homeworkB

Return homework status plus a structured brief of its questions.

The model reads the brief and returns an answers map to uplus_answer_homework.

uplus_answer_homeworkB

Fill objective questions and optionally submit.

answers maps question_id (or question order as a string) to a normalized answer: one letter, a sorted letter group, true/false, or blank text. Submission is refused while any question is unanswered or failed unless force_submit=True.

uplus_repair_homeworkA

Withdraw a submitted homework, fill its gaps, and resubmit it.

Use after uplus_patrol (audit is on by default) reports a homework as missing (漏答) or partial (多选漏选). answers maps question_id (or question order as a string) to the corrected answer; the patrol result's repair_briefs lists exactly which questions need one. Answers already stored in the local journal (because this tool submitted the homework earlier) are used automatically, so a journal-covered partial can be repaired without new model answers.

The tool refuses to withdraw until every known gap has an answer. A graded homework cannot be withdrawn and is reported without changing anything. Existing answers are preserved and re-filled, so a withdrawal that clears the draft still leaves enough answers to resubmit. Submission uses the same gate as uplus_answer_homework; subjective items never block the repair. verify_unjudged=True additionally re-answers multi-selects whose completeness could not be checked while the homework was pending grading.

uplus_capture_question_imageA

Screenshot one question block and return it as an image.

Use for figure questions — a stem whose diagram/picture carries the part that makes the statement true or false (for example "以下模型是…" with a crypto diagram). The question text alone cannot be answered reliably, and the model cannot see an <img> that lives in the platform's rich text.

The tool opens the answer page, navigates to the question by its stem (same rule as filling), and captures that question's container — not just the viewport — so the whole figure is readable. It fills and submits nothing. Identify the question with order (the number shown on the page) or question_id. The result is the saved PNG path plus the image itself; answer the question after looking at it and pass the answer to uplus_answer_homework keyed by question_id.

output_path is optional and confined to the configured IO roots; by default the PNG goes under the report folder's question_images/. Set full_page=True when the figure sits outside the question block (for example a shared table above the questions).

uplus_audit_homeworkA

Read-only completeness audit for one homework (no withdraw, no submit).

Every question is read from the student-side detail, so an already submitted homework can be audited safely. A question counts as answered only when its userAnswer is non-empty; the platform creates an answer row (hwAnswerId / isAnswer) when a question is merely opened, so those fields alone prove nothing. The result lists which objective questions carry no answer (missing) and, when the platform has graded the homework and exposed its standard answer (answer), which multi-selects were submitted with only part of the correct options (partial, with the omitted letters). A multi-select still awaiting grading has no reference answer and is listed in unjudged instead of being silently treated as complete. Subjective / programming / attachment items are counted separately and never make the homework "incomplete". complete means no missing and no partial multi-select; clean also requires checked answers to be correct. Fix a gap with uplus_repair_homework (it withdraws only after every gap has an answer, then completes and resubmits).

The API status understates (a handed-in homework may read as not submitted), so withdrawable comes from the page's real button state; set refresh_page_state=False to skip that page read and trust the API.

uplus_upload_attachmentC

Attach a local file (PPT/PDF/ZIP) to a homework that requires an upload.

uplus_patrolA

Patrol every configured course and write a Markdown report.

Lists homework and experiments, separates submitted / pending / outstanding / takeover items, and collects answer briefs for outstanding objective questions. submit=True only submits homework that received valid answers; subjective, programming and file items are never auto-submitted.

audit is on by default: every already-submitted homework is re-checked for unanswered objective questions (漏答) and for multi-selects submitted with only part of the correct options (漏选). The platform only reveals its standard answer after grading and hides it while a submission is pending; a local journal of answers this tool submitted fills that gap. Multi-selects with neither source are reported as "unjudged", never silently as complete. The audit itself is read-only. Results also include repair_briefs: when a gap is found, answer the listed questions and call uplus_repair_homework to withdraw, complete and resubmit the homework. Set audit=False only to skip this extra read pass.

uplus_closeA

Detach from the browser and release the worker session.

browse_launch_edgeA

Launch an installed browser (Edge / Chrome) with a CDP debug port on a dedicated profile copy, then verify the port listens.

The tool name keeps the original browse_launch_edge spelling for compatibility; it launches whichever engine the config browser field selects (auto picks the first installed Edge or Chrome). port of 0 means "use the configured CDP port" (default 9333, fallback 9222). Needed because Chromium 136+ ignores --remote-debugging-port on the default profile directory. Login cookies survive the copy, so U+ stays signed in.

browse_openB

Open a URL in the attached browser tab and return its title/status.

browse_snapshotC

Return a compact snapshot: interactive elements (selector/role/text) + visible text.

browse_clickC

Click an element by CSS selector or by visible text.

browse_fillC

Replace an input's value, optionally pressing Enter afterwards.

browse_typeC

Type text with a human-like delay into a focused/selected element.

browse_pressB

Press a key or combination, e.g. Enter or Control+A.

browse_scrollA

Scroll the page by pixels, or scroll a specific element into view.

browse_get_textA

Read the text content of an element (defaults to the whole body).

browse_eval_jsC

Evaluate a JavaScript expression in the page and return its JSON value.

browse_screenshotB

Screenshot the page: returns a path, or base64 when no path is given.

browse_wait_forC

Wait until a selector exists or text appears.

browse_tabsA

List open tabs with url/title and which one is active.

browse_switch_tabB

Switch the active tab by index from browse_tabs.

browse_backB

Navigate back one history entry.

browse_uploadC

Set files on an input[type=file] element.

browse_select_optionC

Choose an option in a <select> by value.

browse_act_batchA

Run one short batch of page actions; stop on failure or navigation.

Each step supports: click (selector/text/nth), fill (selector, value, optional press_enter), press (key), hover, scroll (amount/selector), wait (selector/text/timeout_ms), extract (selector, fields: text/value/href, maxRows), navigate (url), back.

Returns completed steps, remaining count, extract rows and a failure or navigation receipt. observe="summary" skips the follow-up snapshot; observe="snapshot" reads the body once afterwards. Sensitive or destructive actions need explicit user authorization; do not repeat a step whose receipt reports failure or navigation.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 38 tools

Disambiguation3/5

Most U+ domain tools have distinct intents, but several experiment tools overlap heavily: uplus_read_experiment_detail, uplus_inspect_experiment, uplus_download_experiment_materials, and uplus_audit_experiment all read related experiment data. Similarly, uplus_generate_experiment_report, uplus_answer_experiment, and uplus_submit_experiment_report can be confused, and uplus_inspect_homework/audit_homework/answer_homework/repair_homework form a dense cluster. The detailed descriptions mitigate this, but boundaries are not always obvious at a glance.

Naming Consistency4/5

Tool names use two clear, consistent namespaces: uplus_* for domain operations and browse_* for browser primitives, all in snake_case with predictable verb_noun forms. Minor deviations exist, such as the legacy browse_launch_edge spelling and uplus_close as a bare verb, but overall the pattern is easy to follow.

Tool Count2/5

At 38 tools, the surface is heavy: 20 domain-specific U+ operations plus 18 generic browser primitives. While some browser tools are useful fallbacks, the generic low-level operations (click, fill, type, press, scroll, eval, snapshot, batch) add substantial weight beyond the core course/homework/experiment workflow.

Completeness4/5

The domain surface covers a full lifecycle: login, course listing, homework inspection/answering/auditing/repairing/submitting, experiment inspection/material download/report generation/answering/submission/auditing, plus attachment upload and image capture. Browser primitives provide fallback navigation and interaction. Minor gaps remain, such as a dedicated browser navigation tool outside batch/open, but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues