unitoolkit: one endpoint for a student's whole university

Project write-up, not a pre-registered study. Code: https://github.com/vhsgreed/shh-study-kit (cited at commit c9c4522).

A student's week is spread across six systems that were never meant to be read by a machine. Canvas holds the assignments and the rubrics. Ladok holds the registration windows and has no API for students. TimeEdit holds the timetable, in a guide so carefully frozen that a saved link only ever shows the week it was made for. The library catalogue runs on Koha behind Cloudflare, with results rendered by JavaScript. SharePoint holds the syllabus PDFs. And the articles the school pays for sit behind an OCLC proxy that delegates to a Microsoft tenant, one database at a time.

None of them talk to each other, and each assumes a human with a browser and a session cookie.

unitoolkit is what we built to sit between an agent and that mess. It is a Python package, a CLI, an MCP server and a manifest of JSON schemas, all generated from one tool registry. 38 tools. Every one of them is read-only toward the school's systems; the only writes are local files.

The shape of it

One registry feeds four surfaces: unitoolkit <tool> from a shell, the same call as a function, an MCP server for Claude Code, Cursor, Codex or Hermes, and tools.json for anything that wants the schemas without importing Python. Add a tool in one place and all four see it.

The agent does not see 38 tools. It sees eleven, each shaped like a question a student actually asks:

What the student saysWhat the agent callsWhat comes back
"What do I need to do?"todayCanvas deadlines not yet submitted, Ladok windows open or opening, this week's timetable
"Find me sources on X"find_sourcesCINAHL, PubMed and Cochrane in one pass, deduplicated by DOI, each hit with an APA 7 reference
"Get me that article"db_fulltextthe PDF, through the school's subscription
"What does the assignment ask?"assignmentdescription and rubric rows as plain text
"When is the seminar?"scheduleany course code or student group, any period
"Is a room free?"free_roomsgaps in the bookable rooms within the booking rules
"When are my books due?"libraryloans, holds and fines
"Did a teacher post anything?"announcementsannouncements with body text, which Canvas hides from the discussion list
"Anything waiting in a group discussion?"discussionstopics with reply count and read state
"Something is broken"doctorevery session with the fix

The rest stay callable by name, for whoever wants them.

Four things that took longer than the rest combined

Ladok has no student API. Studentwebb is a web app that fetches everything through https://student.ladok.se/student/proxy/<larosate>/... with a session cookie, so the tool does the same, from a tab on the same origin, over the Chrome DevTools protocol. The registration windows exist nowhere else.

A session that dies quietly is the real failure mode. Ladok and the school's single sign-on keep their sessions in cookies that vanish with the browser, so a watcher would stop working and report nothing, which looks exactly like "nothing is happening". The design rule that came out of it: silence is only allowed when a fetch actually succeeded. Every fault speaks, in the output and by mail. The same rule now runs through doctor, which reads the Canvas token's real expiry date from Canvas rather than trusting a note on disk.

Koha is not a normal website. Plain HTTP clients get a 429 from Cloudflare, including a Cloudflare Worker of our own and a commercial HTTP proxy, and the catalogue renders its results with JavaScript, so a real browser is the only reader. The browser then turned out not to be enough on its own. The first successful login looked empty because Koha 26 names its loans table #checkoutst. The login form silently ignores a POST without login_op=cud-login, and its CSRF token goes stale when the page is served from cache. Most expensive of all: Koha binds a session to the client IP, so a connection that changes address between the page load and the POST is refused with "You are logging from a different IP address" and, if it is a proxy that rotates, it never recovers.

The single sign-on hand-back is a cross-site POST, and the library's session cookie is SameSite=Lax. Chrome only sends those on a cross-site POST inside a two-minute grace window, which two-factor authentication outlasts. That one line explains a login that succeeds at the identity provider and leaves you anonymous at the catalogue.

Searching, then reading

Databases were the part we expected to be hardest and were not. Every subscription the school lists, CINAHL, PsycInfo, Cochrane, Web of Science, Journal Citation Reports, Sage Research Methods, Nationalencyklopedin and the Författningshandbok, sits behind one OCLC EZproxy, which delegates to the school's Microsoft tenant. One sign-in with "stay signed in" leaves a session cookie that admits every one of them silently afterwards, so doctor checks a single session and db_status says when it has lapsed.

Searching them properly took longer than reaching them. EBSCO reads a space-separated URL query as one phrase: "delirium older adults" returned a single hit while the same words joined by AND returned 403. Cochrane keeps the previous search in its session, so the results page can still show the last query for a few seconds, and its own ranking puts off-topic reviews first for multi-word queries. Web of Science takes its query as JSON in the URL, which skips the Angular form and works well, but its result cards carry no DOI.

Full text was the last wall. Publishers answer a script fetch() of a PDF with a viewer page or a bot check, so the download is captured at the network layer on a top-level navigation instead. That works on paywalled Wiley and Elsevier articles and on a 188-page Cochrane review. It is capped at 20 downloads an hour, and the cap is not a tuning knob: publishers detect systematic downloading and block the institution's whole proxy, which would take the databases away from every other student at the school.

What it refuses

It never registers you for a course, never books an exam or a room, never renews a loan, never sends a message and never hands in an assignment. Those are the human's actions, and the tools are GET-only toward the school.

Credentials never travel through the agent. Access is a browser session a human signed in to once, and a two-line file for the library card number and PIN that the tool reads and never prints. Nothing is logged, and nothing about the student leaves the machine.

Where it stands

In daily use for one nursing programme, against live systems, with 89 tests that need no network. What is not finished is stated in the repository rather than implied away: the readers are scrapers, so a site redesign breaks them, which is why a weekly smoke test runs one real query per reader and speaks only when something is wrong. Web of Science and PsycInfo are searched one at a time, not together with the rest. APA references keep the publisher's title case where APA 7 wants sentence case, flagged rather than mangled by rule. And none of it has been verified at a second school.

Anyone who has watched an agent fail at a login form knows why the tools are shaped like this: each one encodes an afternoon of finding out what the site actually does.

Code, with the skill file an agent reads first: github.com/vhsgreed/shh-study-kit.