MCP Testing
adeze/raindrop-mcp
MCP Testing Strategies with Vitest, Inspector, and Integration Tests
A skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…
$ npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install TriliumNext/Trilium adding-llm-mcp-tools --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/adding-llm-mcp-tools .claude/skills/adding-llm-mcp-tools && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "adding-llm-mcp-tools" agent skill from https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-tools into .claude/skills/adding-llm-mcp-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-llm-mcp-tools", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-toolsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install TriliumNext/Trilium adding-llm-mcp-tools --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/adding-llm-mcp-tools .agents/skills/adding-llm-mcp-tools && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "adding-llm-mcp-tools" agent skill from https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-tools into .agents/skills/adding-llm-mcp-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-llm-mcp-tools", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install TriliumNext/Trilium adding-llm-mcp-tools --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/adding-llm-mcp-tools .cursor/skills/adding-llm-mcp-tools && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "adding-llm-mcp-tools" agent skill from https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-tools into .cursor/skills/adding-llm-mcp-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-llm-mcp-tools", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/TriliumNext/Trilium.git --path .claude/skills/adding-llm-mcp-tools--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install TriliumNext/Trilium adding-llm-mcp-tools --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/adding-llm-mcp-tools .gemini/skills/adding-llm-mcp-tools && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "adding-llm-mcp-tools" agent skill from https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-tools into .gemini/skills/adding-llm-mcp-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-llm-mcp-tools", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install TriliumNext/Trilium adding-llm-mcp-toolsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/adding-llm-mcp-tools .github/skills/adding-llm-mcp-tools && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "adding-llm-mcp-tools" agent skill from https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-tools into .github/skills/adding-llm-mcp-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-llm-mcp-tools", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install TriliumNext/Trilium adding-llm-mcp-tools --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TriliumNext/Trilium.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/adding-llm-mcp-tools .opencode/skills/adding-llm-mcp-tools && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "adding-llm-mcp-tools" agent skill from https://github.com/TriliumNext/Trilium/tree/main/.claude/skills/adding-llm-mcp-tools into .opencode/skills/adding-llm-mcp-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "adding-llm-mcp-tools", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
adding-llm-mcp-toolsA skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…
Adding LLM MCP Tools is an agent skill from TriliumNext/Trilium. Use when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ — note/attribute/attachment/hierarchy/icon/skill tools) — anything exposed to both the in-app LLM chat and the external MCP server. Covers why execute MUST be synchronous (the NotAPromise<T compile guard + better-sqlite3 sync transactions), the mutates:true→getSql().transactional wiring, the single allToolRegistries registration point feeding both consumers, the…
Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/spec-harness.md`).
It sits in Testing & QA, covering MCP servers and Unit testing. It works with Model Context Protocol, SQLite and Vitest. The repository describes itself as: Build your personal knowledge base with Trilium Notes. The licence is AGPL-3.0.
7 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit cac2b4f. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitpnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git and pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Adding LLM MCP Tools loads about 2.5k tokens when it runs, and up to ~4.9k if it reads all its reference files. Until then it costs about 193 tokens; SKILL.md has 1,067 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from TriliumNext/Trilium at commit cac2b4f, republished under its AGPL-3.0 licence (© TriliumNext). 1,067 words, ~2,534 tokens.
.claude/skills/adding-llm-mcp-tools/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.One tool definition, two consumers. Every tool under packages/trilium-core/src/services/llm/tools/ is declared once via defineTools({...}) and consumed by BOTH the in-app LLM chat AND the external MCP server. The wiring rules below all fall out of that fact — internalize it before touching anything.
execute MUST be synchronousNo async, no await, no returned Promise. This is not a style preference — better-sqlite3 transactions are synchronous, so an async execute lets getSql().transactional() commit before the awaited work runs, silently corrupting entity-change/Becca tracking.
The type system is built to make this a compile error (tool_registry.ts:21,32,40):
type NotAPromise<T> = T & { then?: void }; // line 21
// ...
execute: (args: any) => NotAPromise<object>; // lines 32 (mutating) & 40 (read-only)A Promise has then: Function, which violates then?: void → typecheck rejects it. It regressed twice anyway (git show 09be2822e0 "fix(llm): some tools were async", a93029f789 "fix(llm): misuse of transactions in tool use due to async") — the NotAPromise guard is the durable fix. Do not weaken it (no as any, no widening the return type). If you need data, fetch it synchronously through Becca / the sync services; the tools deliberately reuse the same logic as ETAPI without HTTP.
mutates: true is load-bearing wiring, not a labelBoth consumers branch on it to wrap the call in a transaction. Forget it on a write tool and execute runs outside a transaction — no error, just broken entity-change tracking.
tool_registry.ts:65-66 — def.mutates ? (args) => getSql().transactional(() => def.execute(args)) : def.executemcp_server.ts:29-33 (note: it lives in apps/server/src/services/mcp/, not under llm/) — the same branch, inside its own cls.initRule: any tool that writes (setContent, save, setAttribute, createNewNote, branch/clone/move, deleteNote, markAsDeleted) gets mutates: true. Read-only tools omit it (or mutates: false).
allToolRegistries (packages/trilium-core/src/services/llm/tools/index.ts:34) is the single wiring point iterated by both mcp_server.ts:51 and base_provider.ts:389 (llm/providers/base_provider.ts, Object.assign(tools, registry.toToolSet())). Adding a tool to an existing module (e.g. another entry in note_tools.ts) needs no wiring. Creating a new module means: export const xTools = defineTools({...}), add the export/import lines in index.ts, and append xTools to the allToolRegistries array. Miss the array and chat + MCP both never see it.
Node-only tools take the other door. A tool that needs something core cannot have in the browser
(the in-app documentation reader, for instance) lives in apps/server/src/services/llm/tools/
(doc_notes.ts, help_tools.ts) and registers at server startup via
registerToolRegistryLoader(async () => (await import("./tools/x.js")).xTools) from core's light
tools/registration.ts (see registerServerLlmExtensions); the first chat turn or MCP request
resolves the loader through resolveToolRegistries() and appends the registry to the same array.
Register the loader, never a static import — the loader form is what keeps the tool stack (zod, the
AI SDK) out of the server's startup path. Standalone simply runs without it. Put a tool there only if it genuinely cannot run under sqlite-wasm —
core is the default home, and anything placed in the server loses the standalone and desktop
consumers.
{ error: "..." } — never throwThe pipeline keys off the literal error property; a thrown exception escapes the contract. Every guard does return { error: "Note not found" } (note_tools.ts:72,87,110). Service calls that can throw are wrapped in try/catch that converts to { error } (see create_note in note_tools.ts):
try {
const { note } = noteService.createNewNote({ parentNoteId, title, content: htmlContent, type });
return { success: true, noteId: note.noteId, /* ... */ };
} catch (err) {
return { error: err instanceof Error ? err.message : "Failed to create note" };
}Skipping these lets the LLM corrupt protected or system notes. Apply in this order (see note_tools.ts):
| Check | Guard | Returns |
|---|---|---|
| Note exists | !becca.getNote(id) | { error: "Note not found" } |
| Not protected | !note.isContentAvailable() | { error: "Note is protected..." } |
| Right content kind | !note.hasStringContent() | { error: "Cannot ... note type: ${note.type}" } |
| Stored content is text | typeof note.getContent() !== "string" | { error: "Note has binary content" } |
| Rename/delete | note.isProtected | { error: "...cannot be renamed/deleted" } |
| Delete/move/clone a system note | PROTECTED_SYSTEM_NOTES.has(noteId) | { error: "Cannot delete system notes" } |
PROTECTED_SYSTEM_NOTES lives in helpers.ts:19 = new Set(["root", "_hidden", "_share", "_lbRoot", "_globalNoteMap"]). For attribute writes, also guard attributeService.isAttributeDangerous(type, name) and (for relations) a missing target note (attribute_tools.ts:75).
Mirror ETAPI's field choices, but never import its mappers. A tool that returns a note should
pick the same fields ETAPI's response does, so the two surfaces describe an entity the same way —
but inline that mapping in the tool. This used to be a discipline; since the tools moved into
packages/trilium-core it is also structural, because ETAPI lives in apps/server/src/etapi/ and
core cannot import from an app. If you find yourself wanting a shared mapper, the type belongs in
@triliumnext/commons, not in a cross-layer import.
{note,attribute,attachment,hierarchy,icon,skill}_tools.ts, or a new *_tools.ts). Declare the tool inside defineTools({...}).description (string the LLM reads), inputSchema (z.object({...}) with .describe() on each field), and execute — synchronous (footgun #1).mutates: true (footgun #2).return { error } on every failure branch (footguns #4, #5); wrap throwing service calls in try/catch.allToolRegistries (footgun #3).apps/client/src/translations/en/translation.json under llm.tools.<tool_name>, imperative tense ("Create note", not "Creating note"). English only — other locales come via Weblate (see CLAUDE.md / translating-locales).getTool() + cls.init() harness — see spec-harness.md.| Tool does… | mutates | Required guards (in order) | Spec harness |
|---|---|---|---|
| read-only (search/get) | omit | !note → error; isContentAvailable() for content reads | plain getTool(name).execute(args); mock search.findResultsWithQuery if it searches |
| edit existing note content | true | !note → not found; !isContentAvailable() → protected; !hasStringContent() → bad type; binary getContent() → binary | Pattern A: buildNote + stub setContent/saveRevision (no CLS) |
| create / move / clone (service writes) | true | parent !isContentAvailable(); wrap service call in try/catch → { error } | Pattern B: cls.init(() => createNewNote(...)) to seed, cls.init(() => getTool(...).execute(...)) to call |
| rename / delete | true | PROTECTED_SYSTEM_NOTES.has(noteId) first; then !note; then note.isProtected | Pattern A (mock deleteNote/save) or Pattern B |
The two harness patterns are spelled out fully in the reference — don't re-derive the boilerplate.
execute is not async and returns no Promise (typecheck rejects it otherwise — run pnpm typecheck).mutates: true.allToolRegistries (index.ts:34).return { error }; the only throws are service calls wrapped in try/catch.llm.tools.<name> in en/translation.json, imperative tense.{ error: ... } object — and that the success path does NOT leak an error property (expect(result).not.toHaveProperty("error")).| File | When to open |
|---|---|
| references/spec-harness.md | Writing the *_tools.spec.ts — the getTool() iterator, Pattern A (mock persistence, no CLS), Pattern B (real becca + cls.init), and the error-object assertions. |
Cross-links: writing-unit-tests (general Vitest patterns, the CoreApiTester, becca/froca fixtures, single-file run commands), translating-locales (why en-only and how Weblate picks up the rest), analyzing-coverage (chasing the spec to 100%).
© TriliumNext, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in .claude/skills/adding-llm-mcp-tools of TriliumNext/Trilium.
Open the folder on GitHubat commit cac2b4f
Adding LLM MCP Tools next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Adding LLM MCP Tools this skillTriliumNext/Trilium | 38k | — | ~2.5k | Automated safety check: Pass | AGPL-3.0 | |
| MCP Testingadeze/raindrop-mcp | 188 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Edt MCP YaxunitDitriXNew/EDT-MCP | 295 | — | ~2.5k | Automated safety check: Pass | AGPL-3.0 | |
| Edt MCP TestingDitriXNew/EDT-MCP | 295 | — | ~2.1k | Automated safety check: Pass | AGPL-3.0 | |
| Add UI Stringopenfootmanager/openfootmanager | 1.1k | — | ~2.6k | Automated safety check: Pass | GPL-3.0 | |
| Playwright Testingchongdashu/vibejam-starter-pack | 149 | — | ~2.2k | Automated safety check: Pass | None |
adeze/raindrop-mcp
MCP Testing Strategies with Vitest, Inspector, and Integration Tests
DitriXNew/EDT-MCP
How to write and run YAXUnit unit tests for a 1C configuration through 1C:EDT + the EDT-MCP runyaxunittests / debugyaxunittests tools.
DitriXNew/EDT-MCP
How to manually e2e-test each EDT-MCP server tool against a live EDT workbench + TestConfiguration.
openfootmanager/openfootmanager
Add or change any text a player can see, in every locale the game ships in.
chongdashu/vibejam-starter-pack
Plan, implement, and debug frontend tests: unit/integration/E2E/visual/a11y.
ansible/ansible-ui
Write, run, and debug Playwright E2E / integration / live tests.
TriliumNext/Trilium
A skill your agent uses when cutting, preparing, or debugging a Trilium release — bumping the monorepo version, tagging, or diagnosing a failed "Release" workflow run.
TriliumNext/Trilium
A skill your agent uses when working on the Trilium Electron desktop app (apps/desktop) — adding or changing an electronApi method / IPC channel, touching preload.ts, main.ts, services/window.ts or…
TriliumNext/Trilium
A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…
TriliumNext/Trilium
A skill your agent uses when adding, moving, or wiring an internal REST endpoint in Trilium (a new /api/ route) — choosing between a core-shared handler (packages/trilium-core/src/routes/index.ts…
TriliumNext/Trilium
Write, extend, and review CKEditor 5 plugins in the Trilium (TriliumNext Notes) monorepo — the rich-text-note editor under packages/ckeditor5, whose plugins live in src/plugins/.
TriliumNext/Trilium
Testing CKEditor 5 plugins in the Trilium monorepo. An agent skill from TriliumNext/Trilium.
Works with
Categories
A skill your agent uses when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ —…. Adding LLM MCP Tools is an agent skill from TriliumNext/Trilium. Use when adding, changing, or reviewing an LLM/MCP tool in Trilium (the defineTools definitions under packages/trilium-core/src/services/llm/tools/ — note/attribute/attachment/hierarchy/icon/skill tools) — anything exposed to both the in-app LLM chat and the external MCP server.
Adding LLM MCP Tools fits situations like: client-side note UI; ETAPI endpoints; generic Vitest questions (see writing-unit-tests).
Run `npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a claude-code`. Or copy the skill folder (.claude/skills/adding-llm-mcp-tools in TriliumNext/Trilium) into .claude/skills/adding-llm-mcp-tools in your project. Claude Code loads it when a task matches its description.
Run `npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a codex`. Or copy the skill folder (.claude/skills/adding-llm-mcp-tools in TriliumNext/Trilium) into .agents/skills/adding-llm-mcp-tools in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TriliumNext/Trilium --skill adding-llm-mcp-tools -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/adding-llm-mcp-tools, .gemini/skills/adding-llm-mcp-tools, .github/skills/adding-llm-mcp-tools and .opencode/skills/adding-llm-mcp-tools in your project.
Going by SKILL.md and its folder, Adding LLM MCP Tools needs the command-line tools its instructions call (git and pnpm).
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Adding LLM MCP Tools is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Adding LLM MCP Tools: MCP Testing (adeze/raindrop-mcp, 188 stars), Edt MCP Yaxunit (DitriXNew/EDT-MCP, 295 stars), Edt MCP Testing (DitriXNew/EDT-MCP, 295 stars) and Add UI String (openfootmanager/openfootmanager, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
TriliumNext (a GitHub organization) maintains it in TriliumNext/Trilium, which has 38,248 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 8, 2026.
Source: TriliumNext/Trilium on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.