Server Version
system.versionRetrieve the kObsidian server's package name, version, runtime, and runtime version to perform health checks or confirm the server build. Read-only, zero side effects.
Instructions
Return the running kObsidian server's package name, semver version, host runtime (bun or node), and runtime version. Use this as a health-check or to confirm which server build a client is talking to. Read-only; zero side effects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | npm package name of the running server. | |
| version | Yes | Semver version. | |
| runtime | Yes | Which runtime is executing the server. | |
| runtimeVersion | Yes | Version of the runtime (bun or node). | |
| summary | Yes | Human-readable one-liner combining the fields above. |
Implementation Reference
- src/server/tools/system.ts:26-38 (handler)The actual handler function for the system.version tool. Returns package name, version, runtime info, and a summary string.
handler: async () => { const runtime: "bun" | "node" = isBun ? "bun" : "node"; const runtimeVersion = isBun ? ((process.versions as { bun?: string }).bun ?? "unknown") : process.version; return { name: PACKAGE_NAME, version: PACKAGE_VERSION, runtime, runtimeVersion, summary: `${PACKAGE_NAME} ${PACKAGE_VERSION} on ${runtime} ${runtimeVersion}`, }; }, - src/server/tools/system.ts:7-15 (schema)Output schema (versionOutputSchema) defining the shape returned by system.version: name, version, runtime, runtimeVersion, summary.
const versionOutputSchema = z .object({ name: z.string().describe("npm package name of the running server."), version: z.string().describe("Semver version."), runtime: z.enum(["bun", "node"]).describe("Which runtime is executing the server."), runtimeVersion: z.string().describe("Version of the runtime (bun or node)."), summary: z.string().describe("Human-readable one-liner combining the fields above."), }) .describe("Return shape for `system.version`."); - src/server/tools/system.ts:17-40 (registration)Tool definition registration including the name 'system.version', title, description, input/output schemas, and annotations.
export const systemTools: ToolDefinition[] = [ { name: "system.version", title: "Server Version", description: "Return the running kObsidian server's package name, semver version, host runtime (`bun` or `node`), and runtime version. Use this as a health-check or to confirm which server build a client is talking to. Read-only; zero side effects.", inputSchema: z.object({}).strict(), outputSchema: versionOutputSchema, annotations: READ_ONLY, handler: async () => { const runtime: "bun" | "node" = isBun ? "bun" : "node"; const runtimeVersion = isBun ? ((process.versions as { bun?: string }).bun ?? "unknown") : process.version; return { name: PACKAGE_NAME, version: PACKAGE_VERSION, runtime, runtimeVersion, summary: `${PACKAGE_NAME} ${PACKAGE_VERSION} on ${runtime} ${runtimeVersion}`, }; }, }, ]; - src/server/registry.ts:18-34 (registration)The toolRegistry array that collects all tool definitions including systemTools (which contains system.version).
export const toolRegistry: ToolDefinition[] = [ ...vaultTools, ...noteTools, ...tagTools, ...linkTools, ...analyticsTools, ...taskTools, ...dataviewTools, ...blocksTools, ...marpTools, ...kanbanTools, ...canvasTools, ...templateTools, ...apiTools, ...wikiTools, ...systemTools, ]; - src/server/create-server.ts:103-129 (registration)Where each tool in toolRegistry (including system.version) is registered with the MCP server via server.registerTool.
for (const tool of toolRegistry) { server.registerTool( tool.name, { title: tool.title, description: buildDescription(tool), inputSchema: tool.inputSchema ?? z.object({}), outputSchema: tool.outputSchema, ...(tool.annotations ? { annotations: tool.annotations } : {}), }, async (args) => { try { const result = (await tool.handler(context, args)) as Record<string, unknown>; return ok(result, getSummary(result) ?? `${tool.title} completed`); } catch (error) { const appError = toAppError(error); throw new Error(formatErrorMessage(appError)); } }, ); } registerWikiResources(server, context); registerWikiPrompts(server); return server; }