Skip to content

Build your personal knowledge base with Trilium Notes

refactor(llm): wrong types in MCP server

Elian Doranaf988fec6918
diff --git a/apps/server/src/services/mcp/mcp_server.ts b/apps/server/src/services/mcp/mcp_server.ts
index ff4828723c..67cc8af3fc 100644
--- a/apps/server/src/services/mcp/mcp_server.ts
+++ b/apps/server/src/services/mcp/mcp_server.ts
@@ -11,7 +11,7 @@ import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
import appInfo from "../app_info.js";
import cls from "../cls.js";
import { allToolRegistries } from "../llm/tools/index.js";
-import type { StaticToolDefinition } from "../llm/tools/tool_registry.js";
+import type { ToolDefinition } from "../llm/tools/tool_registry.js";
import sql from "../sql.js";
/**
@@ -20,7 +20,7 @@ import sql from "../sql.js";
* Write operations are wrapped in CLS + transaction context so that
* Becca entity tracking works correctly.
*/
-function registerTool(server: McpServer, name: string, def: StaticToolDefinition) {
+function registerTool(server: McpServer, name: string, def: ToolDefinition) {
server.registerTool(name, {
description: def.description,
inputSchema: def.inputSchema
@@ -41,7 +41,6 @@ export function createMcpServer(): McpServer {
for (const registry of allToolRegistries) {
for (const [name, def] of registry) {
- if (def.needsContext) continue;
registerTool(server, name, def);
}
}