# MCP agent workflows

> Write study material, use prompts, practise cards and follow background work.

Source: https://workroad.app/docs/api/mcp-workflows

## Let your AI do the writing

Your AI can write notes, flashcards, practice tests, task lists and timetables itself and save them to WorkRoad. Ask it, for example, "Make flashcards from yesterday's OS lecture": it reads the lecture's transcript, writes the cards and saves them as a study set. When your AI writes the content itself, it uses none of your WorkRoad AI uses. Only asking WorkRoad's AI to write something, or using Copilot, counts. WorkRoad asks connected AIs to work this way, and the tools that run WorkRoad's AI say that they use an AI use, so your AI calls them only when you ask for WorkRoad's AI. The exception is grading: WorkRoad's AI grades the short answers in a practice test when you submit it. In a test your AI wrote, that counts one AI use per submit; in a test WorkRoad's AI wrote, it is included.

In Claude Code, `/mcp__workroad__make-cards <note or lecture>` does it in one step. For developers, [Let your AI do the writing](https://workroad.app/docs/api/copilot-and-generations#let-your-ai-do-the-writing) lists the operations.

## Prompts

The server also offers prompts. Claude Code lists them as slash commands:

| Prompt       | Slash command in Claude Code          | What it does                                                                                                   |
| ------------ | ------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `study-now`  | `/mcp__workroad__study-now`           | Checks what is due, then quizzes you card by card and records each answer as a review.                         |
| `quiz-me`    | `/mcp__workroad__quiz-me <topic>`     | Finds the sets for a topic with `search` and quizzes you on them.                                              |
| `make-cards` | `/mcp__workroad__make-cards <source>` | Reads a note or lecture and writes flashcards from it itself, saved as a study set, with none of your AI uses. |
| `plan-week`  | `/mcp__workroad__plan-week`           | Reads deadlines, lessons and planned blocks, proposes study blocks and creates them once you agree.            |

## Read the docs from an agent

An agent can read these docs to answer questions about WorkRoad itself: how a feature works, what a plan includes, or how to call the API. The server's instructions tell it to look the answer up rather than guess.

- `searchDocs` finds the pages that match a few words, with the passages that matched, and `getDoc` returns a page as Markdown. Both take a `locale` for a translation, and any key or connected app may call them.
- The server also lists every page as a resource, at the page's Markdown address, so a client such as Claude Code can attach one to a conversation.
- Without the MCP server, add `.md` to a docs address for the page as Markdown, as in `https://workroad.app/docs/api/mcp.md`, or ask for the page with `Accept: text/markdown`. Add `?lang=de`, `es`, `fr` or `it` for a translation.
- [`/llms.txt`](https://workroad.app/llms.txt) lists every page by section, and [`/llms-full.txt`](https://workroad.app/llms-full.txt) has them all in one file.
- On each docs page, **Copy page** copies it as Markdown, and **Open** opens it in ChatGPT or Claude.

## Practising from an agent

A practice session records real reviews, the same as the app's Review page:

1. `getToday` returns what is due, and a `practice` suggestion with the arguments for the next call.
2. `startPracticeSession`, optionally with `subjectId` or `setIds`, returns the first cards.
3. For each card the agent shows the term, waits for the answer, reveals the definition and calls `answerPracticeCard` with the card's `itemId`, a `rating` (`again`, `hard`, `good` or `easy`) and `durationMs`.
4. When `remaining` reaches 0, `getPracticeSession` refills the session. `finished: true` means nothing is due now.

`undoPracticeAnswer` takes back the newest answer. [Practice sessions](https://workroad.app/docs/api/study-and-practice#practice-sessions) has the details.

## Long-running work

Tools that start AI work or parse a file, such as `generateNoteFromTopic`, `sendCopilotMessage` or `completeNoteFile`, return a `jobId` straight away. Poll `getJob` with that id as `jobId` until `status` is `succeeded`, `failed` or `cancelled`, waiting the `retryAfter` seconds from the text block between calls. [Jobs](https://workroad.app/docs/api/copilot-and-generations#jobs) describes each kind's `result`.

The webhook tools appear only for an API key with `webhooks:manage`, which a connected app never gets. Creating a webhook, changing its URL and rotating its secret are not tools: a webhook sends events to the URL it was given for as long as it exists, and an agent steered by text it read could point it at someone else's server. Do those in the app or over REST.
